Browse Source

Plane: reduced the rate of EKF and attitude logging to 25Hz

this will reduce the log file size while not appreciably reducing the
ability to analyse logs
master
Andrew Tridgell 9 years ago
parent
commit
abfcf89f5e
  1. 5
      ArduPlane/ArduPlane.cpp
  2. 3
      ArduPlane/Log.cpp

5
ArduPlane/ArduPlane.cpp

@ -74,6 +74,7 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = { @@ -74,6 +74,7 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = {
SCHED_TASK(update_trigger, 50, 100),
SCHED_TASK(log_perf_info, 0.2, 100),
SCHED_TASK(compass_save, 0.016, 200),
SCHED_TASK(Log_Write_Attitude, 25, 300),
SCHED_TASK(update_logging1, 10, 300),
SCHED_TASK(update_logging2, 10, 300),
SCHED_TASK(parachute_check, 10, 200),
@ -158,10 +159,6 @@ void Plane::ahrs_update() @@ -158,10 +159,6 @@ void Plane::ahrs_update()
ahrs.update();
if (should_log(MASK_LOG_ATTITUDE_FAST)) {
Log_Write_Attitude();
}
if (should_log(MASK_LOG_IMU)) {
Log_Write_IMU();
DataFlash.Log_Write_IMUDT(ins);

3
ArduPlane/Log.cpp

@ -158,6 +158,9 @@ void Plane::do_erase_logs(void) @@ -158,6 +158,9 @@ void Plane::do_erase_logs(void)
// Write an attitude packet
void Plane::Log_Write_Attitude(void)
{
if (!should_log(MASK_LOG_ATTITUDE_FAST)) {
return;
}
Vector3f targets; // Package up the targets into a vector for commonality with Copter usage of Log_Wrote_Attitude
targets.x = nav_roll_cd;
targets.y = nav_pitch_cd;

Loading…
Cancel
Save