This topic is now archived and is closed to further replies.

Guest Adrian

Local Time at Destination

Recommended Posts

Hello everybody, a while I posted my InFlightData gauge project problems. Well I hit another snag in that I am trying to calculate the local time at the destination airport with an active flight plan.I believe that my variable for this time at destination is using GMT time difference I think it just adds the time difference in the current plane position. Has anyone else tried to code this idea?For example i want the gauge to read as follows:Current time: 21:00 (working code, ok) (Melbourne, Australia)Time at destination: 19:00 (currently spitting out wrong values) (Perth, Australia)My snippet of code is shown below:

<Update id="Depart_Dest Times Calculations">			<script>(A:GPS IS ACTIVE FLIGHT PLAN, bool) if{ (E:LOCAL TIME, hours) (>L:CurrentLocalTimeHours, hours) (E:LOCAL TIME, minutes) flr 60 % (>L:CurrentLocalTimeMinutes, minutes) (A:GPS FLIGHT PLAN WP Count, number) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointTimeZoneDeviation, hours) (>L:TimeZoneDiffHours, hours) (@c:FlightPlanWaypointTimeZoneDeviation, minutes) (>L:TimeZoneDiffMinutes, minutes) (L:CurrentLocalTimeHours, hours) (L:TimeZoneDiffHours, hours) + (>L:TimeAtDestHours, hours) (L:CurrentLocalTimeMinutes, minutes) (L:TimeZoneDiffMinutes, minutes) flr 60 % + (>L:TimeAtDestMinutes, minutes) } </Script></Update>


Share this post

Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!