diff options
-rw-r--r-- | ROMFS/px4fmu_common/init.d/16_3dr_iris | 2 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.sensors | 16 | ||||
-rw-r--r-- | src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | 3 |
3 files changed, 19 insertions, 2 deletions
diff --git a/ROMFS/px4fmu_common/init.d/16_3dr_iris b/ROMFS/px4fmu_common/init.d/16_3dr_iris index b6c5fbdea..d47ecb393 100644 --- a/ROMFS/px4fmu_common/init.d/16_3dr_iris +++ b/ROMFS/px4fmu_common/init.d/16_3dr_iris @@ -53,7 +53,7 @@ else mavlink start -d /dev/ttyS0 usleep 5000 fmu mode_pwm - param set BAT_V_SCALING 0.004593 + param set BAT_V_SCALING 0.0098 set EXIT_ON_END yes fi diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 2828a108b..f17b650bc 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -27,6 +27,22 @@ else set BOARD fmuv2 fi +# Start airspeed sensors +if meas_airspeed start +then + echo "using MEAS airspeed sensor" +else + if ets_airspeed start + then + echo "using ETS airspeed sensor (bus 3)" + else + if ets_airspeed start -b 1 + then + echo "Using ETS airspeed sensor (bus 1)" + fi + fi +fi + # # Start the sensor collection task. # IMPORTANT: this also loads param offsets diff --git a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp index d6d135f9f..3d5bce134 100644 --- a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp +++ b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp @@ -734,9 +734,10 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_positio /* apply minimum pitch and limit roll if target altitude is not within 10 meters */ if (altitude_error > 10.0f) { + /* enforce a minimum of 10 degrees pitch up on takeoff, or take parameter */ _tecs.update_pitch_throttle(_R_nb, _att.pitch, _global_pos.alt, _global_triplet.current.altitude, calculate_target_airspeed(_parameters.airspeed_min), _airspeed.indicated_airspeed_m_s, eas2tas, - true, math::radians(global_triplet.current.param1), + true, math::max(math::radians(global_triplet.current.param1), math::radians(10.0f)), _parameters.throttle_min, _parameters.throttle_max, _parameters.throttle_cruise, math::radians(_parameters.pitch_limit_min), math::radians(_parameters.pitch_limit_max)); |