CVS: source/src/Navaids navrecord.cxx, 1.13, 1.14 navrecord.hxx, 1.23, 1.24

James Turner <[email protected]>
Newsgroups gmane.games.flightgear.cvc
Message-ID <[email protected]>
Update of /var/cvs/FlightGear-0.9/source/src/Navaids
In directory baron.flightgear.org:/tmp/cvs-serv24394/src/Navaids

Modified Files:
	navrecord.cxx navrecord.hxx 
Log Message:
MapWidget for the GUI, initial commit.


Index: navrecord.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Navaids/navrecord.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- navrecord.cxx	19 Dec 2009 17:55:22 -0000	1.13
+++ navrecord.cxx	27 Mar 2010 17:01:12 -0000	1.14
@@ -181,6 +181,38 @@
   }
 }
 
+double FGNavRecord::localizerWidth() const
+{
+  if (!mRunway) {
+    return 6.0;
+  }
+  
+  SGVec3d thresholdCart(SGVec3d::fromGeod(mRunway->threshold()));
+  double axisLength = dist(cart(), thresholdCart);
+  double landingLength = dist(thresholdCart, SGVec3d::fromGeod(mRunway->end()));
+  
+// Reference: http://dcaa.slv.dk:8000/icaodocs/
+// ICAO standard width at threshold is 210 m = 689 feet = approx 700 feet.
+// ICAO 3.1.1 half course = DDM = 0.0775
+// ICAO 3.1.3.7.1 Sensitivity 0.00145 DDM/m at threshold
+//  implies peg-to-peg of 214 m ... we will stick with 210.
+// ICAO 3.1.3.7.1 "Course sector angle shall not exceed 6 degrees."
+              
+// Very short runway:  less than 1200 m (4000 ft) landing length:
+  if (landingLength < 1200.0) {
+// ICAO fudges localizer sensitivity for very short runways.
+// This produces a non-monotonic sensitivity-versus length relation.
+    axisLength += 1050.0;
+  }
+
+// Example: very short: San Diego   KMYF (Montgomery Field) ILS RWY 28R
+// Example: short:      Tom's River KMJX (Robert J. Miller) ILS RWY 6
+// Example: very long:  Denver      KDEN (Denver)           ILS RWY 16R
+  double raw_width = 210.0 / axisLength * SGD_RADIANS_TO_DEGREES;
+  return raw_width < 6.0? raw_width : 6.0;
+
+}
+
 FGTACANRecord::FGTACANRecord(void) :
     channel(""),
     freq(0)

Index: navrecord.hxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Navaids/navrecord.hxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- navrecord.hxx	30 Aug 2009 17:13:54 -0000	1.23
+++ navrecord.hxx	27 Mar 2010 17:01:45 -0000	1.24
@@ -96,6 +96,13 @@
    * Retrieve the runway this navaid is associated with (for ILS/LOC/GS)
    */
   FGRunway* runway() const { return mRunway; }
+  
+  /**
+   * return the localizer width, in degrees
+   * computation is based up ICAO stdandard width at the runway threshold
+   * see implementation for further details.
+   */
+  double localizerWidth() const;
 };
 
 class FGTACANRecord : public SGReferenced {


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.