mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 15:17:23 +00:00
43 lines
866 B
C++
43 lines
866 B
C++
#include <array>
|
|
|
|
#ifndef VEHICLE_H
|
|
#define VEHICLE_H
|
|
|
|
struct Vehicle {
|
|
double x, y, z;
|
|
double vx, vy, vz;
|
|
double vxBody, vyBody, vzBody;
|
|
double ax, ay, az;
|
|
|
|
double yaw, pitch, roll;
|
|
double phidot, thetadot, psidot;
|
|
double yawdot, pitchdot, rolldot;
|
|
double yawddot, pitchddot, rollddot;
|
|
|
|
double mass, massInitial, massPropellant, massBurnout, mdot;
|
|
double vehicleHeight, vehicleRadius, momentArm;
|
|
|
|
double burntime;
|
|
double burnVelocity;
|
|
double thrust, burnElapsed, burnStart;
|
|
bool thrustFiring = false;
|
|
|
|
double LQRx, LQRy, Fx, Fy, Fz;
|
|
double momentX, momentY, momentZ;
|
|
|
|
double I11, I22, I33;
|
|
double I11dot, I22dot, I33dot;
|
|
|
|
int maxServo;
|
|
double xServoDegs, yServoDegs;
|
|
|
|
double Kp, Ki, Kd;
|
|
double yError, yPrevError;
|
|
double pError, pPrevError;
|
|
double i_yError, i_pError = 0;
|
|
|
|
double simTime;
|
|
int stepSize;
|
|
};
|
|
|
|
#endif |