Calculating trajectory of spaceship-like object

  • Thread starter Thread starter hospadar
  • Start date Start date
  • Tags Tags
    Trajectory
AI Thread Summary
The discussion focuses on developing a 2D video game featuring spaceship mechanics, where players can specify a destination and desired velocity. Key elements include the ships’ fixed turning speeds, maximum speeds, and limited thrust directions, with no friction or external forces acting on them. The challenge lies in calculating the best trajectory by combining velocity and position math, particularly in determining when to turn and thrust. References to astrodynamics literature, including Lambert's problem, are provided for deeper understanding, although the complexity of finite burns is noted as a limitation in typical graduate texts. Ultimately, the goal is to create a visually smooth acceleration experience while using instantaneous delta-v calculations.
hospadar
Messages
2
Reaction score
0
I want to make a simple little video game with spaceships in it. The game only takes place in 2 dimensions, although I suspect any math would be applicable to more dimensions.

The spaceships:
- Have a set turning speed (radians/sec, different ships may be able to turn faster or slower)
- Have a maximum speed (not realistic for space, but better for video games)
- Have thrusters which only provide thrust in a limited number of fixed directions. Most likely only forwards or only forwards and backwards.
- The spaceships will have inertia, and there will be no friction acting on them
- There will be no (predictable) forces acting on the spaceship other than the thrusters, no gravity, etc.
- The mass/inertia of the ship doesn't change ever


The User will specify where they want their spaceship to end up, and the heading and speed they want to have when their ship arrives at the destination. So I need to take an initial position and velocity, a final position and velocity, and generate a set of turns and thruster firings that will deliver the ship to the final position at the correct velocity.

So what I need to figure out is how to actually compute the best trajectory, when to turn, when to thrust, etc. It may not be possible to guarantee the best possible trajectory, but as long as I can compute a decent, reasonable looking trajectory, the rest can be left up to the user (if a user isn't happy with a trajectory they could plot it in many steps for example).

My quandary really is how to combine the velocity math with the position math. It's easy enough to calculate the turns and thruster firing which will change one velocity to another (simple vector addition/subtraction), and it doesn't seem terribly difficult to figure out how to get a ship with a certain velocity from one point to another (more relatively simple vector math).

Any thoughts/suggestions/references would be much appreciated.

Thanks!
 
Physics news on Phys.org
You are, perhaps innocently, asking us to write a book for you. Multiple books, in fact, and all at the graduate level.

Some refererences:

Fundamentals of Astrodynamics and Applications by David Vallado is an excellent reference. Some of the section regarding Lambert's problem is available at Google books: http://books.google.com/books?id=PJLlWzMBKjkC&pg=RA1-PA448#v=onepage&q=&f=false

Fundamentals of Astrodynamics by Bate, Mueller, and White also covers the topic.

Chapter 2 ("Guidance Algorithm") of http://dspace.mit.edu/bitstream/handle/1721.1/34137/67775726.pdf?sequence=1" does a nice job of describing Lambert's problem.

The graduate level aerospace engineering class "Space Flight Dynamics" at University of Colorado covers this topic (along with many other topics). Home page for ASEN5050: http://ccar.colorado.edu/asen5050/ASEN5050/Overview.html. Click on the "Lectures" button at the top. Lectures 8-12 cover orbital maneuvers. Lecture 11 covers "Lambert's Problem".


Note that all of the above except for the thesis paper assume impulsive delta-Vs (instantaneous changes in velocity). Using finite burns, which is what you are asking about, is beyond the scope of most graduate level textbooks.


To spice things up for your users, you might want to occasionally flash the message "Lambert target algorithm failure" to your users. Seeing that message certainly did spice things up for the astronauts and mission controllers for STS-49 and STS-51. See http://ston.jsc.nasa.gov/collections/TRS/_techrep/CR-2007-213697.pdf for details.
 
Last edited by a moderator:
Thanks for the reply, very helpful.

I would actually be useing instantaneous delta-v "under the hood" although it would appear to the user visually as smooth acceleration.
 
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Hello everyone, Consider the problem in which a car is told to travel at 30 km/h for L kilometers and then at 60 km/h for another L kilometers. Next, you are asked to determine the average speed. My question is: although we know that the average speed in this case is the harmonic mean of the two speeds, is it also possible to state that the average speed over this 2L-kilometer stretch can be obtained as a weighted average of the two speeds? Best regards, DaTario
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Back
Top