mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-24 16:53:57 -04:00
AP_Baro: Change from division to multiplication
This commit is contained in:
parent
12957c835a
commit
aabbda3978
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user