Browse Source

clean up comments in orbits.h/cpp

main
cinnaboot 4 years ago
parent
commit
3e563a22f9
  1. 52
      src/orbits.h

52
src/orbits.h

@ -10,24 +10,24 @@
struct EllipseParameters struct EllipseParameters
{ {
double a; // NOTE: semi-major axis double a; // semi-major axis
double b; // NOTE: semi-minor axis double b; // semi-minor axis
double e; // NOTE: eccentricity double e; // eccentricity
double c; // NOTE: linear eccentricity double c; // linear eccentricity
double p; // NOTE: semilatus rectum double p; // semilatus rectum
glm::vec2 f1; // NOTE: 'primary' focus glm::vec2 f1; // 'primary' focus
glm::vec2 f2; // NOTE: 'vacant' focus glm::vec2 f2; // 'vacant' focus
}; };
struct OrbitalElements struct OrbitalElements
{ {
// NOTE: classical orbital elements // NOTE: classical orbital elements
double a; // NOTE: semimajor axis double a; // semimajor axis
double e; // NOTE: eccentricity double e; // eccentricity
double iota; // NOTE: (ι) inclination double iota; // (ι) inclination
double ohm; // NOTE: (Ω) longitude of the ascending node double ohm; // (Ω) longitude of the ascending node
double omega; // NOTE: (ω) argument of periapsis double omega; // (ω) argument of periapsis
double nu; // NOTE: (ν) true anomaly at T0 double nu; // (ν) true anomaly at T0
}; };
struct Ellipse3D struct Ellipse3D
@ -38,8 +38,8 @@ struct Ellipse3D
struct GravBody struct GravBody
{ {
double mu; // NOTE: (μ) gravitational parameter double mu; // (μ) gravitational parameter
double radius; // NOTE: radius of ideal sphere representing the body double radius; // radius of ideal sphere representing the body
// double r_atmos; // TODO: bodies w/ atmosphere // double r_atmos; // TODO: bodies w/ atmosphere
}; };
@ -47,10 +47,10 @@ struct Satellite
{ {
glm::vec3 position; glm::vec3 position;
glm::vec3 velocity; glm::vec3 velocity;
double theta; // NOTE: true anomaly double theta; // true anomaly
double r; // NOTE: radius magnitude at theta double r; // radius magnitude at theta
double gamma; // NOTE: (γ) flight path angle double gamma; // (γ) flight path angle
double v; // NOTE: velocity magnitute double v; // velocity magnitute
}; };
// NOTE: top level composite for 2 body system // NOTE: top level composite for 2 body system
@ -62,11 +62,11 @@ struct TwoBodySystem
Ellipse3D e3d; Ellipse3D e3d;
OrbitalElements elements; OrbitalElements elements;
double epsilon; // NOTE: (ε) specific orbital energy, MJ/kg double epsilon; // (ε) specific orbital energy, MJ/kg
double h; // NOTE: angular momentum double h; // angular momentum
double r_apoapsis; // NOTE: apoapse distance from body center double r_apoapsis; // apoapse distance from body center
double r_periapsis; // NOTE: periapsis distance from body center double r_periapsis; // periapsis distance from body center
double orbital_period; // NOTE: in seconds double orbital_period; // in seconds
}; };
@ -110,7 +110,7 @@ ellipsesEqual(EllipseParameters& e1, EllipseParameters& e2)
} }
// NOTE: create vertices for a 3d ellipse // NOTE: create vertices for a 3d ellipse
// NOTE: all vertices are in the x/y plane with z = 0 // all vertices are in the x/y plane with z = 0
Ellipse3D Ellipse3D
ellipseInit3D(EllipseParameters ep, uint vert_count); ellipseInit3D(EllipseParameters ep, uint vert_count);
@ -227,7 +227,7 @@ orbitUpdate(OrbitalElements& o, double a, double e);
double double
getPropagatedTrueAnomaly(TwoBodySystem sys, getPropagatedTrueAnomaly(TwoBodySystem sys,
double initial_anom, double initial_anom,
double time_step); // NOTE: in seconds double time_step); // in seconds
double double
orbitGetTimeOfFlight(TwoBodySystem sys, double theta_begin, double theta_end); orbitGetTimeOfFlight(TwoBodySystem sys, double theta_begin, double theta_end);

Loading…
Cancel
Save