Richard1980
Registered User.
- Local time
- Today, 06:41
- Joined
- Aug 13, 2012
- Messages
- 72
Hello everyone,
I am struggling trying to solve this task.
I have a form where I save flight data (departure & arrival time, flight time and so on). No problem about calculation of flight time between two cities if the flight does not cross the International Date Line (aka IDL) (Longitude 180°).
The problem comes up when the flight crosses that line. Accordingly to the general accepted rules, when the line has been crossed in a eastbound flight (i.e. Tokyo to Los Angeles), the date remains the same as the departure one.
When the line has been crossed in a westbound flight (i.e. Los Angeles to Tokyo), the date must be added by one day.
Tha main variable to be considered is: has the flight passed the IDL?
It is a very important variable, because if it is not true then I have not to change the arrival date, but if it is true, then I should consider where the flight is bound to modify accondingly to the (above) rule the arrival date and then calculating the flight time in a right way.
Is that quite clear?
How would you manage that?
Thanks, bye.
Riccardo
I am struggling trying to solve this task.
I have a form where I save flight data (departure & arrival time, flight time and so on). No problem about calculation of flight time between two cities if the flight does not cross the International Date Line (aka IDL) (Longitude 180°).
The problem comes up when the flight crosses that line. Accordingly to the general accepted rules, when the line has been crossed in a eastbound flight (i.e. Tokyo to Los Angeles), the date remains the same as the departure one.
When the line has been crossed in a westbound flight (i.e. Los Angeles to Tokyo), the date must be added by one day.
Tha main variable to be considered is: has the flight passed the IDL?
It is a very important variable, because if it is not true then I have not to change the arrival date, but if it is true, then I should consider where the flight is bound to modify accondingly to the (above) rule the arrival date and then calculating the flight time in a right way.
Is that quite clear?
How would you manage that?
Thanks, bye.
Riccardo