1
0
mirror of https://gitlab.com/lander-team/lander-cpp.git synced 2025-08-17 02:24:50 +00:00

now reading from load cells each loop

This commit is contained in:
2021-11-13 11:17:44 -07:00
parent 069ab2a9e4
commit b9c2e7fb35
3 changed files with 35 additions and 25 deletions

View File

@@ -14,7 +14,6 @@ void teensyAbort();
const int chipSelect = BUILTIN_SDCARD;
File dataFile;
void initFile() {
Serial.print("Initializing SD card...");
@@ -102,8 +101,8 @@ void processTVC(Vehicle &State, LoadCells &loadCells) {
// Vector math to aqcuire thrust vector components
// PLACEHOLDER PLACEHOLDERPLACEHOLDER PLACEHOLDERPLACEHOLDER
// PLACEHOLDERPLACEHOLDER PLACEHOLDERPLACEHOLDER PLACEHOLDER
State.Fx = loadCells.lc1Value + loadCells.lc2Value;
State.Fy = loadCells.lc0Value + loadCells.lc3Value;
State.Fx = loadCells.lc1Val + loadCells.lc2Val;
State.Fy = loadCells.lc0Val + loadCells.lc3Val;
State.Fz = sqrt(pow(State.thrust, 2) - pow(State.Fx, 2) - pow(State.Fy, 2)) +
(State.mass * g);