mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 17:43:33 +08:00
Add const modifier
This commit is contained in:
committed by
Paul Riseborough
parent
aa2c77f92d
commit
1f637af7de
@@ -173,7 +173,7 @@ Vector2f Ekf::getWindVelocityVariance() const
|
||||
|
||||
void Ekf::get_true_airspeed(float *tas)
|
||||
{
|
||||
float tempvar = sqrtf(sq(_state.vel(0) - _state.wind_vel(0)) + sq(_state.vel(1) - _state.wind_vel(1)) + sq(_state.vel(2)));
|
||||
const float tempvar = sqrtf(sq(_state.vel(0) - _state.wind_vel(0)) + sq(_state.vel(1) - _state.wind_vel(1)) + sq(_state.vel(2)));
|
||||
memcpy(tas, &tempvar, sizeof(float));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user