Jump to content
Sign in to follow this  
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


Paul EGLD

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!° %( 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!

Paul EGLD

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

Paul EGLD

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...