diff --git a/libraries/AP_HAL_AVR_SITL/SITL_State.cpp b/libraries/AP_HAL_AVR_SITL/SITL_State.cpp index 82d32dc77c..d12811bd47 100644 --- a/libraries/AP_HAL_AVR_SITL/SITL_State.cpp +++ b/libraries/AP_HAL_AVR_SITL/SITL_State.cpp @@ -482,7 +482,7 @@ void SITL_State::_simulator_output(void) float throttle = _motors_on?(control.pwm[2]-1000) / 1000.0f:0; // lose 0.7V at full throttle - float voltage = 12.6 - 0.7f*throttle; + float voltage = _sitl->batt_voltage - 0.7f*throttle; // assume 50A at full throttle float current = 50.0 * throttle; // assume 3DR power brick