Writing a matlab program to solve the Kepler Problem (Universal Vars)

Click For Summary
SUMMARY

The discussion focuses on a Matlab program designed to solve the Kepler problem for elliptical, hyperbolic, and circular orbits, as outlined in "Fundamentals of Astrodynamics" by Bate, Mueller, and White. The user successfully implements solutions for these orbits but encounters challenges with parabolic orbits due to the denominator of the semi-major axis (a) approaching zero. The user attempts to resolve this by calculating the reciprocal of a, leading to issues with initial guesses in their iterative method. Assistance is sought for deriving the necessary equations to handle parabolic cases effectively.

PREREQUISITES
  • Understanding of Kepler's laws of planetary motion
  • Proficiency in Matlab programming
  • Familiarity with numerical methods for solving equations
  • Knowledge of orbital mechanics, particularly eccentricity calculations
NEXT STEPS
  • Research methods for handling parabolic orbits in orbital mechanics
  • Learn about numerical stability in iterative methods for solving equations
  • Explore series representations for trigonometric functions in Matlab
  • Study the derivation and application of the eccentricity formula for different orbit types
USEFUL FOR

Aerospace engineers, Matlab programmers, and students of orbital mechanics seeking to enhance their understanding of the Kepler problem and its computational solutions.

Julez55
Messages
3
Reaction score
0
TL;DR
I'm writing a matlab program to solve the Kepler problem for all orbit cases. It works successfully for Elliptic, Circular, and Hyperbolic. The case of hyperbolic orbits where a blows up is giving me trouble.
Introduction: I am writing a Matlab program that solves the Kepler problem for any Elliptical, Hyperbolic, or Circular orbit. Given an initial position vector, velocity vector, find the position vector and velocity vector after some given time. I am not doing this for any class, I have been doing this to work on my computer science abilities. The textbook I am using is "Fundamentals of Astrodynamics" by Bate, Mueller, and White. The specific program I am working on is a suggested project in the back of the book.

The Problem: My program successfully solves the Kepler problem for all elliptical, hyperbolic, and circular orbits. However, I'm having a hard time solving the case of Parabolic orbits where the denominator of a goes to zero. I tried to resolve this by calculating the reciprocal of a, which then, in this case, is zero. This leads to the initial guess of x_n to be zero, and the initial guess of z_n to be zero as well, which causes the iteration to blow up. I also added a case inside the iteration which computes the values of C_n and S_n using their series representations when the reciprocal of a, called alpha in my program is equal to zero. I attached my Matlab program below.

If anybody thinks they can help me with this I would love to have further conversation, I'd really like to figure this one out!
 

Attachments

Physics news on Phys.org
It would really help if you wrote out here the equations of interest. Having a brief look at your code, I believe you are trying to calculate the eccentricity. My guess is that you are using the equation that only works with ##0<e<1##, which is for an ellipse.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
2
Views
3K
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K