mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 07:06:51 +00:00
cleanup from debugging
This commit is contained in:
parent
af4a5d16d5
commit
ee9fa3a3d1
@ -33,9 +33,6 @@ struct outVector {
|
||||
|
||||
std::vector<double> LQRx = std::vector<double>(length, 0.0);
|
||||
std::vector<double> LQRy = std::vector<double>(length, 0.0);
|
||||
|
||||
std::vector<double> thrust = std::vector<double>(length, 0.0);
|
||||
std::vector<double> d_yError = std::vector<double>(length, 0.0);
|
||||
};
|
||||
|
||||
#endif
|
@ -376,8 +376,6 @@ void state2vec(Vehicle &State, Vehicle &PrevState, outVector &stateVector,
|
||||
|
||||
stateVector.LQRx[t] = State.LQRx;
|
||||
stateVector.LQRy[t] = State.LQRy;
|
||||
stateVector.thrust[t] = State.thrust;
|
||||
stateVector.d_yError[t] = State.d_yError;
|
||||
|
||||
// Set "prev" values for next timestep
|
||||
PrevState = State;
|
||||
@ -434,9 +432,7 @@ void write2CSV(outVector &stateVector, Vehicle &State) {
|
||||
outfile << stateVector.thrustFiring[t] << ", ";
|
||||
|
||||
outfile << stateVector.LQRx[t] << ", ";
|
||||
outfile << stateVector.LQRy[t] << ", ";
|
||||
outfile << stateVector.thrust[t] << ", ";
|
||||
outfile << stateVector.d_yError[t] << std::endl;
|
||||
outfile << stateVector.LQRy[t] << std::endl;
|
||||
}
|
||||
|
||||
outfile.close();
|
||||
|
@ -1,13 +0,0 @@
|
||||
clear all; close all; clc;
|
||||
|
||||
syms I11 I22 I33 I11dot I22dot I33dot
|
||||
|
||||
I = [I11 0 0; 0 I22 0; 0 0 I33];
|
||||
Idot = [I11dot 0 0; 0 I22dot 0; 0 0 I33dot];
|
||||
|
||||
syms yaw pitch roll yawdot pitchdot rolldot yawddot pitchddot rollddot
|
||||
|
||||
w =
|
||||
|
||||
I *
|
||||
|
@ -1,24 +0,0 @@
|
||||
clear all; close all; clc;
|
||||
|
||||
syms I11 I22 I33 I11dot I22dot I33dot
|
||||
|
||||
I = [I11 0 0; 0 I22 0; 0 0 I33];
|
||||
Idot = [I11dot 0 0; 0 I22dot 0; 0 0 I33dot];
|
||||
|
||||
syms yaw pitch roll yawdot pitchdot rolldot yawddot pitchddot rollddot
|
||||
|
||||
w = [yawdot; pitchdot; rolldot];
|
||||
|
||||
Iw = I * w;
|
||||
Idw = Idot * w;
|
||||
|
||||
C = cross(w, Iw);
|
||||
|
||||
syms momentX momentY momentZ
|
||||
|
||||
M = [momentX; momentY; momentZ];
|
||||
A = M - Idw - C;
|
||||
B = [A(1) A(2) A(3)];
|
||||
|
||||
X = B*inv(I);
|
||||
E = [X(1); X(2); X(3)]
|
Loading…
x
Reference in New Issue
Block a user