]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/atlas.cxx
Add David Culp's AI model manager code which is derived from David Luff's AI/ATC...
[flightgear.git] / src / Network / atlas.cxx
index 3d15edb947d799da945446a757d15504d223b96d..2df07d557fdd714f4d5accc7e517b5d255f9b445 100644 (file)
@@ -64,7 +64,7 @@ bool FGAtlas::gen_message() {
     // cout << "generating atlas message" << endl;
 
     static SGPropertyNode *adf_freq
-        = fgGetNode("/radios/adf/frequencies/selected-khz", true);
+        = fgGetNode("/radios/kr-87/outputs/selected-khz", true);
 
     char rmc[256], gga[256], patla[256];
     char rmc_sum[10], gga_sum[10], patla_sum[10];
@@ -129,10 +129,10 @@ bool FGAtlas::gen_message() {
     sprintf( gga_sum, "%02X", calc_atlas_cksum(gga) );
 
     sprintf( patla, "PATLA,%.2f,%.1f,%.2f,%.1f,%.0f",
-            current_radiostack->get_nav1_freq(),
-            current_radiostack->get_nav1_sel_radial(),
-            current_radiostack->get_nav2_freq(),
-            current_radiostack->get_nav2_sel_radial(),
+            current_radiostack->get_navcom1()->get_nav_freq(),
+            current_radiostack->get_navcom1()->get_nav_sel_radial(),
+            current_radiostack->get_navcom1()->get_nav_freq(),
+            current_radiostack->get_navcom1()->get_nav_sel_radial(),
             adf_freq->getDoubleValue() );
     sprintf( patla_sum, "%02X", calc_atlas_cksum(patla) );
 
@@ -446,7 +446,7 @@ bool FGAtlas::parse_message() {
            string alt_units = msg.substr(begin, end - begin);
            begin = end + 1;
 
-           if ( alt_units != (string)"F" ) {
+           if ( alt_units != "F" ) {
                altitude *= SG_METER_TO_FEET;
            }