to convey the radio stack settings.
#include <simgear/timing/timestamp.hxx>
#include <Network/protocol.hxx>
-#include <Network/native.hxx>
+#include <Network/atlas.hxx>
#include <Network/garmin.hxx>
+#include <Network/joyclient.hxx>
+#include <Network/native.hxx>
#include <Network/nmea.hxx>
#include <Network/props.hxx>
#include <Network/pve.hxx>
#include <Network/ray.hxx>
#include <Network/rul.hxx>
-#include <Network/joyclient.hxx>
#include "globals.hxx"
FG_LOG( FG_IO, FG_INFO, " protocol = " << protocol );
FGProtocol *io;
- if ( protocol == "native" ) {
- FGNative *native = new FGNative;
- io = native;
+ if ( protocol == "atlas" ) {
+ FGAtlas *atlas = new FGAtlas;
+ io = atlas;
} else if ( protocol == "garmin" ) {
FGGarmin *garmin = new FGGarmin;
io = garmin;
+ } else if ( protocol == "joyclient" ) {
+ FGJoyClient *joyclient = new FGJoyClient;
+ io = joyclient;
+ } else if ( protocol == "native" ) {
+ FGNative *native = new FGNative;
+ io = native;
} else if ( protocol == "nmea" ) {
FGNMEA *nmea = new FGNMEA;
io = nmea;
} else if ( protocol == "rul" ) {
FGRUL *rul = new FGRUL;
io = rul;
- } else if ( protocol == "joyclient" ) {
- FGJoyClient *joyclient = new FGJoyClient;
- io = joyclient;
} else {
return NULL;
}
fgSetString("/sim/hud/frame-stat-type", "tris");
} else if ( arg == "--hud-culled" ) {
fgSetString("/sim/hud/frame-stat-type", "culled");
+ } else if ( arg.find( "--atlas=" ) != string::npos ) {
+ parse_channel( "atlas", arg.substr(8) );
} else if ( arg.find( "--native=" ) != string::npos ) {
parse_channel( "native", arg.substr(9) );
} else if ( arg.find( "--garmin=" ) != string::npos ) {
FG_LOG( FG_IO, FG_INFO, " altitude = " << altitude );
+ } else if ( sentence == "PATLA" ) {
+ // nav1 freq
+ end = msg.find(",", begin);
+ if ( end == string::npos ) {
+ return false;
+ }
+
+ string nav1_freq = msg.substr(begin, end - begin);
+ begin = end + 1;
+ FG_LOG( FG_IO, FG_INFO, " nav1_freq = " << nav1_freq );
+
+ // nav1 selected radial
+ end = msg.find(",", begin);
+ if ( end == string::npos ) {
+ return false;
+ }
+
+ string nav1_rad = msg.substr(begin, end - begin);
+ begin = end + 1;
+ FG_LOG( FG_IO, FG_INFO, " nav1_rad = " << nav1_rad );
+
+ // nav2 freq
+ end = msg.find(",", begin);
+ if ( end == string::npos ) {
+ return false;
+ }
+
+ string nav2_freq = msg.substr(begin, end - begin);
+ begin = end + 1;
+ FG_LOG( FG_IO, FG_INFO, " nav2_freq = " << nav2_freq );
+
+ // nav2 selected radial
+ end = msg.find(",", begin);
+ if ( end == string::npos ) {
+ return false;
+ }
+
+ string nav2_rad = msg.substr(begin, end - begin);
+ begin = end + 1;
+ FG_LOG( FG_IO, FG_INFO, " nav2_rad = " << nav2_rad );
+
+ // adf freq
+ end = msg.find("*", begin);
+ if ( end == string::npos ) {
+ return false;
+ }
+
+ string adf_freq = msg.substr(begin, end - begin);
+ begin = end + 1;
+ FG_LOG( FG_IO, FG_INFO, " adf_freq = " << adf_freq );
}
// printf("%.8f %.8f\n", lon, lat);