Fix stabilisation bug

This commit is contained in:
Ploush 2026-07-19 13:56:59 +02:00
parent 6c317126bd
commit 700d60ca27

View file

@ -22,10 +22,14 @@ local SIGNES = {
rf = { bf = 1, lr = -1 }, rf = { bf = 1, lr = -1 },
} }
-- assiette normalisee: une helice AVANT pousse plus quand le tangage -- Assiette normalisee (calib gimbal): tangage NEGATIF = nez bas,
-- est negatif (nez bas), une helice GAUCHE quand le roulis est -- roulis NEGATIF = penche a gauche.
-- negatif (penche a gauche) -- Algebre du signe: nez bas => mesure < 0 => erreur (consigne 0 -
local SIGNE_TANGAGE, SIGNE_ROULIS = -1, -1 -- mesure) > 0 => sortie PID > 0. Il faut alors POUSSER PLUS a
-- l'AVANT (bf = +1) pour relever le nez, donc la correction
-- s'applique telle quelle: signes +1. (Un -1 ici AMPLIFIE
-- l'inclinaison au lieu de la corriger.)
local SIGNE_TANGAGE, SIGNE_ROULIS = 1, 1
function Pilotage.nouveau(conf, etat, materiel, Pid, journal) function Pilotage.nouveau(conf, etat, materiel, Pid, journal)
local p = {} local p = {}