Hi there
I found a bug in mavlink_msg_gps_input.h in MavLinkC_v2 which does not correspond to the definition on the MavLink2:
Several members are out of order which makes the packing and sending not possible.
The correct definition is:
typedef struct __mavlink_gps_input_t {
uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/
uint8_t gps_id; /*< ID of the GPS for multiple GPS inputs*/
uint16_t ignore_flags; /*< Bitmap indicating which GPS input flags fields to ignore. All other fields must be provided.*/
uint32_t time_week_ms; /*< [ms] GPS time (from start of GPS week)*/
uint16_t time_week; /*< GPS week number*/
uint8_t fix_type; /*< 0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK*/
int32_t lat; /*< [degE7] Latitude (WGS84)*/
int32_t lon; /*< [degE7] Longitude (WGS84)*/
float alt; /*< [m] Altitude (MSL). Positive for up.*/
float hdop; /*< GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX*/
float vdop; /*< GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX*/
float vn; /*< [m/s] GPS velocity in north direction in earth-fixed NED frame*/
float ve; /*< [m/s] GPS velocity in east direction in earth-fixed NED frame*/
float vd; /*< [m/s] GPS velocity in down direction in earth-fixed NED frame*/
float speed_accuracy; /*< [m/s] GPS speed accuracy*/
float horiz_accuracy; /*< [m] GPS horizontal accuracy*/
float vert_accuracy; /*< [m] GPS vertical accuracy*/
uint8_t satellites_visible; /*< Number of satellites visible.*/
uint16_t yaw; /*< [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north*/
}) mavlink_gps_input_t;
I do not know how to report it to proper people so it gets fixed for others to use.
So I will leave it to someone from this group to guide it please.
thanks
Pawel