1
0
mirror of https://gitlab.com/lander-team/lander-cpp.git synced 2025-07-23 14:41:25 +00:00

added load cells to csv

This commit is contained in:
2021-11-12 15:47:27 -07:00
parent 289f2e7a43
commit a6dcb6863f
2 changed files with 21 additions and 12 deletions

View File

@@ -7,7 +7,7 @@ double loadCellCalibrate();
void initFile();
void thrustInfo(struct Vehicle &);
void processTVC(struct Vehicle &);
void write2CSV(struct Vehicle &);
void write2CSV(struct Vehicle &, double a, double b, double c, double d);
void printSimResults(struct Vehicle &);
void teensyAbort();
@@ -75,7 +75,7 @@ void initFile() {
// File Header
dataFile.println(
"t,x,y,z,vx,vy,vz,ax,ay,az,yaw,pitch,roll,yawdot,pitchdot,rolldot,"
"Servo1,Servo2,thrustFiring,thrust,simResponse");
"Servo1,Servo2,thrustFiring,thrust,simResponse,l0,l1,l2,l3");
}
void thrustInfo(Vehicle &State) {
@@ -122,7 +122,7 @@ void processTVC(Vehicle &State, LoadCells &loadCells) {
State.momentZ = 0.0;
}
void write2CSV(Vehicle &State) {
void write2CSV(Vehicle &State, double a, double b, double c, double d) {
dataFile.print(String(State.time, 5));
dataFile.print(",");
@@ -172,8 +172,17 @@ void write2CSV(Vehicle &State) {
dataFile.print(",");
dataFile.print(String(State.stepDuration, 5));
dataFile.print("\n");
dataFile.print(",");
dataFile.print(String(a, 5));
dataFile.print(",");
dataFile.print(String(b, 5));
dataFile.print(",");
dataFile.print(String(c, 5));
dataFile.print(",");
dataFile.print(String(d, 5));
dataFile.print("\n");
}
void printSimResults(Vehicle &State) {