Guiding rocket program

Gerdih

Member
Joined
Jan 8, 2010
Messages
776
Reaction score
7
Points
18
Location
Barcelona
Hi, these days I am fantasizing with a program that guides a rocket in a ascent trajectory. I post this here to get ideas and opinions about this. The program will be done with python.

Idea of the algorithm:

Imagine we have the rocket fixed with a transversal axis from the center of gravity. I would do iterations in a certain increment of (t), each iteration gives me a velocity vector (v1) that depends on the height of the rocket at that moment. The rocket at (t) have a certain velocity vector (v0), then given (v1), the program calculate the change in (F) that the rocket need to go from (v0) to (v1). this will give me new coordinates at the end of the iteration (x,y), these coordinates will be used to get the new vector of velocity that the rocket will have to achieve in the next iteration.

The program will calculate drag (Fd) and weight at all iterations. The velocity vector is got from the derivate of the trajectory ( let's say a parabola to get it easier). Of course in reality (x,y) in each iteration are no calculed but got from the sensors of the rocket. This way if there is a deviation, the rocket will return to a good trajectory searching to get the (v1) vector.

All this is in 2D. I doesnt have thought about 3D but maybe I will add it with a second 2D plane. This is not for Orbiter, only to learn something :)
I upload a image to see this better. green = acelerations (x,y) red vector=v1 blue vector=v0
 

Attachments

  • Imatge 1.png
    Imatge 1.png
    24.7 KB · Views: 36
Last edited:
If this project is for learning, than one of the things you should learn are Runge-Kutta methods. They're used to calculate the next set of variables for position and velocity, by taking into account current position, velocity and acceleration.

Also, for controlling rocket trajectory, you should learn about PID controller. It's the simplest control algorithm for when you don't know much about the system, but would like to put it into a desired state.
 
In reality, I think I would get velocity (maybe even position) by integrating acceleration. But that might involve too much noise.
 
It sounds like what you are attempting is very similar to Lambert Guidance. That might be something worth looking into.
 
Back
Top