December 17, 200817 yr FS9 Hi all Trying to get Navaid & Lat & Long text in a loop %(0 sp1) %{loop} %( l1 (>@c:IcaoSearchMatchedIcao)) \{fnt}%((@c:IcaoSearchCurrentIdent))%!s!\t\{fnt1}@FormatLatitudeTabbed(@c:FacilityLatitude)@FormatLongitudeTabbed(@c:FacilityLongitude) %(l1 ++ s1 l2 <) I get all the navaids listed OK but only the first ICAO Lat & Long repeated Paul EGLD
December 17, 200817 yr Hi,I use this one, maybe you can retrieve something useful from it, it gives waypoint, lat and lon:<Macro Name="FormatLatitudeTabbed">%((@1,degrees) d 0 >=)%{if}N%{else}S%{end} %( abs d flr )%!02d!° %( 1 % 60 * d flr )%!02d!' %( 1 % 60 * )%!02.0f" </Macro><Macro Name="FormatLongitudeTabbed">%((@1,degrees) d 0 >=)%{if}E%{else}W%{end} %( abs d flr )%!03d!° %( 1 % 60 * d flr )%!02d!' %( 1 % 60 * )%!02.0f"</Macro>%((@c:FlightPlanIsActiveFlightPlan) (@c:FlightPlanWaypointsNumber) s2 0 != and)%{if}%(0 sp1)%{loop}%(l1 (>@c:FlightPlanWaypointIndex))\n%((@c:FlightPlanIsActiveApproach) ! )%{if}%((@c:FlightPlanActiveWaypoint,number) l1 ==)%{if}\{rev}%{else}\{nr}%{end}%{end}\{fnt}%((@c:FlightPlanWaypointIdent,string))%!s!\{nr}\{nr}\t\t\t\t%(l1 0 !=)%{if}@FormatLatitudeTabbed(@c:FlightPlanWaypointLatitude) @FormatLongitudeTabbed(@c:FlightPlanWaypointLongitude)%{end}%(l1 ++ s1 l2 <)\n%{next}%{end}Jan Jan "Beatus ille qui procul negotiis..."
December 18, 200817 yr Author Hi,I use this one, maybe you can retrieve something useful from it, it gives waypoint, lat and lon:<Macro Name="FormatLatitudeTabbed">%((@1,degrees) d 0 >=)%{if}N%{else}S%{end} %( abs d flr )%!02d! Paul EGLD
December 18, 200817 yr Hi JanThat works OK, But I am trying to get the cordinates from the ICAO facility code in (@c:IcaoSearchMatchedIcao) ie: VEG BNN. Not sure how to do that.Paul, remember that results from searchs assigned to retrieve data via Facility are asynchronious, then you can't retrieve multiple data in a loop within a single cycle. Tom
December 18, 200817 yr Author Paul, remember that results from searchs assigned to retrieve data via Facility are asynchronious, then you can't retrieve multiple data in a loop within a single cycle. TomThanks Tom, I will have to try another way.Paul Paul EGLD
Create an account or sign in to comment