Can I read how far have I moved horizontally?

Discussion related to Mission design and creation.
Locked
ppp333ddd_
Posts: 58
Joined: Fri Aug 18, 2017 1:04 am

Can I read how far have I moved horizontally?

Post by ppp333ddd_ »

In P3D, I can know what is the distance of vertical movement by reading the altitude. But can I read how far have I moved horizontally from taking off?

Thanks,
Jeff
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3703
Joined: Wed Aug 24, 2011 1:37 pm

Re: Can I read how far have I moved horizontally?

Post by Rob McCarthy »

Hi Jeff,

The RequestData sample shows how to get various parameters for the user vehicle. You can use this information to calculate distances over time.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
dsdawson
Posts: 36
Joined: Sat Jan 14, 2012 5:46 pm

Re: Can I read how far have I moved horizontally?

Post by dsdawson »

Track the status of the SIM_ON_GROUND variable. When it becomes false, read Lat and Lon.
If you're running in-process, you can use the GPS interface to calculate the distance between here and there.
If not, you'll have to implement a great circle calculation to get your distance.
Locked