Skip to content

Implement orbital precession#2364

Open
pedro-fixingstuff wants to merge 4 commits intoCelestiaProject:masterfrom
pedro-fixingstuff:orbital-precession
Open

Implement orbital precession#2364
pedro-fixingstuff wants to merge 4 commits intoCelestiaProject:masterfrom
pedro-fixingstuff:orbital-precession

Conversation

@pedro-fixingstuff
Copy link
Copy Markdown
Contributor

@pedro-fixingstuff pedro-fixingstuff commented Jul 17, 2025

This adds two new parameters for modeling of nodal and apsidal precession: NodalPrecessionPeriod and ApsidalPrecessionPeriod. The default unit for both is years.

Example syntax (orbit data from 16 Cyg Bb):

	EllipticalOrbit
	{
		Epoch 2456937
		Period 2.18863792
		SemiMajorAxis 1.6795
		Eccentricity 0.683
		Inclination 137.41309
		AscendingNode 316.95447
		ArgOfPericenter 232.8624
		MeanAnomaly 1.03341
		NodalPrecessionPeriod 100
		ApsidalPrecessionPeriod 100
	}

For the following images, I've set OrbitPeriodsShown to 3.0 in celestia.cfg.

Nodal precession:

Apsidal precession:

One issue is that the orbit paths look incomplete (this is with fading disabled). I wonder if using some parameter other than period (such as eccentric anomaly) for sampling the orbit would address that.

I'm not sure if the equations used are correct either.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
13.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@AstroChara AstroChara requested a review from ajtribick November 20, 2025 04:36
@pedro-fixingstuff
Copy link
Copy Markdown
Contributor Author

The latest commit fails to build as it is right now

@AstroChara
Copy link
Copy Markdown
Contributor

Regarding precession causing the no-fading orbit to be incomplete, we might want to instead draw the Keplerian orbit at that instant (a Keplerian orbit with the current longitude of ascending node and argument of periapsis). This is the approach Universe Sandbox uses for its equivalent orbit render mode, and in absence of fading, I think it's about the best option we have to render these orbits.

@pedro-fixingstuff pedro-fixingstuff force-pushed the orbital-precession branch 2 times, most recently from f302220 to 5075eb1 Compare April 16, 2026 15:49
@pedro-fixingstuff pedro-fixingstuff marked this pull request as ready for review April 16, 2026 15:55
@pedro-fixingstuff
Copy link
Copy Markdown
Contributor Author

I feel like this is ready to be taken a look now.

About rendering the path of the osculating orbit when fading is disabled, my opinion is that it's better left for another moment, as that would mean a change from the current paradigm of showing the actual path an object has traversed/will traverse.

For most realistic cases of precession, the difference between either orbital path wouldn't be significant anyway...

@pedro-fixingstuff pedro-fixingstuff force-pushed the orbital-precession branch 4 times, most recently from 273b416 to 7bcaabc Compare April 17, 2026 15:08
Orbital precession is enabled by two parameters within an EllipticalOrbit block:
NodalPrecessionPeriod and ApsidalPrecessionPeriod, both with default units of years.
One or both parameters can be specified simultaneously.
Anomalistic period is measured from one periapsis passage to another,
as opposed to the sidereal period, which is the default assumption.
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4 New Critical Issues (required ≤ 3)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

2 participants