]> git.mxchange.org Git - flightgear.git/commitdiff
Initial support for marker beacons.
authorcurt <curt>
Fri, 16 Mar 2001 23:59:02 +0000 (23:59 +0000)
committercurt <curt>
Fri, 16 Mar 2001 23:59:02 +0000 (23:59 +0000)
FlightGear.dsp
src/Cockpit/radiostack.cxx
src/Cockpit/radiostack.hxx
src/Main/fg_init.cxx

index 77273ffc42974cc500b1579549ee83936088f18e..e551a2f0d75ff29793c95fa9e018629a29aaa943 100644 (file)
@@ -2482,6 +2482,21 @@ SOURCE=.\src\Navaids\ilslist.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=.\src\Navaids\mkrbeacons.cxx\r
+\r
+!IF  "$(CFG)" == "FlightGear - Win32 Release"\r
+\r
+# PROP Intermediate_Dir "Release\Lib_Navaids"\r
+\r
+!ELSEIF  "$(CFG)" == "FlightGear - Win32 Debug"\r
+\r
+# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=.\src\Navaids\navlist.cxx\r
 \r
 !IF  "$(CFG)" == "FlightGear - Win32 Release"\r
index 86e1b80b124dbe2f830f7081794772ed5a885409..7ee37c1418dababf4a77f2a0f804b90ebfe5a8c3 100644 (file)
@@ -26,6 +26,7 @@
 #include <Aircraft/aircraft.hxx>
 #include <Main/bfi.hxx>
 #include <Navaids/ilslist.hxx>
+#include <Navaids/mkrbeacons.hxx>
 #include <Navaids/navlist.hxx>
 #include <Time/event.hxx>
 
@@ -800,6 +801,22 @@ void FGRadioStack::search()
        // cout << "not picking up vor1. :-(" << endl;
     }
 
+    FGBeacon::fgMkrBeacType beacon_type
+       = current_beacons->query( lon * RAD_TO_DEG, lat * RAD_TO_DEG, elev );
+
+    outer_marker = middle_marker = inner_marker = false;
+
+    if ( beacon_type == FGBeacon::OUTER ) {
+       outer_marker = true;
+       cout << "OUTER MARKER" << endl;
+    } else if ( beacon_type == FGBeacon::MIDDLE ) {
+       middle_marker = true;
+       cout << "MIDDLE MARKER" << endl;
+    } else if ( beacon_type == FGBeacon::INNER ) {
+       inner_marker = true;
+       cout << "INNER MARKER" << endl;
+    }
+
     // adf
     if ( current_navlist->query( lon, lat, elev, adf_freq, &nav ) ) {
        char freq[128];
index e0bda36c602f2c8892dd75a0e37d365f6fa2454c..aea29ab70d326eceb2e1a6ac9529e7aeae46089f 100644 (file)
@@ -127,6 +127,10 @@ class FGRadioStack : public FGSubsystem
     double nav2_vol_btn;
     bool nav2_ident_btn;
 
+    bool outer_marker;
+    bool middle_marker;
+    bool inner_marker;
+
     string adf_ident;
     string adf_trans_ident;
     bool adf_valid;
index f2cb1d277d0c450364c06aaa74376b9feec44f00..3f330270e49df3d9638220d8e0fa41c978378a51 100644 (file)
@@ -76,6 +76,7 @@
 #include <Objects/matlib.hxx>
 #include <Navaids/fixlist.hxx>
 #include <Navaids/ilslist.hxx>
+#include <Navaids/mkrbeacons.hxx>
 #include <Navaids/navlist.hxx>
 #include <Scenery/scenery.hxx>
 #include <Scenery/tilemgr.hxx>
@@ -698,7 +699,9 @@ bool fgInitSubsystems( void ) {
     p_nav.append( "Navaids/default.nav" );
     current_navlist->init( p_nav );
 
-    FG_LOG(FG_GENERAL, FG_INFO, "  ILS");
+    FG_LOG(FG_GENERAL, FG_INFO, "  ILS and Marker Beacons");
+    current_beacons = new FGMarkerBeacons;
+    current_beacons->init();
     current_ilslist = new FGILSList;
     FGPath p_ils( globals->get_fg_root() );
     p_ils.append( "Navaids/default.ils" );