mirror of https://github.com/ArduPilot/ardupilot
SITL: add synthetic current sensor,fix SITL current
This commit is contained in:
parent
f297e57176
commit
cff3066591
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue