1
0
mirror of https://gitlab.com/lander-team/lander-cpp.git synced 2025-06-16 15:17:23 +00:00

initial commit

This commit is contained in:
bpmcgeeney 2021-09-11 17:18:39 -07:00
parent 44d0db8bfd
commit d50f766169
3 changed files with 33 additions and 39 deletions

View File

@ -1,6 +0,0 @@
{
"files.associations": {
"array": "cpp",
"iostream": "cpp"
}
}

View File

@ -35,36 +35,36 @@ struct sVars
int maxServo;
double xServoDegs, yServoDegs;
double simTime;
int stepSize;
std::array<std::array<double, 2>, 26> thrustCurve = { { {0.148, 7.638},
{0.228, 12.253},
{0.294, 16.391},
{0.353, 20.210},
{0.382, 22.756},
{0.419, 25.260},
{0.477, 23.074},
{0.520, 20.845},
{0.593, 19.093},
{0.688, 17.500},
{0.855, 16.225},
{1.037, 15.427},
{1.205, 14.948},
{1.423, 14.627},
{1.452, 15.741},
{1.503, 14.785},
{1.736, 14.623},
{1.955, 14.303},
{2.210, 14.141},
{2.494, 13.819},
{2.763, 13.338},
{3.120, 13.334},
{3.382, 13.013},
{3.404, 9.352},
{3.418, 4.895},
{3.450, 0.000}} };
std::array<std::array<double, 2>, 26> thrustCurve = {{{0.148, 7.638},
{0.228, 12.253},
{0.294, 16.391},
{0.353, 20.210},
{0.382, 22.756},
{0.419, 25.260},
{0.477, 23.074},
{0.520, 20.845},
{0.593, 19.093},
{0.688, 17.500},
{0.855, 16.225},
{1.037, 15.427},
{1.205, 14.948},
{1.423, 14.627},
{1.452, 15.741},
{1.503, 14.785},
{1.736, 14.623},
{1.955, 14.303},
{2.210, 14.141},
{2.494, 13.819},
{2.763, 13.338},
{3.120, 13.334},
{3.382, 13.013},
{3.404, 9.352},
{3.418, 4.895},
{3.450, 0.000}}};
};
#endif

View File

@ -1,10 +1,10 @@
#include "sVars.h"
void burnStartTimeCalc(struct sVars&, double g);
void thrustSelection(struct sVars&, int t);
void lqrCalc(struct sVars&);
void TVC(struct sVars&, double g);
void vehicleDynamics(struct sVars&, int t);
void write2CSV(struct sVars&, std::fstream& outfile, int t);
void burnStartTimeCalc(struct sVars &, double g);
void thrustSelection(struct sVars &, int t);
void lqrCalc(struct sVars &);
void TVC(struct sVars &, double g);
void vehicleDynamics(struct sVars &, int t);
void write2CSV(struct sVars &, std::fstream &outfile, int t);
double derivative(double x2, double x1, double dt);
double integral(double x2, double x1, double dt);