mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
sdlog2 GPS message changes
This commit is contained in:
parent
9f895d87cd
commit
606f68c890
@ -834,15 +834,15 @@ int sdlog2_thread_main(int argc, char *argv[])
|
||||
log_msg.msg_type = LOG_GPS_MSG;
|
||||
log_msg.body.log_GPS.gps_time = buf.gps_pos.time_gps_usec;
|
||||
log_msg.body.log_GPS.fix_type = buf.gps_pos.fix_type;
|
||||
log_msg.body.log_GPS.satellites_visible = buf.gps_pos.satellites_visible;
|
||||
log_msg.body.log_GPS.eph = buf.gps_pos.eph_m;
|
||||
log_msg.body.log_GPS.epv = buf.gps_pos.epv_m;
|
||||
log_msg.body.log_GPS.lat = buf.gps_pos.lat;
|
||||
log_msg.body.log_GPS.lon = buf.gps_pos.lon;
|
||||
log_msg.body.log_GPS.alt = buf.gps_pos.alt;
|
||||
log_msg.body.log_GPS.alt = buf.gps_pos.alt * 0.001;
|
||||
log_msg.body.log_GPS.vel_n = buf.gps_pos.vel_n_m_s;
|
||||
log_msg.body.log_GPS.vel_e = buf.gps_pos.vel_e_m_s;
|
||||
log_msg.body.log_GPS.vel_d = buf.gps_pos.vel_d_m_s;
|
||||
log_msg.body.log_GPS.cog = buf.gps_pos.cog_rad;
|
||||
log_msg.body.log_GPS.vel_valid = (uint8_t) buf.gps_pos.vel_ned_valid;
|
||||
LOGBUFFER_WRITE_AND_COUNT(GPS);
|
||||
}
|
||||
|
||||
|
||||
@ -122,7 +122,8 @@ struct log_LPSP_s {
|
||||
struct log_GPS_s {
|
||||
uint64_t gps_time;
|
||||
uint8_t fix_type;
|
||||
uint8_t satellites_visible;
|
||||
float eph;
|
||||
float epv;
|
||||
int32_t lat;
|
||||
int32_t lon;
|
||||
float alt;
|
||||
@ -130,7 +131,6 @@ struct log_GPS_s {
|
||||
float vel_e;
|
||||
float vel_d;
|
||||
float cog;
|
||||
uint8_t vel_valid;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
@ -144,7 +144,7 @@ static const struct log_format_s log_formats[] = {
|
||||
LOG_FORMAT(SENS, "ffff", "BaroPres,BaroAlt,BaroTemp,DiffPres"),
|
||||
LOG_FORMAT(LPOS, "fffffffLLf", "X,Y,Z,VX,VY,VZ,Heading,HomeLat,HomeLon,HomeAlt"),
|
||||
LOG_FORMAT(LPSP, "ffff", "X,Y,Z,Yaw"),
|
||||
LOG_FORMAT(GPS, "QBBLLfffffB", "GPSTime,FixType,Sats,Lat,Lon,Alt,VelN,VelE,VelD,Cog,VelValid"),
|
||||
LOG_FORMAT(GPS, "QBffLLfffff", "GPSTime,FixType,EPH,EPV,Lat,Lon,Alt,VelN,VelE,VelD,Cog"),
|
||||
};
|
||||
|
||||
static const int log_formats_num = sizeof(log_formats) / sizeof(struct log_format_s);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user