from uart1.h in [[http://svn.mikrokopter.de/listing.php?repname=NaviCtrl&path=%2Ftags%2FV0.28i%2F|NaviCtrl code]] (please take a look at SVN for latest version of header files) /!\ ''' New version V2 ''': [[en/SerialCommands/NaviDataStruct_V2|New data structure for Version > 10)]] {{{#!cplusplus numbers=off typedef struct { // only valid for (Version < 10), otherwise use new struct V2 u8 Version; // version of the data structure GPS_Pos_t CurrentPosition; // see ubx.h for details GPS_Pos_t TargetPosition; GPS_PosDev_t TargetPositionDeviation; GPS_Pos_t HomePosition; GPS_PosDev_t HomePositionDeviation; u8 WaypointIndex; // index of current waypoints running from 0 to WaypointNumber-1 u8 WaypointNumber; // number of stored waypoints u8 SatsInUse; // number of satellites used for position solution s16 Altimeter; // hight according to air pressure s16 Variometer; // climb(+) and sink(-) rate u16 FlyingTime; // in seconds u8 UBat; // Battery Voltage in 0.1 Volts u16 GroundSpeed; // speed over ground in cm/s (2D) s16 Heading; // current flight direction in ° as angle to north s16 CompassHeading; // current compass value in ° s8 AngleNick; // current Nick angle in 1° s8 AngleRoll; // current Rick angle in 1° u8 RC_Quality; // RC_Quality u8 FCStatusFlags; // Flags from FC u8 NCFlags; // Flags from NC u8 Errorcode; // 0 --> okay u8 OperatingRadius; // current operation radius around the Home Position in m s16 TopSpeed; // velocity in vertical direction in cm/s u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached u8 FCStatusFlags2; // StatusFlags2 (since version 5 added) s16 SetpointAltitude; // setpoint for altitude u8 Gas; // for future use u16 Current; // actual current in 0.1A steps u16 UsedCapacity; // used capacity in mAh } __attribute__((packed)) NaviData_t; // ------- NCFlags ------------------------------------- #define NC_FLAG_FREE 0x01 #define NC_FLAG_PH 0x02 #define NC_FLAG_CH 0x04 #define NC_FLAG_RANGE_LIMIT 0x08 #define NC_FLAG_NOSERIALLINK 0x10 #define NC_FLAG_TARGET_REACHED 0x20 #define NC_FLAG_MANUAL 0x40 #define NC_FLAG_GPS_OK 0x80 // ------- FCStatusFlags ------------------------------- #define FC_STATUS_MOTOR_RUN 0x01 #define FC_STATUS_FLY 0x02 #define FC_STATUS_CALIBRATE 0x04 #define FC_STATUS_START 0x08 #define FC_STATUS_EMERGENCY_LANDING 0x10 #define FC_STATUS_LOWBAT 0x20 #define FC_STATUS_VARIO_TRIM_UP 0x40 #define FC_STATUS_VARIO_TRIM_DOWN 0x80 // ------- FCStatusFlags2 ------------------------------ #define FC_STATUS2_CAREFREE_ACTIVE 0x01 #define FC_STATUS2_ALTITUDE_CONTROL_ACTIVE 0x02 #define FC_STATUS2_FAILSAFE_ACTIVE 0x04 #define FC_STATUS2_OUT1 0x08 #define FC_STATUS2_OUT2 0x10 #define FC_STATUS2_RES1 0x20 #define FC_STATUS2_RES2 0x40 #define FC_STATUS2_RES3 0x80 }}} from uart1.h in NaviCtrl {{{#!cplusplus numbers=off typedef struct { u16 Distance; // distance to target in cm s16 Bearing; // course to target in deg } __attribute__((packed)) GPS_PosDev_t; }}} from ubx.h in NaviCtrl {{{ #!cplusplus #define INVALID 0x00 #define NEWDATA 0x01 #define PROCESSED 0x02 typedef struct { s32 Longitude; // in 1E-7 deg s32 Latitude; // in 1E-7 deg s32 Altitude; // in mm u8 Status; // validity of data } __attribute__((packed)) GPS_Pos_t; }}} ---- . CategoryCoding