Skip to content

Add moon reference system - #59

Merged
ckebschull merged 27 commits into
masterfrom
add-moon-reference-system
Jul 1, 2026
Merged

Add moon reference system#59
ckebschull merged 27 commits into
masterfrom
add-moon-reference-system

Conversation

@ckebschull

Copy link
Copy Markdown
Collaborator

NEPTUNE 1.2.0 Changelog (02-Jun-2026)

  • Feature: Moon-centered reference frame (MCRF) input types 6 (Cartesian) and 7 (Keplerian osculating elements)
  • Feature: MCRF output files - Moon-centered Cartesian (mcs), osculating Keplerian (osm), variances and covariances
  • Feature: Lunar gravity harmonics via AIUB-GRL350A model (configurable degree 2-350)
  • Change: Moon gravity parameter in neptune.inp now encodes harmonics degree (0=off, 1=point-mass, >1=degree); separate Lunar gravity harmonics degree line removed (breaking format change)

Comment thread validation/lro/scripts/setup_venv.sh Outdated
Comment thread src/neptune.f90
neptune%output%input_type == INPUT_OSCULATING_MCRF) then
r_moon_chk = neptune%solarsystem_model%getBodyPosition(epochs(1)%mjd, ID_MOON)
if(hasFailed()) return
if(mag(state_in%r - r_moon_chk) < getMoonRadius()) then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ckebschull theoretically we could be hitting the moon even if we have defined the input in a non Moon Centered Frame. I see two options:

  1. We alwas do this check, which would require to always load the Moon Ephemeris
  2. We do this check only when the Moon Harmonics model is enabled, as in other cases we are treating it as a point mass.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@oscarrdfz - addressed it with option 2

Comment thread src/rdinp.f90 Outdated
end do

do i = 1, idimcov-1
do i = 1, idimcov-2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I have this comment for the libslam repo @ckebschull -> what is the reason from changing idimcov from 6 to 7?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@oscarrdfz - this I had to fix to get neptune to run in the latest branch. I guess due to changes made from @danlueck for the Cd propagation.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I may be wrong but I don't think the changes to the Cd covariance propagation were ever merged

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ckebschull that was my idea, I would actually advise to not change that yet, have the feeling could break too many other things

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reverted to 6-dim covariance

Comment thread tests/test_moon_reduction.pf Outdated
Comment thread src/gravity.f90
Comment thread src/gravity.f90 Outdated
@ckebschull ckebschull assigned ckebschull and unassigned daluar657 Jun 26, 2026
Comment thread src/neptuneClass.f90
@oscarrdfz

Copy link
Copy Markdown
Collaborator

@ckebschull I think we need to at least extend tests/test_thirdbody.pf to include tests with lunar gravity for CI

@ckebschull

Copy link
Copy Markdown
Collaborator Author

@ckebschull I think we need to at least extend tests/test_thirdbody.pf to include tests with lunar gravity for CI
Added a unit test for lunar gravity acceleration

@ckebschull
ckebschull requested a review from oscarrdfz July 1, 2026 10:18
@ckebschull
ckebschull merged commit 9c4b4ca into master Jul 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants