- Messages
- 371
- Country

Hi,
I have wrote a xml file to save the flight plan that I edit with my FMS.
But as you know, the 2 GPS functions (C:fs9gps:FlightPlanWaypointLatitude,degrees) (C:fs9gps:FlightPlanWaypointLongitude,degrees) return a value in decimal degrees.
So, the .pln file format of FSX needs degrees , minutes , seconds E/W N/S.
So, I have write a code to transform the decimal degrees in sexagimals degrees.
But in rare case (1 %) there is an error in the conversion:
here is my code :
I use the same code for the Longitude.
So , for an unknown reason , 1 times per week, I have a problem with a waypoint
For exemple, the fix "AGOPA" in France, produces this error (ICAO code "WLF AGOPA"), while all the other waypoints are properly converted
The orignal position of AGOPA in a FSx flight plan is :
But when my gauge write my flight plan file, I have :
And my waypoint is in the antartic !!!!!!!!!!
Where is my error ?
Why that's happens ?
I have wrote a xml file to save the flight plan that I edit with my FMS.
But as you know, the 2 GPS functions (C:fs9gps:FlightPlanWaypointLatitude,degrees) (C:fs9gps:FlightPlanWaypointLongitude,degrees) return a value in decimal degrees.
So, the .pln file format of FSX needs degrees , minutes , seconds E/W N/S.
So, I have write a code to transform the decimal degrees in sexagimals degrees.
But in rare case (1 %) there is an error in the conversion:
here is my code :
Code:
(* Waypoint position latitude *)
(C:fs9gps:FlightPlanWaypointLatitude,degrees) abs 1 % 60 * 1 % 6000 * near 100 / (>L:Seconds,number)
(C:fs9gps:FlightPlanWaypointLatitude,degrees) abs 1 % 60 * flr (>L:Minutes,number)
(C:fs9gps:FlightPlanWaypointLatitude,degrees) abs flr (>L:Degrees,number)
(L:Seconds,number) 60 == if{ (L:Minutes,number) 1 + (>L:Minutes,number) 0.00 (>L:Seconds,number) }
(L:Minutes,number) 60 == if{ (L:Degrees,number) 1 + (>L:Degrees,number) 0 (>L:Minutes,number) }
I use the same code for the Longitude.
So , for an unknown reason , 1 times per week, I have a problem with a waypoint
For exemple, the fix "AGOPA" in France, produces this error (ICAO code "WLF AGOPA"), while all the other waypoints are properly converted
The orignal position of AGOPA in a FSx flight plan is :
Code:
<ATCWaypoint id="AGOPA">
<ATCWaypointType>Intersection</ATCWaypointType>
<WorldPosition>N48° 5' 0.01",E2° 0' 35.00",+000000.00</WorldPosition>
<ICAO>
<ICAORegion>LF</ICAORegion>
<ICAOIdent>AGOPA</ICAOIdent>
</ICAO>
</ATCWaypoint>
But when my gauge write my flight plan file, I have :
Code:
<ATCWaypoint id="AGOPA">
<ATCWaypointType>Intersection</ATCWaypointType>
<WorldPosition>N48° 5' 1[COLOR="Red"].[B]e-002[/B]",[/COLOR]E2° 0' 35.",+000000.00</WorldPosition>
<ICAO>
<ICAORegion>LF</ICAORegion>
<ICAOIdent>AGOPA</ICAOIdent>
</ICAO>
</ATCWaypoint>
And my waypoint is in the antartic !!!!!!!!!!
Where is my error ?
Why that's happens ?
Last edited:




