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.

adding waypoint based on nearest airports

Featured Replies

I've got the NearestAirportCurrentLine that i need to add a waypoint based on what one has clicked on the screen. I was looking through the gps_295.xml and having a hard time finding how to add a waypoint based on this data. Any suggestions? Something to do with (@c:NearestAirportCurrentICAO) (>@c:WaypointAirportICAO)??Thanks,Steve

  • Replies 36
  • Views 3.6k
  • Created
  • Last Reply

Top Posters In This Topic

What is a direct to and how would i do that? Also, what is going on in the gps gauge when you select a nearest airport?Thanks,Steve

  • Commercial Member

How to do a "Direct To" is buried in the XML code for the GPS. A "Direct To" is where you select a destination waypoint and then tell the GPS to go "direct to" it. It overwrites the current flight plan.As far as selecting nearest airport... it simply brings up information pertaining to that airport.

Ed Wilson

Mindstar Aviation
My Playland - I69

Hi,gps:AddWayPoint should work.You might try :nIndex is the current gps index line where you want to insert the wp.You have already set the current "NearestAirport".Then,(@c:NearestAirportCurrentICAO) (>@c:FlightPlanNewWaypointICAO)andnIndex (>@c:FlightPlanAddWaypoint)The waipoint is "inserted" in the FP as an ordinal gps database's waypoint. User defined waypoints can also be inserted and given an IDENT. Waypoints can be deleted as well.Hope this helpsTom

  • Author

Hi,I didn't succeed to use that code.Do you have working code?I thought it is only usable in the fs flightplanner.Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hey,Thanks for the help. Maybe you misunderstood me, but in the GPS you can select an airport then get the info. Once there you can "activate" it and it seems to become a waypoint or at least it appears in the waypoint part of the gps. Maybe i'm confused about what is actually going on.Thanks,Steve

Jan,So far I tested, you need a flightplan loaded into FS for them to work (FlightPlanIsActiveFlightPlan=1), as they are a part of FlightPlan data. Maybe you tried to use them for building a FP from scratch?Tom

  • Author

Tom,That is correct.Will have another look at it.Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hello Jan I got the load flight plan part working with:- (L:FMCPage,enum) 6 == (L:FMCPage_Sub,enum) 1 == & (L:HoldPage,bool) ! & if{ (@c:FacilityICAO) (>@c:FlightPlanNewWaypointICAO) (L:Scroll,number) your scroll position number (>@c:FlightPlanAddWaypoint) } It loads a waypoint into the FMC legs list in the chosen position and draws the line in the EHSI. Still working on the call waypoint from FS9 list.

Paul EGLD

That makes sense. Just one question, what is the condition that needs to be met represent?Thanks,Steve

Hi all Got the select waypoint, load into the FMC and show changes on the EHSI done but autopilot ignores the new waypoint. Is there a way to include the new waypoints in the plan. I found @g:activateLeg @FPLLegalLeg @g:directToActivateLeg in the FS9 GPS any info on these.

Paul EGLD

Hi all,I am using the following code in my FMC(L:WaypointId,number) (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointRemainingDistance,nmiles) (@c:FacilityICAO) (>@c:FlightPlanNewWaypointICAO) (L:WaypointId,number) (>@c:FlightPlanAddWaypoint) 1 (>L:WPassed,bool) (L:WaypointId,number) (>@c:FlightPlanDeleteWaypoint) 1 (>L:WPassed,bool) (A:gps drives nav1,bool) 1 == if{ @WPRemDis 2.5 < if{ (L:WPassed,bool) 0 == if{ (L:WaypointId,number) ++ (>L:WaypointId,number) 1 (>L:WPassed,bool) } } els{ 0 (>L:wpassed,bool) } (L:WaypointId,number) (>@c:FlightPlanActiveWaypoint) } WaypointId=listCurrent for the default gps code.CalcLegs activates the next waypoint in the list when distance from current is less than 2.5nm (more sophisticated code can be added here).And two questions- How can we assign the current aircraft position (lat/lon) to waypoint ident and/or facility?- How can we add departure and destination airports?Costas

Hello Costas Thanks, something there I can use. What are you try to achieve with the waypoint and aircraft position give more detail. I put the airports in with the ICAO code as waypoints. I don't think you can set them up as intended to show as departure and destination. Most of it now works, I can enter new waypoints in a FS loaded plan on through the FMC, The initial entry of a non FS flight plan waypoint closes the FS FP link to the autopilot but it flys the full route with all the user updated waypoints including updating all other information you get from the GPS WP info, DTG, TOC, TOD etc. I will post finished code soon.

Paul EGLD

  • Author

Hi,Very interested to see your finished codes. I still didn't succeed to produce a working one.Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

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.