]> git.mxchange.org Git - flightgear.git/blobdiff - utils/GPSsmooth/UGear.hxx
Allow setting of NED velocities.
[flightgear.git] / utils / GPSsmooth / UGear.hxx
index 67983c7b92a191a7c000f1426a6665a86aec5f75..ef35d0d18026ac446ad6b9100f11111cd972daa6 100644 (file)
 #include <simgear/io/iochannel.hxx>
 #include <simgear/serial/serial.hxx>
 
-SG_USING_STD(cout);
-SG_USING_STD(endl);
-SG_USING_STD(string);
-SG_USING_STD(vector);
+using std::cout;
+using std::endl;
+using std::string;
+using std::vector;
 
 
 enum ugPacketType {
@@ -46,7 +46,7 @@ struct gps {
    double lat,lon,alt;          /* gps position          */
    double ve,vn,vd;             /* gps velocity          */
    double ITOW;
-   uint64_t err_type;             /* error type            */
+   uint64_t err_type;           /* error type            */
 };
 
 struct nav {
@@ -59,22 +59,26 @@ struct nav {
 
 struct servo {
    double time;
-   uint64_t chn[8];
+   uint16_t chn[8];
    uint64_t status;
 };
 
 struct health {
     double time;
-    float volts_raw;            /* raw volt reading */
-    float volts;                /* filtered volts */
-    uint32_t est_seconds;       /* estimated useful seconds remaining */
-    uint32_t loadavg;            /* system "1 minute" load average */
-    uint32_t ahrs_hz;            /* actual ahrs loop hz */
-    uint32_t nav_hz;             /* actual nav loop hz */
+    double target_roll_deg;     /* AP target roll angle */
+    double target_heading_deg;  /* AP target heading angle */
+    double target_pitch_deg;    /* AP target pitch angle */
+    double target_climb_fps;    /* AP target climb rate */
+    double target_altitude_ft;  /* AP target altitude */
+    uint64_t command_sequence;  /* highest received command sequence num */
+    uint64_t target_waypoint;   /* index of current waypoint target */
+    uint64_t loadavg;           /* system "1 minute" load average */
+    uint64_t ahrs_hz;           /* actual ahrs loop hz */
+    uint64_t nav_hz;            /* actual nav loop hz */
 };
 
 // Manage a saved ugear log (track file)
-class UGEARTrack {
+class UGTrack {
 
 private:
 
@@ -96,8 +100,8 @@ private:
 
 public:
 
-    UGEARTrack();
-    ~UGEARTrack();
+    UGTrack();
+    ~UGTrack();
 
     // read/parse the next message from the specified data stream,
     // returns id # if a valid message found.