Add const modifier

This commit is contained in:
Kamil Ritz
2020-08-24 19:24:27 +10:00
committed by Paul Riseborough
parent aa2c77f92d
commit 1f637af7de
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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));
}