View Single Post
  #2  
Old May 16th 16, 11:50 AM posted to sci.space.tech
Alain Fournier[_3_]
external usenet poster
 
Posts: 548
Default Question about orbital mechanics

On May/15/2016, 8:39 PM, Robert Heller wrote :
I am writing a program that simulates a planetary system (a star and a group
of planets in orbit about it). I am writing the program in Tcl and I have
ported a C program, Stargen
(http://www.eldacur.com/~brons/NerdCo.../StarGen.html), to generate
the planetary system and part of the ORSA (http://orsa.sourceforge.net/), to
perform orbital calculations.

At this point I can generate a planetary system and compute the orbits of the
planets. I want to add in spacecraft, but I am not sure how to determine a
spacecraft's orbit -- for a given position and velocity, which planet (if any)
would the spacecraft be in orbit about? I don't know if I should create a
'body' (an ORSA data type/class), with a given mass, position, and velocity
for the spacecraft and then compute this body's orbit with each planet and the
star (the ORSA library has a method which computes the orbital parameters
given a pair of bodies). How do I tell which is the most likely orbit?


I'm not sure of what exactly is the question here. I think that what you
want to do is compute the trajectory of the spacecraft by numerical
methods, probably the Runge-Kutta method. Wikipedia gives a good
explanation of that method (use RK4):
https://en.wikipedia.org/wiki/Runge-Kutta_methods

You would probably also want to implement a method to figure out which
planet can safely be ignored in your computations. If you want to
compute the trajectory of a spacecraft near Jupiter, you can safely
ignore Mercury. In fact you can probably ignore all the planets other
than Jupiter. But exactly under which conditions you can ignore which
planets depends on what precision of the trajectory you want. In most
cases, you can ignore all planets but the one with the greatest
gravitational pull on the spacecraft, but if you want very precise
trajectories under some planetary configurations that won't be enough.

As I said up there. I'm not really sure of what you want, if this
doesn't answer your question, or if you want more details. Please say so.


Alain Fournier