Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mean apsides and minimal distance #2625

Merged

Conversation

eggrobin
Copy link
Member

@eggrobin eggrobin commented Jul 2, 2020

Add the following to the orbit analysis window:

  • a warning if any of the following occur over the course of the mission:
    • dropping below the nominal atmosphere height: reentry,
    • dropping below the highest terrain altitude: collision risk,
    • dropping below the lowest terrain altitude or, on a planet with oceans, sea level, whichever one is higher: collision);
  • lowest altitude: the lowest altitude reached over the course of the mission;
  • altitude of mean periapsis: the altitude corresponding to the periapsis distance itself corresponding to the mean semimajor axis and mean eccentricity;
  • altitude of mean apoapsis: the altitude corresponding to the apoapsis distance itself corresponding to the mean semimajor axis and mean eccentricity;

While the mean periapsis and apoapsis altitudes are not really directly meaningful, since it is customary to describe orbits by their periapsis and apoapsis altitudes, they are a more readily understood description of the size and shape of the orbit.

@@ -138,6 +147,10 @@ class OrbitalElements {
MassiveBody const& primary,
Body const& secondary);

template<typename PrimaryCentred>
static std::vector<Length> Distances(
DiscreteTrajectory<PrimaryCentred> const& trajectory);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distances is about as uninformative as it gets; make it DistancesFromPrimary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RadialDistances, and clarified periapsis_distance (as opposed to altitude).


std::vector<EquinoctialElements> osculating_equinoctial_elements_;
std::vector<Length> distances_;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distances_from_primary_.

Sorry, something went wrong.

Time sidereal_period_;
std::vector<EquinoctialElements> mean_equinoctial_elements_;
std::vector<ClassicalElements> mean_classical_elements_;
Time anomalistic_period_;
Time nodal_period_;
AngularFrequency nodal_precession_;

Interval<Length> distance_interval_;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distances_from_primary_interval_.

Sorry, something went wrong.

(lowest_distance - primary?.Radius)?.FormatAltitude());
double? lowest_primary_altitude =
primary?.ocean == true ? 0 : primary?.pqsController?.radiusMin;
string altitude_warning = lowest_distance < lowest_primary_altitude
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens in this comparison if one (or both) of the distances doesn't have a value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false.

@pleroy pleroy added the LGTM label Jul 5, 2020
@eggrobin
Copy link
Member Author

eggrobin commented Jul 6, 2020

The astronomy project already uses C++20, so remove the comments.

numerics ends up depending on this (because of the ToMathematica overload).

@eggrobin eggrobin merged commit b16a892 into mockingbirdnest:master Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants