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

Formal build for Avionics Integration Test

This commit is contained in:
bpmcgeeney 2021-11-14 16:41:25 -07:00
parent 82e43b1fe8
commit e6f7e4c160
3 changed files with 8 additions and 7 deletions

View File

@ -80,7 +80,7 @@ void init_Vehicle(Vehicle &State) {
State.momentArm = 0.145; // [m]
// Sim Step Size
State.stepSize = 1.0; // [ms]
State.stepSize = 20.0; // [ms]
// Other Properties
State.massPropellant = 0.06; // [kg]

View File

@ -240,10 +240,10 @@ void printSimResults(Vehicle &State) {
Serial.print("Final Angles: [" + String(State.yaw) + ", " +
String(State.pitch) + "]\n");
if (landing_velocity < 0.5) {
Serial.print("Landing Velocity < 0.5 m/s | PASS | ");
if (landing_velocity < 1.0) {
Serial.print("Landing Velocity < 1.0 m/s | PASS | ");
} else {
Serial.print("Landing Velocity < 0.5 m/s | FAIL | ");
Serial.print("Landing Velocity < 1.0 m/s | FAIL | ");
}
Serial.print("Final Velocity: [" + String(State.vx) + ", " +
String(State.vy) + ", " + String(State.vz) + "]\n");

View File

@ -75,7 +75,7 @@ void setup() {
testGimbal(servo1, servo2);
Serial.println("Servos Tested");
delay(1000);
delay(3000);
Serial.println("Simulated Vehicle Initalized");
// Determine when to burn
@ -104,17 +104,18 @@ void loop() {
State.time += State.stepSize;
if ((State.z < 0.0) && (State.thrustFiring == 2)) {
printSimResults(State);
Serial.println("Run duration:" + String(micros() - initTime) + " us");
closeFile();
delay(20000);
delay(3000);
Serial.println("SUCCESS");
Serial.println("Aborting Sim");
teensyAbort();
}
delay(20 - ((micros() - last) * 1000.0));
delay(20.0 - ((micros() - last) / 1000.0));
}
void init_loadCells() {