mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 01:18:29 -04:00
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;
|
float thrust = throttle;
|
||||||
|
|
||||||
battery_voltage = sitl->batt_voltage - 0.7*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) {
|
if (ice_engine) {
|
||||||
thrust = icengine.update(input);
|
thrust = icengine.update(input);
|
||||||
|
Loading…
Reference in New Issue
Block a user