diff --git a/libraries/SITL/SIM_Aircraft.h b/libraries/SITL/SIM_Aircraft.h index ca057d0453..be81425a2c 100644 --- a/libraries/SITL/SIM_Aircraft.h +++ b/libraries/SITL/SIM_Aircraft.h @@ -318,7 +318,7 @@ class Aircraft { Location location; } smoothing; - LowPassFilterFloat servo_filter[5]; + LowPassFilterFloat servo_filter[16]; Buzzer *buzzer; Sprayer *sprayer; diff --git a/libraries/SITL/SIM_Plane.cpp b/libraries/SITL/SIM_Plane.cpp index 9ee8e073b9..5f2463409c 100644 --- a/libraries/SITL/SIM_Plane.cpp +++ b/libraries/SITL/SIM_Plane.cpp @@ -262,9 +262,9 @@ Vector3f Plane::getForce(float inputAileron, float inputElevator, float inputRud void Plane::calculate_forces(const struct sitl_input &input, Vector3f &rot_accel) { - float aileron = filtered_servo_angle(input, 0); - float elevator = filtered_servo_angle(input, 1); - float rudder = filtered_servo_angle(input, 3); + float aileron = filtered_servo_angle(input, 9); + float elevator = filtered_servo_angle(input, 5); + float rudder = filtered_servo_angle(input, 10); bool launch_triggered = input.servos[6] > 1700; float throttle; if (reverse_elevator_rudder) { @@ -303,9 +303,9 @@ void Plane::calculate_forces(const struct sitl_input &input, Vector3f &rot_accel //printf("Aileron: %.1f elevator: %.1f rudder: %.1f\n", aileron, elevator, rudder); if (reverse_thrust) { - throttle = filtered_servo_angle(input, 2); + throttle = filtered_servo_angle(input, 4); } else { - throttle = filtered_servo_range(input, 2); + throttle = filtered_servo_range(input, 4); } float thrust = throttle; diff --git a/libraries/SITL/SIM_QuadPlane.cpp b/libraries/SITL/SIM_QuadPlane.cpp index a58b673405..3c613f4992 100644 --- a/libraries/SITL/SIM_QuadPlane.cpp +++ b/libraries/SITL/SIM_QuadPlane.cpp @@ -27,7 +27,7 @@ QuadPlane::QuadPlane(const char *frame_str) : { // default to X frame const char *frame_type = "x"; - uint8_t motor_offset = 4; + uint8_t motor_offset = 0; ground_behavior = GROUND_BEHAVIOR_NO_MOVEMENT;