You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.6 KiB
44 lines
1.6 KiB
#ifndef MISSION_PLANNING_H |
|
#define MISSION_PLANNING_H |
|
|
|
#include "simulation.h" |
|
|
|
struct TransferParameters { |
|
double semi_major_axis; |
|
double eccentricity; |
|
double periapsis; |
|
double apoapsis; |
|
double transfer_time; |
|
double departure_velocity; |
|
double arrival_velocity; |
|
double phase_angle_deg; |
|
double delta_v_injection; |
|
double delta_v_capture; |
|
}; |
|
|
|
TransferParameters calculate_hohmann_transfer(double r_departure, double r_arrival, |
|
double central_mass); |
|
|
|
double calculate_angular_position(CelestialBody* body, CelestialBody* center); |
|
|
|
double calculate_required_phase_angle(double transfer_time, double arrival_period); |
|
|
|
bool check_launch_window(SimulationState* sim, int departure_idx, int arrival_idx, |
|
double required_phase_angle_deg, double tolerance_deg); |
|
|
|
void wait_for_launch_window(SimulationState* sim, int departure_idx, int arrival_idx, |
|
double required_phase_angle_deg, double tolerance_deg); |
|
|
|
void initialize_spacecraft_leo(CelestialBody* spacecraft, CelestialBody* parent, |
|
double altitude_m); |
|
|
|
void apply_transfer_burn(SimulationState* sim, int spacecraft_idx, |
|
int departure_idx, TransferParameters* params); |
|
|
|
double calculate_phase_angle(SimulationState* sim, int departure_idx, int arrival_idx); |
|
|
|
#endif |
|
|
|
// DEPRECATED: initialize_spacecraft_leo() is no longer needed. Spacecraft positions |
|
// and velocities are now set via TOML config files with semi_major_axis parameter. |
|
// This function is kept for reference only and will be removed in a future cleanup.
|
|
|