Hi!! I'm trying to make an orbit simulation with Matlab, and I'm having some trouble making it simulate real scenarios such as the ISS, the Moon or a sattelite in Geosynchronous orbit.My model is extremely simple, I avoided so many facts I'm kind of embarassed presenting this here, but perhaps you could help me with some advices.Basically what I did was just consider the gravitational attraction between two spots in a cartesian coordinate system. Every body is just a spot in the system. The Earth does not move, it's not affected by the satellite's gravitational pull.The key is the orbital speed, I believe my mistake is here. The sattelite is given an initial distance from the center of the earth, an initial orbital speed and a mass.Position is calculated as: pos_sat_x = pos_sat_x + vel_sat_x*escala_tiempo; pos_sat_y = pos_sat_y + vel_sat_y*escala_tiempo;Orbital speed as: vel_sat_x = vel_sat_x + acc_tierra_x*escala_tiempo; vel_sat_y = vel_sat_y + acc_tierra_y*escala_tiempo;And acceleration as: distancia = sqrt(pos_sat_y^2+pos_sat_x^2); gravedad = -((G*(masa_tierra*masa_satelite))/(distancia^2)); angulo = atan(pos_sat_y/pos_sat_x); acc_tierra_y = gravedad*abs(sin(angulo)); acc_tierra_x = gravedad*abs(cos(angulo));(escala_tiempo is a variable used to make the simulation faster)

Here you got a trajectory calculated with a mass of 14000 kg, an initial orbital speed of 300000 m/s (yes, 300 km/s!! ), and a starting distance of 35786 km. I tried to calculate this geosynchronous orbit with the regular orbital speed of 3 km/s but it just 'fell to earth'.

thank you so much!!! It was as you said, now all the parameters work!!you said "This is valid whenever masa_satelite << masa_tierra.". What about the Moon?? it works in my model...

Less talk, more rocket.

Jorge - I can tell why they let you teach this stuff to the astronauts.

Thank you Jorge!!!Now I'm moving to simulate an Earth-Moon trajectory. I know Wiki is not the best source but I couldn't find anywhere else. It states that post TLI burn the S-IVB+CSM+LM had a speed of 11.2 km/s is that correct??

When I load it to my simulation, the spacecraft describes an incredibly eccentric orbit, you can almost confuse it with a straight line.......I believe this should be OK since 11.2km/s is quite a speed.

Now I got a few questions:Is it OK to consider the initial velocity vector orthogonal to the position vector?? or the TLI burn was carried out with the engines facing a different angle??

Thid they made a burn to enter moon orbit??

I'm really embarassed about my ignorance thank you so much for your help!!!

Thank you so much Jorge, I'm now checking for the Apollo 17 Mission report.According to what you've said, for the post-TLI x and y velocity components, I should do vel_x = 10847.7*cos(6.947) and vel_y = 10847.7*sin(6.947) is that right?? I put it on the simulation and the result wasn't that convincing, I'm attaching it

I would really need you to help me understand the parameters of the LOI, why is it:LOI ignition: 8110.2 ft/s (-9.90º)LOI cutoff: 5512.1 ft/s (0.43º)

I'm still on cartesian system, and didn't convert the positions and velocity into vectors as you see =S I feel much more conmfortable this way because it's more intuitive

Thanks again Jorge....been working and got some news =)After 1.2 million iterations I finally calculated the trajectory after TLI, i'm attaching it, I'd need to know if it's close to the actual trajectory, some posts earlier you said the apogee was considerably away from the Moon.....and my trajectory's apogee is almost in the lunar orbit....what I don't find weird because I see no point in consuming more fuel to get an orbit further away from my target....

To try to attempt a LOI burn simulation, I'll need to put very precisly the Moon's starting point so they can meet in some spot....it's doable you think???

To finish, I'll need some further explanation about the angles, do you know any source I could read??

Thanks again Jorge....been working and got some news =)After 1.2 million iterations I finally calculated the trajectory after TLI, i'm attaching it, I'd need to know if it's close to the actual trajectory, some posts earlier you said the apogee was considerably away from the Moon.....and my trajectory's apogee is almost in the lunar orbit....what I don't find weird because I see no point in consuming more fuel to get an orbit further away from my target....To try to attempt a LOI burn simulation, I'll need to put very precisly the Moon's starting point so they can meet in some spot....it's doable you think???To finish, I'll need some further explanation about the angles, do you know any source I could read??Thank you!!!!!!Sergio