SITL: add synthetic current sensor,fix SITL current

This commit is contained in:
Henry Wurzburg 2022-11-22 15:00:11 -06:00 committed by Andrew Tridgell
parent f297e57176
commit cff3066591
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ void Plane::calculate_forces(const struct sitl_input &input, Vector3f &rot_accel
float thrust = throttle;
battery_voltage = sitl->batt_voltage - 0.7*throttle;
battery_current = 50.0f*throttle;
battery_current = (battery_voltage/sitl->batt_voltage)*50.0f*sq(throttle);
if (ice_engine) {
thrust = icengine.update(input);