LEO targeting - a numerical tool for orbital maneuvering planning

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
I have now added the ability to define a rocket engine with a limited propellant quantity and a given ISP which allows some mission planning.

As a proof of concept, I've calculated a geosync insertion using three burns of a liquid propellant 1500 N apogee kick motor.

The scenario starts from a highly eccentric orbit reaching the apogee over the equator with 23 deg inclination (I assume the launcher rocket dropped me into that orbit), and over the next three burns at apogee, the orbit is gradually brought to zero inclination and circularized.

This is a 3d visualization of the orbit (as you can see, my gnuplot-fu has increased somewhat...):

geosync_insertion_3d.gif


Here's the rather peculiar groundtrack of the trajectory, which creeps to a standstill at the lest-most branch where it touches the equator (as seen in the 3d plot, it actually does a full circular orbit - all concentrated in the end of the groundtrack, so it really gets stationary).

geosync_groundtrack.gif


From here it's basically a stationkeeping problem... and we learn how much propellant a given rocket engine needs to park a satellite there.
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
No - I sort of assumed its existence though, it's too easy and too interesting not to write this kind of stuff, so I can't be the first to have thought of doing it.

Edit: After skimming the manual, I somehow doubt it's an appealing option for the majority of users to quickly compute a de-orbit solution for a Shuttle flight.
 
Last edited:

statickid

CatDog from Deimos
Donator
Joined
Nov 23, 2008
Messages
1,683
Reaction score
4
Points
38
Here's a surface that closely resembles your ion transfer- its a plot of eccentricities from a given point starting with a circle (the intersecting plane). Just thought you might like it.

picture.php
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
I've just put v0.2 of the code online - this (among other things) adds the capability to define different spacecraft and rocket engines and contains support for the ion thruster computations.

As usual all can be found on my page and I'll add tutorials for the new functions over the next days.

Enjoy!
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
Windows executable of your 0.2 code: https://snoopie.at/face/beta/leo_targeting.exe

I've tested it with the ion insertion config, resulting in this 3D animated plot:
ioninsert.gif


I've used Python's matplotlib for it like so:
Code:
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation

mpl.rcParams['legend.fontsize'] = 10

fig = plt.figure()
ax = fig.gca(projection='3d')
f = open("S:\Development\leo_targeting\src\Release\geosync_insertion_ion_3d.dat")
data = zip(*[(float(l.split()[0]),float(l.split()[1]),float(l.split()[2])) for l in f])
f.close()
line, = ax.plot(data[0], data[1], data[2], label='Plot')

def update(num, x, y, z, line):
    line.set_data(x[:num], y[:num])
    line.set_3d_properties(z[:num])
    return line,

ani = animation.FuncAnimation(fig, update, len(data[0]), fargs=[data[0], data[1], data[2], line], interval=1, blit=True)
ax.legend()

plt.show()
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
Thanks - the plot looks about right.

I've just put the windows executable online, and a first tutorial for how to use the spacecraft block has also been added.

Quick question - did you have to still add the extra header, or did I manage this time to eliminate all 'or' and 'and'?
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
Quick question - did you have to still add the extra header, or did I manage this time to eliminate all 'or' and 'and'?

Everything worked out of the box, no tweaking needed this time. :thumbup:
 

Wolf

Donator
Donator
Joined
Feb 10, 2008
Messages
1,091
Reaction score
11
Points
38
Location
Milan
Would it be possible to make this an “in game” tool, like an MFD or some aid like those in the Orbiter Utility folder?
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
I'm currently adding 3rd body perturbations and have finished the framework to define and instance such bodies yesterday. Now I'm cross-checking the results against analytical, but since I didn't find overly much on detailed plots of lunar perturbations, I've decided I might just as well let a spacecraft orbit the Moon while it moves around Earth and check orbital period against the radius relative to the Moon.

In the course of that, I happened to generate this funny picture - it's how the orbit of a craft orbiting the moon about 1500 km above the surface looks in Earth-centered coordinates.

lunar_orbit.gif


The small wiggles are the orbits around the Moon and the arc is the movement of the Moon itself.

(so while I originally only wanted to study Earth orbits, this is actually sufficient to investigate a lunar transfer orbit or Lagrange point dynamics just as well...)
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
Heh - I happened to stumble across a treasure-trove (of course I knew in theory of such things, but, well, hands on is always different).

I couldn't resist trying to plan a trajectory to the Moon once it was in-sim, and stumbled upon the whole zoo of low energy trajectory solutions.

If the spacecraft gets just nudged into the L1 Lagrange point region, the future trajectory can be altered with really tiny propellant usage - basically the vessel gets pulled towards the Moon, but by a tiny nudge this or that way, the closest distance can be controlled - which leads to vastly different swing-by scenarios - the craft can be deflected out of the orbital plane by 90 degrees, or set onto a retrograde orbit away from the Moon where it leaves its Hill sphere quickly - or deflected along the lunar orbit, where it gets de-celerated by the Moon following it and relatively easily ends up in a closed orbit via a small deceleration burn (for comparison, a Hohmann arrival burn at lunar orbit takes 590 m/s, my cheapest capture into an elliptic orbit was around 150 m/s (there's probably even cheaper solutions - I didn't run the simulation for too long, so I wanted to see periodicity soon).

At the same time, there's a series of marginal orbits where the craft goes around the Moon a few times, but then the perturbations by Earth grow so much that it leaves lunar orbit again.

I'm still struggling to get a good visualization of what is happening - plotting trajectories in 3d space easily leads to a lot of Spaghetti. But this is terribly good fun to explore.

(Sorry to those who already know this stuff to sound over-excited...) :lol:
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
Despite movie making, I've finally managed to bring the next version 0.3 of the software into existence, source code can be found in the usual place.

This allows to specify the gravitational influence of (up to five) other bodies on an orbit around Earth - but you can use it to explore transfer to the Moon if you so desire (an Earth-centered coordinate system is just a bit awkward to specify the state vectors).

I've ran some sanity tests, and the resulting perturbations look qualitatively like I'd expect, the orbital dynamics around the Moon seems okay and the one where I found an analytical benchmark (mean drift of the longitude of ascending node of a geosync orbit due to the Moon) seems to come out okay, but I will honestly say that coding the perturbations in Earth-centered coordinates I have managed to confuse myself no less than three times, so there may be bugs left to discover.

I'll start adding new pages to the tutorial series tomorrow to explain the new functions - have fun!

(Transfers will probably be a bit more user-friendly in the next version...)
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
That's the moon-relative, right?

My suspicion is that gets a lot of perturbation from Earth, but I haven't analyzed in detail.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
That's the moon-relative, right?

My suspicion is that gets a lot of perturbation from Earth, but I haven't analyzed in detail.

It is the 2D plot and suffixed with "_rel", so yeah, I guess so. On the grand scale, it looks like a thick line depicting a circular orbit, but zoomed in you get these differences.

No particular interest here, I just wanted to quick-check the binary.
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
Thanks for the Windows work - the executable should now be available (and the first tutorial page is also added).
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
Quick note: I just discovered a regression in the latest version of the code that leads to PEG-7 targeted burns not being executed when imperial units are chosen (seems my attempts to streamline the unit management were not entirely successful).

I *think* I understand the issue and will publish a fix shortly.
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
Windows executable is also online.

Sorry for the mess... should have done more regression-testing...
 
Top