Jayfeather233 / OrbitTransCalc

Calculate deltaV for orbit transfer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If there is any feature you want to use that is not included in my program, please consider using GMAT :3.


OrbitTransCalc

Calculate deltaV for orbit transfer.

A .ipynb file inside can calculate maximum downrange and launch angle with given total dv and burning time.

Attantion: Only three out of six orbital elements are used in my program to simplify my code. They are: eccentricity (e), semimajor axis (a), inclination (i). Others like Longitude of the ascending node (Ω), Argument of periapsis (ω), True anomaly (ν, θ, or f) at epoch (t0) are not defined or assume to be 0.


This is just a library. No UI. Please refer to main.cpp for useage example.

This project is used to calculate how much deltaV you need to change your orbit. This idea comes from a game: KSP and its realistic mods. It only works for ascending/descending node only at pe/ap and using Hohmann Transfer.

It's basically accurate if you don't change your central body. You can calculate the planetary transfer, but the result is a little rough.

Please use cmake to build this project.

I have a ./start.sh that automatically use cmake to compile and run the code in Linux. If you are using Linux distributions, you can just run the script. If you are using Windows, good luck to you you can manually compile it.


For non-planetary transfer

The deltaV calculated by my program from 200km to GEO. (I slightly changed my orbit's inclination because of enough fuel)

i1

i2

If not changing the inclination:

i5

i6

Here is the 'real' useage in game.

i3

i4

You can see there is a small difference, due to Principia (n-body mod) and the engine taking time to burn, so the result is not that accurate. But it can still give you a big image of how much dV is needed.

For planetary transfer

To calculate how much dV needs from LEO to Mars/Neptune:

img7

Result:

img8

The result with Mars transfer is much difference (around 30%) to the actual dV requires.

NOTE: I recently studied Restricted Three-Body Problem and I can tell you that my code is just a bad approximation solution. Please just use cheating paper(dV-map) with Transfer Window Planner by alexmoon & TriggerAu & Nazfib.

About

Calculate deltaV for orbit transfer

License:GNU General Public License v3.0


Languages

Language:C++ 78.5%Language:Jupyter Notebook 18.6%Language:CMake 1.5%Language:C 1.4%Language:Shell 0.1%