How can you get your APM to allow your plane to descend aggressively at high angles? We've been messing around with the MAX Pitch and MIN Pitch parameters; but, while we can get the plane to climb steeply, we cannot get it to dive along a steep trajectory.
The purpose of doing this is for senior project where we are using a Bixler airframe with Ardupilot Mega to mimic a hawk as it hunts. So we need the steep dive to mimic the swooping of a hawk. When we put a low altitude waypoint right after a high altitude waypoint (say 100-200 ft difference), the drone just kind of cuts the throttle and slowly descends in that direction at a very shallow pitch (seemingly regardless of how we set the MAX pitch parameter) in that direction and never fully makes it to the lower altitude.
The only way we've gotten it to "dive" is by setting both MIN and MAX pitch at negative angles so it has no choice but to do down. But then, obviously, it wont climb, so this is not a solution.
Anyone have any parameter tips or a parameter set that allows for both climbs and steep dives? Thank you.
Great question Peter. I want to do the same. I hope Chris or one of the developers will answer.
So we actually figured out a way to do this, though this might just be the "brute force" method, but it seems to work. We found that "swooping" is not actually controlled through the parameters but through conditional functions in the mission planner. In this case, you can use the function (picked from the waypoint function dropdown menu) "CONDITION_CHANGE_ALT" to tell the drone to descent at a given rate of X centimeters/second as it goes from one waypoint to another. See our example below.
The way this works is that we want the swoop to occur between points 6 and 7, so the drone will reach waypoint 6, start going toward waypoint 7, and THEN look for conditionals. This is why the conditional is at point 8 instead between 6 and 7. Set your desired beginning and end altitudes for 6 and 7 and use those to calculate how fast you want to descend, in cm/s, for the conditional. For this swoop, we wanted around 30 meters of swooping and based on our telemetry data, we were going around 15m/s given our cruise rate. Using these rates and some simple calculations, we found that to go linearly from 50m at 6 and 30m at 7, we needed a drop rate of 530 cm/s. We lowered this to 400 cm/s to be conservative, and this rate ended up working pretty well as an aggressive looking swoop.
This method isn't perfect and we have some work to do, but it's a start toward effective swooping with the autopilot. I hope this helps.
Thank you for the explanation - that's interesting. I haven't used any conditionals yet and would not have known that the sw would look for a conditional that's listed after a waypoint before the plane even reaches that waypoint. I look forward to experimenting with this. I'll probably try it on the simulator first. Fun stuff!
By the way Peter, are you using Xbee? If so, have you tried disconnecting the ground station to see if the plane will go to RTL mode? I have APM v1.4 hw and v2.23 sw and have my RC Rx failsafe set to put APM into RTL mode if it loses contact with my RC Tx and that works great. But if my RC Tx is already off and then I use the ground station and Xbee to control the plane, and then I turn off or disconnect the ground station, APM just stays in whatever mode it was in before which means the plane would just fly away if Xbee com was the last link to be broken. I'm assuming there's some parameter I need to set so it will go to RTL or a mode that I can predefine when the link is broken but I haven't found how to do it yet.
Yeah Xbee has been extremely helpful for in-flight parameter tuning and other troubleshooting, but we have not done anything with disconnecting the ground station, loosing the Tx signal, or experimenting with those fail-safes. But I'm sure there are plenty of people on here who have. We are just still greenhorns with the whole thing, sorry.
Thanks for your responses and interest!
Thanks and good luck with your project.
Set Alt_Ctrl_Alg to 1, and Lim_Pitch_Min to -55. The first tells Ardu to
make hitting altitude the first flight priority.