Sign in to follow this  
phjvh

Line to Navaid HSI

Recommended Posts

Hi all Made some code for HSI, line to navaid (737-NG etc). (A:NAV1 DME, nmiles) 3.4 * (L:HSI RANGE, number) 80 / / (A:NAV1 RADIAL, radians) (A:GPS GROUND MAGNETIC TRACK, radians) - (A:NAV1 DME, nmiles) 3.4 * related to zoom setting 1250 (L:HSI RANGE, number) 80 related to range setting 10 20 40 80 etc. This works great on all VORs with dme but what to do for non dme VORs and NDBs

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Paul,Never tried, but if (A:NAV1 DME, nmiles) returns 0, you can try by retrieving (A:HSI STATION IDENT, string); then searching fs9gps for that ident (taking care of duplicates), once found retrieve its Lat/Lon and then a simple fs9gps "geocalc" call using those values and your a/c Lat/Lon position should give you the distance.Tom

Share this post


Link to post
Share on other sites

Hi Tom I may be able to retrieve the lat & long but the geocalc maths goes right over my head!! Paul

Share this post


Link to post
Share on other sites

Hi Paul,Geocalc is a function embedded in fs9gps. It can be used in something like:(@c is fs9gps)'Ident' (>@c:IcaoSearchEnterChar) (* Navaid ident is send to gps search engine *)if found = (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO)and in the next gauge cycle, you get (@c:FacilityLatitude,degrees) (>@c:GeoCalcLatitude2,degrees)(@c:FacilityLongitude,degrees) (>@c:GeoCalcLongitude2,degrees) (A: Plane (or gps) Latitude,degrees) (>@c:GeoCalcLatitude1,degrees) (A: Plane (or gps) Longitude,degrees) (>@c:GeoCalcLongitude1,degrees) and (@c:GeoCalcDistance,nmiles) will give you the distance.Hope this helpsTom

Share this post


Link to post
Share on other sites

Hi Tom Well you have lowered the altitude on this Geocalc stuff. I think I can get this working now. Paul

Share this post


Link to post
Share on other sites

Hi,Can you give some more info about the:(A:NAV1 DME, nmiles) 3.4 * (L:HSI RANGE, number) 80 / / I use a similar one, but cannot get the scale very accurate. Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan I use (L:HSI RANGE, number) 1250 * in the GPS map draw. Started with (A:NAV1 DME, nmiles) 4 * 4 x 80 = 320 4 x 320 = 1280 near zoom size and adjusted it down to fit. You may have to play around with the numbers for different HSI screen sizes. Paul

Share this post


Link to post
Share on other sites

Hi,Thanks, I see.I use 1853, 1 Nm, to make it easier, but also need a lot of cifering.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this