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.

string question

Featured Replies

i would like to have a conditional string; N %((G:Var1))%!6.2f!where the (G:Var1) is a latitude coordinate.you will notice the "N" in the start of my string rather then have a negative number i would like to display a positive number with the "N" and "S" for a negative (G:Var1). i have seen and used conditions on the back side of the string, but i would like to know how to do it on the preface of the string.i could cheat and use 2 strings, 1 on top of the other, or 2 different string choices sorted by a but i would like to know the "right way".

Ridgell,This is an easy one ;-)%((G:Var1) 0 >= if{ 'N' } els{ 'S' })%!s! %((G:Var1))%!6.2f!I would recommned to use LVars instead of GVars. GVars reset to zero whenever screen mode is changed, and don't support unit conversions.Tom

  • Author

Hi, Mustard after meal, dutch proverb..I achieve that while clicking with the mouse on W or S (irs keypad), which gives a negative value for (L:set coordinate lat,number) and (L:set coordinate lon,number).Then in a macro automatically the right coordinates are given:%((L:set coordinate lat,number) d 0 >=)%{if}N%{else}S%{end}%( abs d flr )%!02d!

Jan

 

 

 

"Beatus ille qui procul negotiis..."

ah, i know how to change from degrees,to h,m,s and back again,(with code) i have had to deal with numbers on the right of the decimal before. the stuff you guys glean from... i guess the MS GPS gauge, cause i never saw it in the SDK, if i wasn't so excited about learning a new trick, i would lament all the holes i have dug by hand! G:Vars reset to zero when the screen mode changes? never knew that!oh yea....for some of us, there is nothing easy about strings!

%((G:Var1) 0 >= if{ 'N' } els{ 'S' })%!s! %((G:Var1))%!6.2f!i need one more tweek... if G:Var1 is negative it needs -1 * if positive then leave it positive....plz

%((G:Var1) 0 >= if{ 'N' } els{ 'S' })%!s! %((G:Var1) abs)%!6.2f!:-)Tom

  • Author

Hi,Just curiosity, how do you guys put in the values for coordinates?Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

do you how are they physicaly imput? or how are they "put in" as in used?i am useing a set of dials, one for degrees,one for minutes.they are plugged in just as posted, with the exception of (@c:GeoCalcBearing,radians) (>L:FromToBearing,radians)where it was better for me to use radians.

Jan,Do you mean which format I use for displaying coordinates? Because for any call to the gpsdll functions, degrees with fractions must be used.Tom

  • Author

Tom,I mean how do you get the dialed numbers transformed to coordinates.I use the mouse to click in the IRS keypad of the 767 for:1,2....0; N,S,E and W; ENT an CLR.Then via a complicated update section the numbers become 100% accurate coordinates.They are then visible in the irs window.If i want, i can store coordinates in L:Var's during the flight and let the plane automatically fly the route along them.(That is about what i did in fs2002, but since the new gps not anymore; was a lot of clicling to construct a SID or STAR!)Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Jan,I use a similar approach for an INS project I'm working on. Click on the keypad and transform that into a valid coordinate's value. With a bit of macros' help, it becomes an easy task. I also use arrays of LVars to store flightplan/user input coordinates and fly the route via LNAV. Tom

yes i am basically storing the data as degrees with decimals.the input is degreed decimals but is displayd and appears to be entered as hours/minutes/seconds i originally was using the d/m/s data as the range of inputs lat/lon was limited. handling the roll overs from seconds to minutes and to degrees was a nightmare, and after writting a bunch of code i saw the folly...easier to keep it in base 100 and do the simple conversion for display. this allows for negative western and southern coordinates to be dealt with in a straight away fashion so... now the INS is global. i am displaying d/m/s because it seemed eaasier to obtain that kind of coordinates. tom..? i did not know that gpsdll was limited to degreed dcimals; i put in lat and lon in decimals but asked it to return radians for bearing .... and it does! (@c:GeoCalcBearing,radians) (>L:FromToBearing,radians)the thing is wicked acurate, you can hit a tower if you have the co-ords...i am working on dumbing it up some now...its to good! jan; not to be condisending...but you are often specific with your answers so...though the method is simple (and you forgot more about xml then i ever knew);@TDRS (L:latitude,enum) 1 + (>L:latitude,enum) (L:latitude,enum) 90 > if{ (L:latitude,enum) 180 - (>L:latitude,enum) } @BDRS 1 (>G:Var1) (G:Var1) 0.01 * (>G:Var1) (L:latitude,enum) (G:Var1) + (>L:latitude,enum) TDRS is a macro that handles the animation 'top dial right side'BDRS 'bottom dial right side'there is also a left side that subtracts the result is just like tuning a radio2 knobs 1 hi range 1 low range

  • Author

Hi,Also used that, but find the keyboard now more realistic.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.