mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_Soaring: allow compilation with HAL_LOGGING_ENABLED false
This commit is contained in:
parent
5bb3e0aa18
commit
7d798943fc
@ -337,6 +337,7 @@ void SoaringController::update_thermalling()
|
||||
_position_x_filter.apply(_ekf.X[2], deltaT);
|
||||
_position_y_filter.apply(_ekf.X[3], deltaT);
|
||||
|
||||
#if HAL_LOGGING_ENABLED
|
||||
// write log - save the data.
|
||||
// @LoggerMessage: SOAR
|
||||
// @Vehicles: Plane
|
||||
@ -367,6 +368,7 @@ void SoaringController::update_thermalling()
|
||||
(double)wind_drift.x,
|
||||
(double)wind_drift.y,
|
||||
(double)_thermalability);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SoaringController::update_cruising()
|
||||
@ -388,6 +390,7 @@ void SoaringController::update_cruising()
|
||||
// Update the calculation.
|
||||
_speedToFly.update(wx, wz, thermal_vspeed, CLmin, CLmax);
|
||||
|
||||
#if HAL_LOGGING_ENABLED
|
||||
AP::logger().WriteStreaming("SORC", "TimeUS,wx,wz,wexp,CLmin,CLmax,Vopt", "Qffffff",
|
||||
AP_HAL::micros64(),
|
||||
(double)wx,
|
||||
@ -396,6 +399,7 @@ void SoaringController::update_cruising()
|
||||
(double)CLmin,
|
||||
(double)CLmax,
|
||||
(double)_speedToFly.speed_to_fly());
|
||||
#endif
|
||||
}
|
||||
|
||||
void SoaringController::update_vario()
|
||||
|
@ -79,6 +79,7 @@ void Variometer::update(const float thermal_bank)
|
||||
|
||||
_expected_thermalling_sink = calculate_aircraft_sinkrate(radians(thermal_bank));
|
||||
|
||||
#if HAL_LOGGING_ENABLED
|
||||
// @LoggerMessage: VAR
|
||||
// @Vehicles: Plane
|
||||
// @Description: Variometer data
|
||||
@ -107,9 +108,12 @@ void Variometer::update(const float thermal_bank)
|
||||
(double)_expected_thermalling_sink,
|
||||
(double)dsp,
|
||||
(double)dsp_bias);
|
||||
#else
|
||||
(void)filtered_reading;
|
||||
(void)smoothed_climb_rate;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
float Variometer::calculate_aircraft_sinkrate(float phi) const
|
||||
{
|
||||
// Remove aircraft sink rate
|
||||
|
Loading…
Reference in New Issue
Block a user