Matlab 2-D Simulation for TLI (Trans Lunar Injection) Basic Orbital Mechanics

  • Thread starter thundergod
  • Start date
  • #1
Matlab 2-D Simulation for TLI (Trans Lunar Injection) "Basic Orbital Mechanics"

Hi Everyone,

I have been assigned a project in which I am to program in matlab the solution to the 3-body problem, but in 2-D with a couple assumptions.

1) Earth and Moon are stationary.
2) Mass of spaceship is constant
3) Spaceship initially in circular orbit 20km above earth

Here is my problem, the school does not offer a class in matlab programming. So I looked all over for some sample codes I could modify.

I found one that seems to be a great start but I do not fully understand it. I was hoping someone on here could help.

I file 'orbit.m' call upon 'orbitode.m' which I believe is a standard example script for matlab. However I keep getting the error 'no default parameters set' as well as two others. Can someone please please help me figure this out.

If I could just get the file 'orbit.m' working I think I can get the rest. Also if anyone would like to briefly explain what is going on i.e. how matlab is working or what exactly it is doing that would be great!

Thanks in advance for all your help.
 

Attachments

  • orbit.m
    2 KB · Views: 511
  • orbitode.m
    2.7 KB · Views: 480

Answers and Replies

  • #2
4
0

Related Threads on Matlab 2-D Simulation for TLI (Trans Lunar Injection) Basic Orbital Mechanics

  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
1
Views
3K
Replies
2
Views
923
  • Last Post
Replies
11
Views
3K
  • Last Post
Replies
17
Views
12K
Replies
10
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
4
Views
1K
Replies
2
Views
4K
Top