Results 1 to 9 of 9

Thread: VOR position

  1. #1

    Default VOR position

    Hello,
    I would appreciate if somebody could tell me how to get in C variables the latitude and longitude position of a VOR selected by its frequency in NAV1 or NAV2, as well as an ADF beacon position.
    The object is to calculate the distance using the GPS coordinates and the great circle formula, and to be able to create a virtual waypoint associated to a beacon.
    Thanks
    Jean-Pierre

  2. #2

    Default RE: VOR position

    If coding for FSX, you can possibly use these new token variables:

    GPS_WP_NEXT_LAT,
    GPS_WP_NEXT_LON,
    GPS_WP_NEXT_ALT,

    If coding for FS9, you could access the same variables directly from the XML tokens, using the technique described in a sticky post at the top of this forum.

    Oh wait... I just reread your question more carefully. I'm not at all sure that is even possible, unless the tuned VOR happens to be the GPS_WP_NEXT_xxx ... :(
    Bill Leaming
    Gauge Programming - 3d Modeling Eaglesoft & Military Visualizations
    Flightsim.com Panels & Gauges Forum Moderator
    Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - GeForce GTX550Ti 1GB - Win7 64bit Home Premium
    Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional
    Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium
    NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

  3. #3

    Default RE: VOR position

    You are right, the variables you mention are OK if I have a flight plan, then a next waypoint, but not in my case when I use a RMI for instance.

    I need to find the coordinates of a beacon defined by its frequency.

    Jean-Pierre

  4. #4
    Join Date
    Nov 2005
    Location
    San Isidro, Buenos Aires, Argentina.
    Posts
    26

    Default RE: VOR position

    Hi,

    Using XML GeoCalc functions you can determine the lat/lon of a tuned facility (VOR/DME/ILS):

    First, register your a/c lat/lon position:
    Then, using AVars, register the bearing to the facility, and calculate the Azimuth.
    After that, notice the distance to the facility in nmiles (or feet).
    You can find the resulting LatLon reading GeoCalcExtrapolatedLat/Lon,
    see this thread:

    http://forums.avsim.net/dcboard.php?...id=33879&page=

    Doing own's lat/lon calculations (great circle) will give you positional differences because FS uses Geocalc functions for its own internal calcs, the same ones I'm speaking of. :-)

    Tom




  5. #5

    Default RE: VOR position

    Hi Tom,
    Soory for the late answer, I was out of home for a while.
    My problem is not to find azimut and distance fro the VOR, but to create a target referenced by azimut and distance from a vald beacon. So, I need to read the coordinates of the beacon co create a new virtual beacon (the target).

    Jean-Pierre

  6. #6
    Join Date
    Nov 2005
    Location
    San Isidro, Buenos Aires, Argentina.
    Posts
    26

    Default RE: VOR position

    Hi Jean Pierre,

    Precisely what I've stated, so here is a pseudocode you can follow

    1) Register Plane latitude and Longitude in vars, for example Lat=40.124 Lon=-75.134

    2) Tune the desired beacon and using the RMI save an instant heading to the beacon (for example Hdg=90 -beware it must be true heading, use magvar var to convert) and instant distance, in nmiles, for example Ndist= 23.453

    3) Doing a GeocalcLat1 with Lat, GeocalcLon1 with Lon, GeocalcAzimuth1 with Hdg and GeocalLenght with Ndist, read the resulting GeocalcExtrapolationLat and GeocalExtrapolationLon, those are the Lat and Lon coordinates of your beacon.

    4) Now replace Plane latitude and longitude with your beacon lat/lon, and repeat step 3, using Hdg and Ndist that you want to apply from the beacon. Then in both GeoCalcExtrapolation you'll have the coordinates of your virtual beacon.

    Tom


  7. #7

    Default RE: VOR position

    Thanks Tom,

    I understand that this is one possibility to do it, but in fact it must be set before flight, and not in flight. It is what is called in french "vecteur additionnel" on military aircrafts like the Mirages and the Super Etendard. And it must work on VOR1, VOR2 and ADF.

    Can you let mee know how you do a GeocalcLat1 with Lat, GeocalcLon1 with Lon, GeocalcAzimuth1 with Hdg and GeocalLenght with Ndist, read the resulting GeocalcExtrapolationLat and GeocalExtrapolationLon, those are the Lat and Lon coordinates of your beacon.

    It's the first time I try to make such a gauge in C.

    Thanks for the help.

    Jean-Pierre
    jp_langer@libello.com

  8. #8
    Join Date
    Nov 2005
    Location
    San Isidro, Buenos Aires, Argentina.
    Posts
    26

    Default RE: VOR position

    Jean-Pierre,

    Well, if it has to be set before flight, then you HAVE to know the id of the beacons that you're going to flyby (for example, ENO could be the id of a VOR, CG one of a NDB, etc). You can search the default gps database using those ids and their latlon come easy; and afterwards you might calculate target vectors using the method I described before.
    Those gps functions, including Geocalc set, are easier to acces through XML code rather than C although there are specific functions in C to retrieve their values; even you can find a pinned topic abouth this right on this forum. But it would require a long explanation and as I don't know your knowledge level in C/XML I wouldn't know how deep to go with my sentences so you can understand the whole thing.


    Tom






  9. #9

    Default RE: VOR position

    Hi Tom,
    Unfortunately I don't know how to program in XML.
    My knowledge in C are quite basic, using FS macros.
    I'll try to improve my C knowledge before attempting to make such a gauge. Once more thanks for the explanations.
    Jean-Pierre

Similar Threads

  1. Wet and in position
    By pilatus96 in forum MSFS Screen Shot Forum
    Replies: 7
    Last Post: 01-27-2006, 08:58 AM
  2. Aircraft Position
    By pilot1 in forum FS2002
    Replies: 4
    Last Post: 09-06-2004, 03:48 AM
  3. Position of aircraft
    By clawless in forum FS98
    Replies: 0
    Last Post: 07-12-2004, 06:42 PM
  4. NDB position changes
    By chwood in forum Airport for Windows Support
    Replies: 2
    Last Post: 04-30-2004, 09:51 AM
  5. Position
    By Fitzwilliam in forum FS2002
    Replies: 4
    Last Post: 02-05-2003, 08:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •