Hi,

David Megginson schrieb:
On 09/03/06, Ralf Gerlich <[EMAIL PROTECTED]> wrote:


The problem may be that Robin changed the nav.dat format to contain two
DME-types instead of only one (http://x-plane.org/home/robinp/Nav810.htm)

There's no difference between the types except their type number and the
fact that for one the frequency is displayed in X-Plane's maps while for
the other it is not.


Thanks, Ralf -- that turned out to be the problem.  It looks like
Robin is using type 12 for a DME colocated with an ILS, and type 13
for a completely independent DME.  I just checked in a small patch to
fix the problem.

I have found two additional references to type 12 in src/Navaids/navlist.cxx which might have to be fixed. Somebody knowing that code better than me should crosscheck, however. Find patch attached.

Cheers,
Ralf
Index: src/Navaids/navlist.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Navaids/navlist.cxx,v
retrieving revision 1.16
diff -u -r1.16 navlist.cxx
--- src/Navaids/navlist.cxx	21 Feb 2006 01:19:37 -0000	1.16
+++ src/Navaids/navlist.cxx	10 Mar 2006 15:14:14 -0000
@@ -300,7 +300,8 @@
         // the closest station.)
 	if ( d2 < min_dist &&
              (stations[i]->get_type() == 4 || stations[i]->get_type() == 5 ||
-              stations[i]->get_type() == 6 || stations[i]->get_type() == 12) )
+              stations[i]->get_type() == 6 || stations[i]->get_type() == 12 ||
+	      stations[i]->get_type() == 13) )
         {
             double hdg_deg = 0.0;
             if ( stations[i]->get_type() == 4 || stations[i]->get_type() == 5 ){
@@ -308,7 +309,8 @@
             } else if ( stations[i]->get_type() == 6 ) {
                 int tmp = (int)(stations[i]->get_multiuse() / 1000.0);
                 hdg_deg = stations[i]->get_multiuse() - (tmp * 1000);
-            } else if ( stations[i]->get_type() == 12 ) {
+            } else if ( stations[i]->get_type() == 12 ||
+			stations[i]->get_type() == 13) {
                 // oops, Robin's data format doesn't give us the
                 // needed information to compute a heading for a DME
                 // transmitter.  FIXME Robin!

Reply via email to