Skip to content

Implement orbital precession#2364

Draft
pedro-fixingstuff wants to merge 3 commits intoCelestiaProject:masterfrom
pedro-fixingstuff:orbital-precession
Draft

Implement orbital precession#2364
pedro-fixingstuff wants to merge 3 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.

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