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
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
Last edited: