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

In summary, the conversation discusses using MATLAB to simulate a 2-D solution to the 3-body problem, with certain assumptions such as a stationary Earth and Moon and a constant spaceship mass. The individual is having trouble understanding and modifying a sample code they found and is seeking help and explanation. They also express gratitude for any assistance.
  • #1
thundergod
1
0
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: 625
  • orbitode.m
    2.7 KB · Views: 568
Physics news on Phys.org
  • #3


Hello,

I am familiar with MATLAB and its capabilities in solving complex mathematical problems. It is great to see that you are using MATLAB to simulate the TLI (Trans Lunar Injection) and learn about basic orbital mechanics.

Firstly, let me address your concerns regarding the error messages you are receiving. The error 'no default parameters set' means that the code is expecting some parameters to be defined before it can run, but they have not been set. This could be due to missing input or incorrect syntax in your code. I would suggest going through the code line by line and checking for any errors or missing parameters.

As for the code itself, 'orbit.m' is the main script that calls upon the function 'orbitode.m'. This function is solving the ordinary differential equations (ODEs) that describe the motion of the spaceship in 2-D space. The ODEs are derived from the basic orbital mechanics equations, taking into account the assumptions you have listed.

In simple terms, MATLAB is solving these equations numerically and plotting the trajectory of the spaceship over time. This allows you to visualize and analyze its motion in a 2-D space. It is a powerful tool for simulating complex systems and understanding their behavior.

I would recommend going through some basic MATLAB tutorials to get a better understanding of the syntax and functions used in the code. This will also help you in modifying the code to suit your specific project requirements.

I hope this helps and good luck with your project!
 

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

1. What is Matlab 2-D simulation for TLI?

Matlab 2-D simulation for TLI is a mathematical model used to simulate the trajectory of a spacecraft during a Trans Lunar Injection (TLI) maneuver. It uses the principles of basic orbital mechanics to calculate the position, velocity, and acceleration of the spacecraft as it travels from Earth's orbit to the Moon's orbit.

2. How does Matlab 2-D simulation for TLI work?

The simulation uses numerical integration to solve the equations of motion for the spacecraft during the TLI maneuver. It takes into account the gravitational forces of Earth, the Moon, and other celestial bodies, as well as the thrust and fuel consumption of the spacecraft.

3. What are the advantages of using Matlab for TLI simulation?

Matlab allows for efficient and accurate calculations of the spacecraft's trajectory, taking into account complex variables such as gravitational forces and thrust. It also allows for easy visualization of the simulation results, making it a valuable tool for analyzing and optimizing TLI maneuvers.

4. Is Matlab 2-D simulation for TLI accurate?

Yes, when the simulation is set up correctly and the input parameters are accurate, Matlab 2-D simulation for TLI can provide highly accurate results. However, it is important to note that it is still a mathematical model and may not account for all real-world factors that could affect the spacecraft's trajectory.

5. How can Matlab 2-D simulation for TLI be used in the aerospace industry?

Matlab 2-D simulation for TLI is commonly used in the aerospace industry for mission planning and trajectory analysis. It can help engineers design and optimize TLI maneuvers, as well as simulate and predict the trajectory of spacecraft during lunar missions. It is also used for educational purposes to teach students about basic orbital mechanics and spacecraft trajectories.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Classical Physics
Replies
7
Views
879
Replies
1
Views
769
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
12K
Back
Top