]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/atlas.cxx
Update Mac configure script for new ALUT scheme; support --with-alut-framework.
[flightgear.git] / src / Network / atlas.cxx
index 5e052d42deda0e8322da0ca3bc868f72b20d1d82..f0738a12f208e42ed3ab8009a8b11353c4b3861a 100644 (file)
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/io/iochannel.hxx>
 
 
+
+
 #include <FDM/flight.hxx>
 #include <Main/globals.hxx>
 #include <Main/fg_props.hxx>
@@ -66,11 +71,15 @@ bool FGAtlas::gen_message() {
     // cout << "generating atlas message" << endl;
 
     static SGPropertyNode *adf_freq
-        = fgGetNode("/instrumentation/kr-87/outputs/selected-khz", true);
-    static SGPropertyNode *nav_freq
-        = fgGetNode("/instrumentation/nav/frequencies/selected-mhz", false);
-    static SGPropertyNode *nav_sel_radial
-        = fgGetNode("/instrumentation/van/radials/selected-deg", false);
+        = fgGetNode("/instrumentation/adf/frequencies/selected-khz", true);
+    static SGPropertyNode *nav1_freq
+        = fgGetNode("/instrumentation/nav/frequencies/selected-mhz", true);
+    static SGPropertyNode *nav1_sel_radial
+        = fgGetNode("/instrumentation/nav/radials/selected-deg", true);
+    static SGPropertyNode *nav2_freq
+        = fgGetNode("/instrumentation/nav[1]/frequencies/selected-mhz", true);
+    static SGPropertyNode *nav2_sel_radial
+        = fgGetNode("/instrumentation/nav[1]/radials/selected-deg", true);
 
     char rmc[256], gga[256], patla[256];
     char rmc_sum[10], gga_sum[10], patla_sum[10];
@@ -135,10 +144,10 @@ bool FGAtlas::gen_message() {
     sprintf( gga_sum, "%02X", calc_atlas_cksum(gga) );
 
     sprintf( patla, "PATLA,%.2f,%.1f,%.2f,%.1f,%.0f",
-            nav_freq->getDoubleValue(),
-            nav_sel_radial->getDoubleValue(),
-            nav_freq->getDoubleValue(),
-            nav_sel_radial->getDoubleValue(),
+            nav1_freq->getDoubleValue(),
+            nav1_sel_radial->getDoubleValue(),
+            nav2_freq->getDoubleValue(),
+            nav2_sel_radial->getDoubleValue(),
             adf_freq->getDoubleValue() );
     sprintf( patla_sum, "%02X", calc_atlas_cksum(patla) );