During testing of altitude hold mode for fixed wing, I’ve found that the maximum pitch angle that will be allowed when flying at max throttle (max airspeed on the stick) is clamped to 10 degrees. What is it that causes this and is this limit there for a safety reason. Is it adjustable - if so how? In code if necessary.
Less throttle seems to allow greater pitch angles and therefore better climb rates. I have the max climb rate setting at 10 m/s, but it could only achieve 3m/s at the max airspeed position.
Thanks for help
This is actually a feature of FW altitude control mode, although it may need some rethinking. In altitude mode if your throttle stick is > 85% it goes into climbout mode, which is full throttle and 10 degrees pitch. I think the idea is to force something safe for takeoff if you were to hand launch in altitude mode. We could add conditions based on time in air, or altitude above home. We’d just need to be careful to keep this mode fully functional without global position.
Here’s the relevant section of altitude control mode if you’re interested - https://github.com/PX4/Firmware/blob/master/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp#L2031
and it happens in FixedwingPositionControl::update_desired_altitude(float dt) here -
Thanks for this. I may have to look into modifying this for our purposes.
Let me know what ends up working for you so we can think about what makes the best default behavior.