[Opengc-devel] nav display status
Status: Pre-Alpha
Brought to you by:
madmartigan
From: Damion S. <be...@cs...> - 2003-05-07 18:37:31
|
Hi, A quick update as to where things are with the nav display (which has been a thorn in my side for quite some time)... It works! (sort of) I made a simple test gauge that only displays VORs, but it is in principle fairly simple to go ahead and write readers for the other types of objects displayed in ND. It will likely be some time before a feature complete ND is available, but full "moving map" functionality should be approximately 2-3 weeks away. I have designed the framework to hopefully be relatively generic, so making a type-specific ND will not involve rewriting any of the fundamental nav code. A few specifics: 1) I decided to go with Robin Peel's nav database, which is used by X-Plane and Flightgear (specifically, the X-Plane version of this database). It includes airports, radio nav beacons, airways, and intersections. He follows the DAFIF cycle, making it easy to get up-to-date information with minimal effort. 2) Please handle the CVS repository with care - I have been making fairly substantial changes, and not everything is stable just yet. As of last night it builds on both Mac and Windows, but you will have to manually edit ogcNavDatabase.cpp to point it at the right nav path - it will be updated to respect the nav path specified in opengc.ini in the near future, but there is a technical problem related to file parsing that needs to be sorted out. There is a bug (probably pointer related) that causes a segfault upon exiting OpenGC, which I still have to sort out. 3) The problem of mapping a spherical/ellipsoidal earth onto a flat plane is not trivial. The current implementation does a Mercator projection of the lat/lon coordinates of each geographic object and uses these cached values along with a real-time projection of the aircraft lat/lon to produce a rectangular map. This works surprisingly well, and is quite fast since it becomes easy to apply a visibility constraint during rendering and only render the objects actually visible on the map. I tried flying around my home airport (KPIT) at approximately 40 degrees north, and the Mercator distortion was minimal. The main advantage of a Mercator projection is of course the preservation of absolute heading relative to true north, but the coordinate conversion process renders it useless as you approach the poles. I've toyed with the idea of doing a local real-time mercator projection (i.e. centered around the current aircraft location rather than the intersection of the equator and prime meridian) but it's not clear to me what the performance hit would be versus the cached implementation currently in use. In any case, do any of you know how this is handled in the real world? There are of course other projections available, some of which I have the math for and some which I don't. On the scale that navigation occurs (as distinct from flight planning) it's mostly safe to assume that the world is flat, but I'd like to have a reasonably correct implementation. Cheers, -Damion- --------- Damion Shelton Carnegie Mellon University, Robotics Institute A408-o Newell Simon Hall 412.268.3866 (office) 412.818.8829 (cell) http://www.cs.cmu.edu/~beowulf --------- If you ever crawl inside an old hollow log and go to sleep, and while you're in there some guys come and seal up both ends and then put it on a truck and take it to another city, boy, I don't know what to tell you. |