Archived

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

pve

Retrieve Lat & Long Text In Loop

Recommended Posts

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

Share this post


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

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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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
Thanks Tom, I will have to try another way.Paul

Share this post


Link to post
Share on other sites