#ifndef _FG_UGEAR_II_HXX #define _FG_UGEAR_II_HXX #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include SG_USING_STD(cout); SG_USING_STD(endl); SG_USING_STD(string); SG_USING_STD(vector); enum ugPacketType { GPS_PACKET = 0, IMU_PACKET = 1, NAV_PACKET = 2, SERVO_PACKET = 3 }; struct imu { double p,q,r; /* angular velocities */ double ax,ay,az; /* acceleration */ double hx,hy,hz; /* magnetic field */ double Ps,Pt; /* static/pitot pressure */ // double Tx,Ty,Tz; /* temperature */ double phi,the,psi; /* attitudes */ short err_type; /* error type */ double time; }; struct gps { double lat,lon,alt; /* gps position */ double ve,vn,vd; /* gps velocity */ uint16_t ITOW; short err_type; /* error type */ double time; }; struct nav { double lat,lon,alt; double ve,vn,vd; // float t; short err_type; double time; }; struct servo { uint16_t chn[8]; uint8_t status; double time; }; // Manage a saved ugear log (track file) class UGEARTrack { private: vector gps_data; vector imu_data; vector