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.

Q. Add waypoint to flightplan or NAV1/2 using LAT/LON input

Featured Replies

Guru's

 

Approaches to military airfields normally uses IAF's and FAF's (Initial and Final Approach Fixes). These are points that only have Lat/Lon indications. I know, normally you fly these points using nearby VOR/TACAN with range and bearing. It is also handy if you only know a lat/lon of a certain target.

 

I like to make a page in which i can enter a lat/lon into a scratchpad and via a press on the enter button insert it into the active FS2004 flightplan (.pln) or send it directly to the NAV1/2 or ADF gauge to fly to the give lat/lon.

 

1. Is this possible (the SDK GPS entrees speeks of FlightPlanNewLongitude/Latitude) to do this, and especially how?

 

Many thanks in advance.

 

P.S. I read some entries in this forum about inserting ICAO id's but none about input in lat/lon.

 

Greetings Slammer

Hi,

 

Download the "propwash" gps guide.

 

This is one of his examples to add a new waypoint by defining coordinates

 

51.5388 (>C:fs9gps:FlightPlanNewWaypointLatitude, degrees)

7.3170 (>C:fs9gps:FlightPlanNewWaypointLongitude, degrees)

1 (>C:fs9gps:FlightPlanAddWaypoint) (1 is pos in waypoint index)

 

or direct to

 

Direct To a custom, user-defined lat and lon:

 

37.8487 (>C:fs9gps:FlightPlanNewWaypointLatitude, degrees)

-97.8157 (>C:fs9gps:FlightPlanNewWaypointLongitude, degrees)

(>C:fs9gps:FlightPlanDirectToDestination)

L:Vars could be substituted for the numbers, of course:

(L:DTO_Lat, degrees) (>@c:FlightPlanNewWaypointLatitude, degrees)

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Here's the link to the gps guidebook that Jan refers to in case you have not already found it:

 

http://www.robbiemce...m/blackbox/?gps

 

Page 121.

 

And be sure to read all forum posts by Jan - he's a gps and xml expert.

 

Cheers,

 

Bob

  • Author

Thanks Jan and Bob for your excellent help and for your tutorial, starting tomorrow.

 

Super!

 

Slammer

Jan

 

It just seems that N or S and E or W needs to be entered as a part of your new Lat/Long

entries ?

 

Cheers

Karol

  • Author

Karol,

 

I thought about that to and figure out that it can be solved making two switches (enum) to distinguis N and S and one for E and W. I also need to change the deg/min/sec into digital lat/lon format. Next to that i need to change the keyboard as well to address N, E, S, W functions. We'll see how it turns out. I am very glad with you guys thinking with me.

 

Greetz Slammer

Karol,

 

I thought about that to and figure out that it can be solved making two switches (enum) to distinguis N and S and one for E and W. I also need to change the deg/min/sec into digital lat/lon format. Next to that i need to change the keyboard as well to address N, E, S, W functions. We'll see how it turns out. I am very glad with you guys thinking with me.

 

Greetz Slammer

 

Right, that's basically correct. The lat and lon definition for NewWaypoint must be in decimal format degrees or radians. Usually, degrees are easier to think about in this situation. As you know, the number cannot include "N", "S", "E", or "W", so latitudes North are positive, latitudes South are negative, longitudes East are positive and longitudes West are negative. I suggest at least 4 decimal points for accuracy.

 

Bob

Hi,

 

Degrees + minutes/60 + seconds/3600 = Decimal Degrees

 

ex.: N38 + 53/60 + 55/3600 = 38.89861

 

So make your macros and L:Var's.

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

Gents,

 

For assigning N, E, S, W via the keyboard, i've encountered one - probably - small problem i can't get resolved by myself.

 

The problem is the following, and i hope you will understand....

 

What i'm designing is one scratchpad (in my 32 pages Data Entry Display) containing on the first row LAT N or LAT S (ICP-SEC,enum) 0== followed by the coordinate (ICP-SEC,enum) 1==, second row LAT E or LAT S (ICP-SEC,enum) 2== followed by the coordinate (ICP-SEC,enum) 3==. This is done via (ICP-SEC,enum) and has 4 positions (0,1,2,3)

 

Normally all the keyboard functions 0-9 are accessable, since 4 buttons (2, 6, 8 and 4) represent N, E, S, and W i only want to access those 4 buttons (which i can program separetly) when i'm at the page where i want to add the Direct To or AddNewWaypoint.

 

I'm able to do this via the following <Visible> statement and it works!

 

<!-- ********* 0 Digit **********-->
<Area Left="168" Right="198" Top="151" Bottom="171">
<Visible>(L:ICP-MODE, enum) 7== (L:ICP-STPT, enum) 1== (L:ICP-SEQ, enum) 0!=</Visible>
<Cursor Type="Hand"/>
<Click>
4(>L:ICP-MODE, enum) if 12 (>L:ICP-LIST,enum)  els @Increase(0)
</Click>
</Area>

 

This is just a snippet of the code it is an example, buttons 1-9 are the same

 

The problem is: it also has to work if (L:ICP-MODE, enum) 7== (L:ICP-STPT, enum) 1== (L:ICP-SEQ, enum) 2!=

 

I've tried it with the following code and only works if (ICP-SEQ, enum) 0!=

 

<Visible>(L:ICP-MODE, enum) 7== (L:ICP-STPT, enum) 1== (L:ICP-SEQ, enum) 0!= 2!= ||</Visible>

 

but does not work, please help

 

Thanx....in advance

  • Author

BTW this is how the keyboard code for the 4 buttons look like....

 

<!-- ********* LATTITUDE/LONGITUDE N,E,S,W ENTRY KEYBOARD **********-->
<!-- ********* 2 Digit **********-->
<Area Left="86" Right="116" Top="63" Bottom="83">
<Visible>(L:ICP-MODE, enum) 7== (L:ICP-STPT, enum) 1== &(L:ICP-SEQ, enum) 0==&&</Visible>
<Cursor Type="Hand"/>
<Click>
(L:LAT-E, bool) ! (>L:LAT-E, bool) 1 (>L:ICP-SEC, enum)
</Click>
</Area>
<!-- ********* 4 Digit **********-->
<Area Left="46" Right="76" Top="105" Bottom="125">
<Visible>(L:ICP-MODE, enum) 7== (L:ICP-STPT, enum) 1== &(L:ICP-SEQ, enum) 2==&&</Visible>
<Cursor Type="Hand"/>
<Click>
(L:LAT-E, bool) ! (>L:LAT-E, bool) 3 (>L:ICP-SEC, enum)
</Click>
</Area>
<!-- ********* 6 Digit **********-->
<Area Left="126" Right="156" Top="105" Bottom="125">
<Visible>(L:ICP-MODE, enum) 7== (L:ICP-STPT, enum) 1== &(L:ICP-SEQ, enum) 2==&&</Visible>
<Cursor Type="Hand"/>
<Click>
(L:LAT-E, bool) ! (>L:LAT-E, bool) 1 (>L:ICP-SEC, enum)
</Click>
</Area>
<!-- ********* 8 Digit **********-->
<Area Left="86" Right="116" Top="151" Bottom="171">
<Visible>(L:ICP-MODE, enum) 7== (L:ICP-STPT, enum) 1== &(L:ICP-SEQ, enum) 0==&&</Visible>
<Cursor Type="Hand"/>
<Click>
(L:LAT-S, bool) ! (>L:LAT-S, bool) 3 (>L:ICP-SEC, enum)
</Click>
</Area>

Hi,

 

Try:

 

 

<Visible>(L:ICP-MODE, enum) 7==(L:ICP-STPT, enum) 1== |(L:ICP-SEQ, enum) 0!= |</Visible>

 

Jan

 

 

 

"Beatus ille qui procul negotiis..."

BTW this is how the keyboard code for the 4 buttons look like....

 

<!-- ********* 8 Digit **********-->
<Area Left="86" Right="116" Top="151" Bottom="171">
<Visible>(L:ICP-MODE, enum) 7== (L:ICP-STPT, enum) 1== &(L:ICP-SEQ, enum) 0==&&</Visible>
<Cursor Type="Hand"/>
<Click>
(L:LAT-S, bool) ! (>L:LAT-S, bool) 3 (>L:ICP-SEC, enum)
</Click>
</Area>

 

XML Syntax - don't forget to add a space between the number and the Operator. For example, 7== should be 7 ==

0==&& should be 0 == && or 0 == and

 

Instead of (L:ICP-STPT, enum) 1== & , do you want (L:ICP-STPT, enum) 1 == && ?

 

Lastly, if you ever start using Blackbox to help debug XML, get into the habit of using underscore rather than dash (keeps the BB parser happy): (L:ICP_STPT, enum)

 

Bob

  • Moderator

There seems to be a spate of folks lately who don't seem to understand that a blank space is a critical XML "character"... :Idea:

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

my fault, stupid copying!

and small font

should be:

 

<Visible>
(L:ICP-MODE, enum) 7 ==
(L:ICP-STPT, enum) 1 == |
(L:ICP-SEQ, enum)  0 != |
</Visible>

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

Gents,

 

Thanx for your help, but i'm still having problems to address the keyboard functions that i can't get fixed.

 

<!-- ********* 0 Digit **********-->
<Area Left="168" Right="198" Top="151" Bottom="171">
<Visible>(L:ICP-MODE, enum) 7 == (L:ICP-STPT, enum) 1 == (L:ICP-SEQ, enum) 0 != </Visible>
<Cursor Type="Hand"/>
<Click>
4(>L:ICP-MODE, enum) if 12 (>L:ICP-LIST,enum)  els @Increase(0)
</Click>
</Area>

 

This code omits the zero button to be active when (L:ICP-SEQ, enum) 0 !=

 

What i want is that the code omits (not visible) the zero button if (L:ICP-SEQ, enum) is 0 or 2 but active (visible) when (L:ICP-SEQ, enum) is 1 and 3

 

How to do this?

 

Thanx in advance

 

Slammer

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.