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.

great circle revisited

Featured Replies

Trying to plot a course between 2 sets of coordinates Lat1 = (A:GPS POSITION LAT, radians)Lon1 = (A:GPS POSITION LON, radians)And a point selected by the pilot (lat & lon) Searched through the forum

  • Author
  • Commercial Member

If you're just trying to get the bearing to the second set of coodinates, this should help.(*INPUT: LAT1,LON1,LAT2,LON2*) @1 sin @3 sin * @1 cos @3 cos * @2 @4 - cos * + acos (*INPUT: LAT1,LON1,LAT2,LON2*)pi 2 * @3 sin @1 sin @GC_DISTANCE(@1, @2, @3, @4) s0 cos * - @1 cos l0 sin * / acos @4 @2 - sin 0 < if{ - } els{ + } rddg dnor dgrdIn order to get the bearing, you need the GC distance. So in this set of macros, calling CG_BEARING will automatically get the distance for you. Of course you can also use CG_DISTANCE independently if needed.All inputs and results are in rads. Note that I avoided the 'rnor' function, since it seems to be broken. Instead use rddg dnor dgrd, or skip the dgrd if you want your results in degrees.This is the direct course to the second set of coordinates following a great circle, so if you want to account for wind drift you'll need to plug in the appropriate correction.

Hi Ridgell,I would recommend to use the gps calls as their calcs must be the same used by FS engine to plot course/distance:C:fs9gps...(L:YourLatitudeFrom,degrees) (>@c:GeoCalcLatitude1,degrees) (L:YourLongitudeFrom,degrees) (>@c:GeoCalcLongitude1,degrees) (L:YourLatitudeTo,degrees) (>@c:GeoCalcLatitude2,degrees) (L:YourLongitudeTo,degrees) (>@c:GeoCalcLongitude2,degrees) (@c:GeoCalcBearing,degrees) (>L:FromToBearing,degrees)(@c:GeoCalcDistance,nmiles) (>L:FromToDistance,nmiles)...That's it -no need to manage complex calcs :-)Tom

great moogally boogally!here i was digging away with my hands and you guys show up with a back hoe and a steam shovel. tom trying the gps vesion 1st, *seems easier* (L:YourLatitudeFrom,degrees) would be the (A:GPS POSITION LAT,degrees) and the (L:YourLatitudeTo,degrees) would be the user input latitude,degrees etc?

Hi,Right, i use (A:PLANE LATITUDE,degrees) and (A:PLANE LONGITUDE,degrees) and (@c:GeoCalcBearing,degrees) (A:MAGVAR,degrees) - (>K:HEADING_BUG_SET) Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

yes, it comes 1st in the sdk "position & speed" is before "avionics & gps" but in my forum searching for lat lon and GC route, i came across a post where some was complaining about (A:PLANE LATITUDE,...) because FS was dividing it by something, it was a little over my head, but i switched Vars just in case, but you say it is the same or better, i will take your word.

Ridgell,I prefer to use Plane Latitude because it updates on every cycle instead of GPS Positiom AVar that updates every three cycles. Haven't found any trouble so far. As Jan stated, bearing is a True North reference then you must substract MagVar to obtain magnetic info.Tom

  • Author
  • Commercial Member

Those GPS calcs are a great resource/performance saver, but I only use them in instances where I don't need continuous updates. The slow iteration rate of the GPS calls make for some pretty choppy indications, particularly if there's graphics associated with it.So there's definitely advantages to the sledge-hammer approach (at least in my stuff), but hopefully Ridgell can get by with the GPS calls. They ARE much cheaper if the slower speed is acceptable.

Jon,GeoCalc functions can be called more than once in a gauge, and they return their values immediately, so there is no penalty in their use. Which IS slow is the A:GPS... set of avar's values. That's the reason for me to use Plane Lat/Lon values present and past, combined with the GeoCalc calls to obtain the a/c tracking/bearing on each cycle.Tom

i am attempting to simulate an internal navigation system, one of the 60s-70s types that were gyro driven, the out put will be digital and an RMI/ADF type gauge, speed is not an issue as the course should not experiance rapid change, and the display on the analog gauge has a built in delay, magnetic variation will also not apply as the system is independent of the mag compass. the spin gyros were not accurate to land with, just good enough to get you within eye shot. they could be accurate if you gave them a long enough spin up...we never did! peace time flying for NATO was doled out as Hobbs time and to precious to use sitting on the tarmac.

  • Author
  • Commercial Member

Ah, interesting, Tom! I knew the PLANE LAT/LON responded at the gauge refresh rate, but I foolishly assumed the ALL the GPS calls were similarly gimped. I must have used the GPS LAT/LON last time I tried it. Either that or something else was bottlenecking the result. I'll give it a revisit.

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.