mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 15:17:23 +00:00
commenting
This commit is contained in:
parent
c6b1f0fc2c
commit
0c8703ac73
@ -198,6 +198,7 @@ void lqrCalc(struct sVars &Vars)
|
||||
|
||||
*/
|
||||
|
||||
// Paste in Values from gainCalc.m
|
||||
double K11 = 39.54316;
|
||||
double K12 = 0.00000;
|
||||
double K13 = -0.00000;
|
||||
@ -217,7 +218,7 @@ void lqrCalc(struct sVars &Vars)
|
||||
double K35 = 0.00000;
|
||||
double K36 = 39.54394;
|
||||
|
||||
double gain = 0.25 * pow(10, -4);
|
||||
double gain = 0.25 * pow(10, -4); // changing exponenet drastically changes results of LQR
|
||||
|
||||
// Matrix Multiply K with [YPR/2; w123] column vector and divide by moment arm
|
||||
Vars.LQRx = gain * ((K12 * Vars.pitch) / 2 + K15 * Vars.pitchdot + (K13 * Vars.roll) / 2 + K16 * Vars.rolldot + (K11 * Vars.yaw) / 2 + K14 * Vars.yawdot) / -Vars.momentArm;
|
||||
|
Loading…
x
Reference in New Issue
Block a user