Cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate distance on different tracks

Pioneer
Pioneer

Hello everyone,

 

I need help calculating the distance to front vehicle in case that the vehicles location on different tracks. Right now does not display the vehicle at the front. What is the best way to calculate the distance continuously?  What is the best way to continuously calculate the distance even if vehicles are on different track? Note that on one track I use @.FrontMu.rearPos.

 

 

Thank you.

1 REPLY

Re: Calculate distance on different tracks

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you need some steps:

 transporter.frontMu = void  means that no transporter is in front of the transporter on the same track; search the transporter on the next track (transporter.location.succ) with rearMU = void (remark, that the successor track may be empty). The distance you can calculate:

 

(transporter.location.length-transporter.frontPos)+ nextTransporter.rearPos

 

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net