Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Retrieve Lat & Long Text In Loop

Featured Replies

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

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..."

  • 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

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
  • 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. Tom
Thanks Tom, I will have to try another way.Paul

Paul EGLD

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.