Browse Source

Replace cout with INFO macros and remove unused test variables

main
cinnaboot 5 months ago
parent
commit
1ff00326bc
  1. 3
      tests/test_inclined_orbits.cpp
  2. 13
      tests/test_orbit_rendering.cpp

3
tests/test_inclined_orbits.cpp

@ -11,11 +11,8 @@ const double PERIOD_TOLERANCE_SECONDS = 600.0;
TEST_CASE("Molniya orbit - position verification at multiple true anomalies", "[inclined][molniya]") {
const double TIME_STEP = 60.0;
const double SECONDS_PER_DAY = 86400.0;
const double SEMI_MAJOR_AXIS = 26540000.0;
const double ECCENTRICITY = 0.74;
const double EARTH_MASS = 5.972e24;
const double MU = G * EARTH_MASS;
SimulationState* sim = create_simulation(10, 1, 0, TIME_STEP);

13
tests/test_orbit_rendering.cpp

@ -4,7 +4,6 @@
#include "../src/spacecraft.h"
#include "../src/config_loader.h"
#include <cmath>
#include <iostream>
TEST_CASE("Debug orbit rendering coordinates", "[debug][rendering]") {
const double TIME_STEP = 60.0;
@ -98,12 +97,12 @@ TEST_CASE("Debug orbit rendering coordinates", "[debug][rendering]") {
double distance_from_center = sqrt(render_x*render_x + render_y*render_y + render_z*render_z);
std::cout << "\nPoint " << i << " (" << (i * 90) << "°):" << std::endl;
std::cout << " Orbit plane: (" << x_orbit << ", " << y_orbit << ") m" << std::endl;
std::cout << " Sim pos: (" << sim_pos.x << ", " << sim_pos.y << ", " << sim_pos.z << ") m" << std::endl;
std::cout << " Render pos: (" << render_x << ", " << render_y << ", " << render_z << ") units" << std::endl;
std::cout << " Distance from center: " << distance_from_center << " units" << std::endl;
std::cout << " % of Earth radius: " << (distance_from_center / earth_render_radius * 100.0) << "%" << std::endl;
INFO("\nPoint " << i << " (" << (i * 90) << "°):");
INFO(" Orbit plane: (" << x_orbit << ", " << y_orbit << ") m");
INFO(" Sim pos: (" << sim_pos.x << ", " << sim_pos.y << ", " << sim_pos.z << ") m");
INFO(" Render pos: (" << render_x << ", " << render_y << ", " << render_z << ") units");
INFO(" Distance from center: " << distance_from_center << " units");
INFO(" % of Earth radius: " << (distance_from_center / earth_render_radius * 100.0) << "%");
}
INFO("");

Loading…
Cancel
Save