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

Finder for sub-satellite point eclipse related events #26

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dmitrywalther
Copy link

No description provided.

final Vector3D psat = s.getPVCoordinates(occulting.getBodyFrame()).getPosition();
Vector3D psat = null;
if (subSatellitePoint) {
Frame inertialFrame = FramesFactory.getEME2000();
Copy link
Collaborator

Choose a reason for hiding this comment

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

The inertial frame should be extracted from SpacecraftState rather than hard-coded to EME2000.
Otherwise, the s.getPVCoordinates().getPosition() in the following line will be inconsistent.

Copy link
Author

Choose a reason for hiding this comment

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

I fixed it.

@maisonobe
Copy link
Collaborator

Hi, thanks for the PR.
Please note the github is only a mirror of our main forge. Pull requests should rather be registered on https://gitlab.orekit.org/orekit/orekit

@maisonobe
Copy link
Collaborator

Could also it be possible to add some unit test for the feature?

@wardev
Copy link
Contributor

wardev commented Oct 6, 2020

Interesting feature and good first cut at the implementation.

I think this makes the eclipse class too complex, it would be better as a separate class. Extracting an abstract super class would make sense since there is significant overlap in the code. Another option would be to use a Function that maps the SpacecraftState to the position considered for the eclipse calculation.

The withUmbraSSP and withPenumbraSSP methods do two things at once. Better for each method to do one thing. Use the existing withUmbra and withPenumbra instead of duplicating that functionality. Stylistically I prefer writing out acronyms so it is easier to read the code, e.g. withSubSatellitePoint(),

One method withSubSatellitePoint() was added instead withUmbraSSP and withPenumbraSSP methods.
Unit test was added for the method withSubSatellitePoint().
sdinot pushed a commit that referenced this pull request Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants