I have needed to calculate the distance between the current vehicle and the preceding vehicle,for each vehicle in a flow, running on an edge.
While going through TraCI, I came across getLeader method which is supposed to return the Id of the leader and the distance I need.
But I could not find a implemented method with this name, or any of the other method listed under Overview Extended Variables Retrieval written in C++ in TraCI.
I really appreciate if someone can help me with this.
I was successful in implementing getLastStepVehicleIDs to retrieve values from induction loops as advised here. I followed the already implemented methods of the same type (e.g. getJunctionIds), but in this case no such already implemented methods can be found.