Board index FlightGear Development Spaceflight

LEO targeting

Discussion about development and usage of spacecraft

LEO targeting

Postby Thorsten » Sat Jan 05, 2019 5:38 pm

I'm going to start a new thread for the LEO targeting tool since it's not actually related to the Shuttle as such.

What is LEO targeting?

It is a GPL-licensed, commandline-controlled numerical solver for various orbital targeting problems - mainly intended for use in low Earth orbit, although it can do problems beyond that.

What can it do?

Unlike analytical expressions, it can deal with finite burn duration effects, the change of acceleration during a burn as propellant is depleted, J2 and J3 perturbations due to Earth's non-spherical nature, perturbations caused by other solar system bodies... and taking all these effects into account, it can fit burn solutions.

For instance, if you need to de-orbit a Shuttle to a specific landing site and want to know what the optimal time for the burn is to make it to a good entry and not waste any propellant - the tool can do it.

If you want a transfer orbit from your current orbit to another orbital target - the tool can do it.

If you simply want to learn orbital mechanics, play around with how to get from one orbit to another orbit without a full simulation environment - the tool can do it.

If you want to visualize orbits with 3d plots - the tool can generate the data.

As an example, here's a visualization of periodic variations of the eccentricity in J2 and J3 gravity

Image

What is the current status?

The current release 0.4 is available from my page where there's also a set of tutorials on how to use it.

The latest release supports numerical solutions of the Lambert problem (finding a transfer orbit given the initial burn time and the desired arrival time).

As a quick example, here's a visualization of the arrival point for realistic conditions (finite burn duration, J3 gravity,...) and the analytical solution (instantaneous burns, spherical gravity) when the solution of the latter is always used.

Image

Basically, using the analytical expression in the realistic situation misses the target intercept by 2.5 km and does not bring the chaser spacecraft to a proper rest relative to the target. This could of course be corrected, but would cost extra propellant and take extra time.
Thorsten
 
Posts: 10820
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Tue Jan 15, 2019 7:25 pm

Very nice, and explanations for Rendez Vous, Lambert problem etc are really instructive.
GinGin
 
Posts: 688
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby bugman » Thu Jan 24, 2019 10:18 am

Continuing from https://forum.flightgear.org/viewtopic.php?t=35276#p341783, have you thought of integrating your c++ code into simgear and providing a Nasal wrapper function to expose the numerical calculations to Nasal? If computation time is ever an issue, the use of the ubiquitous BLAS libraries to replace the MathHelpers functions might make a c++ backend significantly more advantageous than a Nasal backend.

Regards,
Edward
bugman
Moderator
 
Posts: 1682
Joined: Thu Mar 19, 2015 9:01 am
Version: next

Re: LEO targeting

Postby Thorsten » Thu Jan 24, 2019 10:41 am

Computation time is only an issue because we're generally getting solutions too fast - in the real Shuttle, a Lambert fit usually took around two minutes to compute - the Nasal code usually takes less than half of that. We're regularly able to compute stuff 'instantaneously' which took of the order of 20-30 seconds aboard the real thing, so in places I have even inserted timers to generate a delay.

(And the computation doesn't drag framerate anyway because it's simply threaded out...)

have you thought of integrating your c++ code into simgear and providing a Nasal wrapper function to expose the numerical calculations to Nasal


Generally we don't do that kind of thing for a single aircraft.
Thorsten
 
Posts: 10820
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby bugman » Thu Jan 24, 2019 11:27 am

Not much point then. As for a single aircraft, I would have assumed that this code would have been useful for future FG spacecraft visiting the ISS (or other LEO targets). It might even stimulate interest in FG rocket building ;)

Regards,
Edward
bugman
Moderator
 
Posts: 1682
Joined: Thu Mar 19, 2015 9:01 am
Version: next

Re: LEO targeting

Postby Thorsten » Thu Jan 24, 2019 11:35 am

The code is available and GPL licensed - whoever wants to include into whatever is free to do so. I don't have anywhere near the time (nor the interest) to include it into SG.
Thorsten
 
Posts: 10820
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Sat Mar 23, 2019 2:41 pm

Hey Thorsten, I am learning to use Gnuplot .

Do you usually use some script for it ?
GinGin
 
Posts: 688
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby Thorsten » Sat Mar 23, 2019 2:47 pm

Nah - I've been using it for two decades, it's like an old friend to me, I just type my commandlines and it does what I want.
Thorsten
 
Posts: 10820
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Sat Mar 23, 2019 2:57 pm

Ah ok, two days for me, fresh honeymoon :mrgreen:
It's quite powerfull, though I still have to learn to properly define the settings for multiple plots.

I want to visualize all those J2 and J3 effetcs depending of orbital parameters.
GinGin
 
Posts: 688
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby GinGin » Sat Mar 23, 2019 4:25 pm

Alright, my first plot ahah.

ISS on circular Orbit at 350 km, 51 degrees inclination with J2/3 effects, we can see a variation over 8 km on one orbit due to Non Spherical Gravity, very instructive tool

Image



Very educative tool
Here circular Orbit, 350 km on equator
Quite massive variation over one orbit with Harmonics effect


Image


Image
GinGin
 
Posts: 688
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby Thorsten » Tue Jul 02, 2019 6:22 am

I got some use cases with higher orbit insertion (Shuttle with OMS kit mostly...) recently for which the tool wasn't really working well, so I invested some work to fix various issues.

The PEG-4 fitting should now be more stable (aka the range of parameters for which it converges wider) and the fit becomes progressively more permissive with the number of iterations - assuming people would rather want an inexact solution than no solution - for practical applications I think it's often about fractions of a second of burn time, so it may not even be possible to reach perfect accuracy anyway.

There's also a bug fixed for the second Lambert burn when inperial units are chosen, and the 'up' velocity definition in proximity coordinates is now based on the proper parallel-transported derivative.

Here's the v0.41 bugfix release source code- enjoy!
Thorsten
 
Posts: 10820
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Tue Jul 02, 2019 6:48 am

Looking nice thanks
GinGin
 
Posts: 688
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin


Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 0 guests