Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Inconsistent space headway

Hi

Let's say we are running the following scenario.

ego_x, ego_y = traci.vehicle.getPosition(x)
leader=traci.vehicle.getLeader(x)
leader_id=leader[0]
leader_pos_1=leader[1]
leader_pos_2x, leader_pos_2y=traci.vehicle.getPosition(leader_id)

The headway between two cars computed either way is not consistent rather always gives a difference of 2.5 which I presume equals to the standstill distance between the two vehicles. The following equation describes the relation.

leader_pos_1 = leader_pos_2x-ego_x-length-2.5

The attached image shows calculations from my outputs. column a is leader_pos_2x - ego_x - length and column b is leader_pos_1 - a.

Why am I seeing this difference and which of these two values is to be trusted as the real space headway between the two vehicles at any time instance?

Thanks
Ahsen


 

Attachment: Capture.JPG
Description: JPEG image


Back to the top