Aaron Wilson wrote:

I am planing on developing a HUD instrument to display a virtual outline of the active runway on the HUD. Is there any developer(s) working on this task? If not, can anyone tell me how I can get the aircraft's velocity vector and runway vector in Cartesian coordinates.

Hi Aaron,

Sounds like a fun project. :-) I'm not aware that any one else is doing anything like this.

simgear/math/sg_geodesy.hxx has routines for converting from geodetic lon/lat/elev to earth centered cartesian coordinates. What I've done in the past is to use spherical or wgs84 routines to calculate the corner points of the runway(s) and then convert the resulting lon/lat into cartesian coordinates. This makes things much easier "conceptually", but perhaps is not the most efficient approach "computationally."

In the FG core code, there is an abs_view_pos vector that gives you the earth centered cartesian coordinates of your view point. I believe we also have view direction in the same cartesian coordiante system.

I don't know if we have the aircraft's velocity vector directly, but I'm sure you could compute it, or you could estimate it by taking cart_pos(n) - cart_pos(n-1)

Once you have all that, it's "simply" :-) a matter of getting your view parameters set up correctly and dumping your runway verticies/lines into the opengl pipeline.

Do you plan to account for sloping or hilly runways? These are found both in the real world and in FG ... and they do sometimes make life a little more difficult than we'd like. If you start fiddling with sloped runways, you might want to consider some sort of "offline" process to create your runway objects with the proper slope/elevation across their surface then store them in some sort of database, rather than trying to create them on the fly.

I suppose the accuracy that you need for drawing your hud runways depends largely on the accuracy of your sensors, and the tolerances within which you need to fly the aircraft. If you are planning to fly all the way to touchdown with zero visibility, then you probably need to go the extra mile and account for runway slope.



Curtis Olson        http://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:        2f585eeea02e2c79d7b1d8c4963bae2d

_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to