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

Bug in createObject for Highly Eccentric Orbits (e > 0.9) #76

Open
lealea401 opened this issue Feb 17, 2025 · 0 comments
Open

Bug in createObject for Highly Eccentric Orbits (e > 0.9) #76

lealea401 opened this issue Feb 17, 2025 · 0 comments

Comments

@lealea401
Copy link

Description
Objects with eccentricity greater than 0.9 (e > 0.9) are not correctly positioned when created using createObject. While debugging, I found that the anomaly calculation and position update mechanism do not correctly compute the trajectory, leading to incorrect visualization. The issue seems to be related to the handling of parabolic and near-parabolic orbits in the KeplerParticles.update(jd) function.

Steps to Reproduce

  1. Create an object with createObject using the following parameters:

{
   "a": 2.0,
   "e": 0.95,
   "i": 10.0,
   "om": 45.0,
   "w": 30.0,
   "ma": 0.0,
   "epoch": 2463840.5
}
  1. Add the object to the Spacekit simulation.
  2. Observe that the object's position is incorrect when compared to expected orbital mechanics calculations.

Expected Behavior

  • The object should follow the correct Keplerian trajectory based on its orbital parameters.
  • Objects with e > 0.9 should still be properly plotted according to their mean anomaly and true anomaly computations.

Actual Behavior

  • The object remains static or is plotted in an incorrect position.
  • The update(jd) function correctly prints debug logs showing updated values for mean anomaly (M), but the position is not visually updated in the WebGL scene.

Potential Cause

  • The calculation of a0 for objects with e > 0.9 may be incorrect or not properly fed into the shader update.
  • The handling of mean anomaly (M) and a0 might be inconsistent with how Spacekit expects to compute the position in highly eccentric cases.

Suggested Fix

  • Review how KeplerParticles.update(jd) updates M and a0.
  • Ensure that M is properly propagated for high-eccentricity objects.
  • Check if the position update logic in the fragment shader or vertex shader is correctly using these updated values.
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

No branches or pull requests

1 participant