It is a well known fact that when descending vertically, there is a lot of prop wash destabilization, so often one has to put a pretty conservative values of 1.5 to 2.5 m/s. However, if you descend with some horizontal speed, the copter never enters the downwash, and you can have much higher descent rates, 5 … 6 m/s. I believe DJI uses this technique.
I made a short script, where LUA increases the descent rate if the pilot inclines the copter forward by more than 10 degrees. The descent rate increases slowly and proportionally to inclination up to a preset maximum.
If the pilot returns to level flight, the descent rate is immediately reset to normal predefined descent rate.
Only forward inclination works, because it is much safer (you do not want to have extreme descents when flying backwards or sliding sideway, that is one of the potential crash reasons).
I have tested on my new built, seems to work fine.
It could be a good idea to integrate this is some future version of AP, because descents through prop wash are really complicated if the copter is not tuned rock solid.
function update ()
local pitch=ahrs:get_pitch()
local pitchdeg=math.deg (pitch)
local pitch_from=-10 – from this angle we will increase rate of descent. Will work only for negative values, i.e. when copter inclines forward
local pitch_to=-30 – this is the max angle, if the angle is higher, the max rate will not increase
local ch12=rc:get_pwm(12)
local ch11=rc:get_pwm(11)
local Pilot_VZ_Base=200 – this is the base descent speed, cm/sec
local Pilot_VZ_Max=500 – this is maximum descent speed
local Pilot_VZ_Delta=Pilot_VZ_Max-Pilot_VZ_Base
if (pitchdeg<pitch_to) then
pitchdeg=pitch_to -- limit maximum inclination for calculations
end
if (pitchdeg<pitch_from) -- from this inclination we will increase the descent rate
then
local ddeg=-pitch_from+pitchdeg -- ddge is the delta degree --
local Pilot_VZ_Target=Pilot_VZ_Base+Pilot_VZ_Delta*-(ddeg/(-pitch_to+pitch_from)) --
local Pilot_VZ= param:get('PILOT_SPEED_DN')
local Pilot_VZ_Step=(Pilot_VZ_Target-Pilot_VZ)/9 -- about 2..3 seconds to reach max descent speed
-- gcs:send_text(2, Pilot_VZ_Target)
-- gcs:send_text(2, Pilot_VZ_Step)
Pilot_VZ=Pilot_VZ+Pilot_VZ_Step
if (Pilot_VZ>Pilot_VZ_Max) then -- safety check, programmers are dumb!
Pilot_VZ=Pilot_VZ_Max
end
if (Pilot_VZ<Pilot_VZ_Base) then -- safety check, programmers are dumb!
Pilot_VZ=Pilot_VZ_Base
end
param:set ('PILOT_SPEED_DN',Pilot_VZ)
else
Pilot_VZ=Pilot_VZ_Base
param:set ('PILOT_SPEED_DN',Pilot_VZ)
end
local test=param:get('PILOT_SPEED_DN')
gcs:send_text(4, test)
return update, 250
end
return update()
descent.lua (1.9 KB)