DataFlash: logging of AOA and SSA

This commit is contained in:
Eugene Shamaev 2017-04-09 14:17:17 +03:00 committed by Andrew Tridgell
parent 5c080ce875
commit a144e79a50
3 changed files with 22 additions and 0 deletions

View File

@ -150,6 +150,7 @@ public:
const AC_PosControl &pos_control);
void Log_Write_Rally(const AP_Rally &rally);
void Log_Write_VisualOdom(float time_delta, const Vector3f &angle_delta, const Vector3f &position_delta, float confidence);
void Log_Write_AOA_SSA(AP_AHRS &ahrs);
void Log_Write(const char *name, const char *labels, const char *fmt, ...);

View File

@ -2144,3 +2144,16 @@ void DataFlash_Class::Log_Write_VisualOdom(float time_delta, const Vector3f &ang
};
WriteBlock(&pkt_visualodom, sizeof(log_VisualOdom));
}
// Write AOA and SSA
void DataFlash_Class::Log_Write_AOA_SSA(AP_AHRS &ahrs)
{
struct log_AOA_SSA aoa_ssa = {
LOG_PACKET_HEADER_INIT(LOG_AOA_SSA_MSG),
time_us : AP_HAL::micros64(),
AOA : ahrs.getAOA(),
SSA : ahrs.getSSA()
};
WriteBlock(&aoa_ssa, sizeof(aoa_ssa));
}

View File

@ -787,6 +787,13 @@ struct PACKED log_Rally {
int16_t altitude;
};
struct PACKED log_AOA_SSA {
LOG_PACKET_HEADER;
uint64_t time_us;
float AOA;
float SSA;
};
// #endif // SBP_HW_LOGGING
#define ACC_LABELS "TimeUS,SampleUS,AccX,AccY,AccZ"
@ -1183,6 +1190,7 @@ enum LogMessages {
LOG_RATE_MSG,
LOG_RALLY_MSG,
LOG_VISUALODOM_MSG,
LOG_AOA_SSA_MSG,
};
enum LogOriginType {