In my tests, minTTC and self-computed ttc are consistent. You can get an example here: https://sumo.dlr.de/extractTest.php?path=complex/traci/vehicle/ssm/basic Note, that minTTC will also provide values for encounters at intersections. This cannot currently be computed with the getLeader function because it does not return intersection-conflict vehicles.
If you still cannot get your TTC computation to work, please provide a minimum example (ideally by modifying the linked example). Am Sa., 14. Mai 2022 um 04:39 Uhr schrieb محمد ألأسدي < [email protected]>: > Easy to fix > > في الجمعة، ١٣ مايو ٢٠٢٢ ٣:٤٣ ص Mariam Wessam Hassan Mohamed Nour < > [email protected]> كتب: > >> Hi all, >> >> >> >> I’m trying to calculate time to collision at every time step for each >> vehicle in sumo. >> >> >> >> I’m getting the spacing between each two vehicles as well as the speed of >> the leader using the getLeader function. Then I use the equation >> ((spacing+minGap)/difference in speed) to get ttc. >> >> The gap calculation was based on this ( >> https://github.com/eclipse/sumo/issues/10178) >> >> >> >> On the other hand, every vehicle is equipped with an SSM device to >> calculate ttc. So I’m also able to directly get ttc values for each vehicle >> using traci.vehicle.getParameter(veh, "device.ssm.minTTC"). However, this >> ttc value and the one I calculate above don’t match. >> >> >> >> Am I calculating ttc using wrong values in the first approach? If not, >> then what could be the problem? >> >> >> >> Thanks >> >> Mariam >> >> >> _______________________________________________ >> sumo-user mailing list >> [email protected] >> To unsubscribe from this list, visit >> https://www.eclipse.org/mailman/listinfo/sumo-user >> > _______________________________________________ > sumo-user mailing list > [email protected] > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-user >
_______________________________________________ sumo-user mailing list [email protected] To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
