Fix pilotage script bug
This commit is contained in:
parent
1825b7b395
commit
6c317126bd
1 changed files with 5 additions and 5 deletions
|
|
@ -30,6 +30,11 @@ local SIGNE_TANGAGE, SIGNE_ROULIS = -1, -1
|
|||
function Pilotage.nouveau(conf, etat, materiel, Pid, journal)
|
||||
local p = {}
|
||||
local VMAX = conf.VITESSE_RSC_MAX
|
||||
|
||||
local function borner(v, mini, maxi)
|
||||
if v < mini then return mini elseif v > maxi then return maxi end
|
||||
return v
|
||||
end
|
||||
local gains = etat.pid or conf.PID
|
||||
|
||||
local pidMontee = Pid.nouveau(gains.montee, -VMAX, VMAX, 20)
|
||||
|
|
@ -181,11 +186,6 @@ function Pilotage.nouveau(conf, etat, materiel, Pid, journal)
|
|||
altPrec, vFiltre = nil, 0
|
||||
end
|
||||
|
||||
local function borner(v, mini, maxi)
|
||||
if v < mini then return mini elseif v > maxi then return maxi end
|
||||
return v
|
||||
end
|
||||
|
||||
-- applique base + trim + corrections d'assiette aux 4 helices.
|
||||
-- `adapter` (booleen): en quasi-stationnaire, le trim absorbe
|
||||
-- lentement la composante statique des corrections (CG decale par
|
||||
|
|
|
|||
Loading…
Reference in a new issue