mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
DataFlash: Log the ground temperature used for baro calculations
This commit is contained in:
parent
c37209a8d5
commit
16433cbf7a
@ -829,6 +829,7 @@ void DataFlash_Class::Log_Write_Baro(AP_Baro &baro, uint64_t time_us)
|
||||
}
|
||||
float climbrate = baro.get_climb_rate();
|
||||
float drift_offset = baro.get_baro_drift_offset();
|
||||
float ground_temp = baro.get_ground_temperature();
|
||||
struct log_BARO pkt = {
|
||||
LOG_PACKET_HEADER_INIT(LOG_BARO_MSG),
|
||||
time_us : time_us,
|
||||
@ -838,6 +839,7 @@ void DataFlash_Class::Log_Write_Baro(AP_Baro &baro, uint64_t time_us)
|
||||
climbrate : climbrate,
|
||||
sample_time_ms: baro.get_last_update(0),
|
||||
drift_offset : drift_offset,
|
||||
ground_temp : ground_temp,
|
||||
};
|
||||
WriteBlock(&pkt, sizeof(pkt));
|
||||
|
||||
@ -851,6 +853,7 @@ void DataFlash_Class::Log_Write_Baro(AP_Baro &baro, uint64_t time_us)
|
||||
climbrate : climbrate,
|
||||
sample_time_ms: baro.get_last_update(1),
|
||||
drift_offset : drift_offset,
|
||||
ground_temp : ground_temp,
|
||||
};
|
||||
WriteBlock(&pkt2, sizeof(pkt2));
|
||||
}
|
||||
@ -865,6 +868,7 @@ void DataFlash_Class::Log_Write_Baro(AP_Baro &baro, uint64_t time_us)
|
||||
climbrate : climbrate,
|
||||
sample_time_ms: baro.get_last_update(2),
|
||||
drift_offset : drift_offset,
|
||||
ground_temp : ground_temp,
|
||||
};
|
||||
WriteBlock(&pkt3, sizeof(pkt3));
|
||||
}
|
||||
|
@ -191,6 +191,7 @@ struct PACKED log_BARO {
|
||||
float climbrate;
|
||||
uint32_t sample_time_ms;
|
||||
float drift_offset;
|
||||
float ground_temp;
|
||||
};
|
||||
|
||||
struct PACKED log_AHRS {
|
||||
@ -805,7 +806,7 @@ Format characters in the format string for binary log messages
|
||||
{ LOG_RSSI_MSG, sizeof(log_RSSI), \
|
||||
"RSSI", "Qf", "TimeUS,RXRSSI" }, \
|
||||
{ LOG_BARO_MSG, sizeof(log_BARO), \
|
||||
"BARO", "QffcfIf", "TimeUS,Alt,Press,Temp,CRt,SMS,Offset" }, \
|
||||
"BARO", "QffcfIff", "TimeUS,Alt,Press,Temp,CRt,SMS,Offset,GndTemp" }, \
|
||||
{ LOG_POWR_MSG, sizeof(log_POWR), \
|
||||
"POWR","QffH","TimeUS,Vcc,VServo,Flags" }, \
|
||||
{ LOG_CMD_MSG, sizeof(log_Cmd), \
|
||||
|
Loading…
Reference in New Issue
Block a user