AP_Baro: Change from division to multiplication

This commit is contained in:
murata 2022-03-12 02:31:18 +09:00 committed by Andrew Tridgell
parent 12957c835a
commit aabbda3978
2 changed files with 2 additions and 2 deletions

View File

@ -162,7 +162,7 @@ void AP_Baro_BMP280::_update_temperature(int32_t temp_raw)
_t_fine = var1 + var2;
t = (_t_fine * 5 + 128) >> 8;
const float temp = ((float)t) / 100.0f;
const float temp = ((float)t) * 0.01f;
WITH_SEMAPHORE(_sem);

View File

@ -66,7 +66,7 @@ void AP_Baro_SITL::_timer()
return;
}
sim_alt += _sitl->baro[_instance].drift * now / 1000.0f;
sim_alt += _sitl->baro[_instance].drift * now * 0.001f;
sim_alt += _sitl->baro[_instance].noise * rand_float();
// add baro glitch