Project Trajectory Optimization Tool Development

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
rappolee: That may not work fully as you're intending it. If you plan on leaving Saturn's orbit, then at some point the sun will become the primary gravitational influence. You will not get an accurate simulation if you use Saturn as the Central Body and then try to send the probe to, say, Uranus or Neptune. You must stay within the system of the Central Body.
 

rappolee

New member
Joined
Jan 14, 2011
Messages
9
Reaction score
0
Points
0
rappolee: That may not work fully as you're intending it. If you plan on leaving Saturn's orbit, then at some point the sun will become the primary gravitational influence. You will not get an accurate simulation if you use Saturn as the Central Body and then try to send the probe to, say, Uranus or Neptune. You must stay within the system of the Central Body.



ok, sorry to hear that.So no utilizing the sun as the central body and then doing a satellite tour?
what about the sun is the central body but the spacecraft is not leaving earth?
let me go back read your " read me" PDF :)
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
If the spacecraft is not leaving Earth, then you'll want to use the Earth as the central body. "Central Body" is the primary source of gravitation that the program uses. If you're staying near a planet, use that planet.

---------- Post added at 06:05 PM ---------- Previous post was at 12:08 AM ----------

Tool has been updated to version 0.8 with numerous fixes and additions. See first post in this thread for details. The updated file should be hitting OHM shortly.
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Finally ran the standalone 0.8. Very cool! How about adding a blurb about B-plane (adapted from the Horizons doc):

"The B-plane is defined by three orthogonal vectors: T, R and S. The origin lies at celestial body's center. T lies in B-plane, pointing in the direction of decreasing celestial longitude. R lies in B-plane, pointing in the direction of decreasing celestial latitude (south). S is directed along the relative velocity vector of the vessel at body encounter, perpendicular to the B-plane (and thus orthogonal to R and T)."
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Wishbone: Thanks for the suggestion. It's probably not a bad idea, I was searching for a decent definition of the B-Plane. It's a hard concept to make understood.

Any other comments you have would be great. I'm working at making 0.8 the last beta release, and I'd like my next upload to be v1.0, if at all possible.
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Ideas I've got (it is lunchtime at work :) ):
1. Directory structure could match that of Orbiter - would suggest placing the executable under "Utils\TrajectoryOptimizationTool", and spice kernels into the "Kernels" directory (ajaja's spice.dll already uses this folder).
2. Locking out the "Reload SPICE kernels" button during the run. I haven't tried that, but suppose hitting it by accident could lead to some nastiness. (the same goes for other important controls - flight plan, perhaps)
3. Restart functionality - if I'm finishing lunch, for instance, would like to pause execution and save restart data for later.

Will certainly use the tool for more than test runs as soon as I get ready for the next interplanetary trip (to Neptune, I hope) and will report the results!
 
Last edited:

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Ideas I've got (it is lunchtime at work :) ):
1. Directory structure could match that of Orbiter - would suggest placing the executable under "Utils\TrajectoryOptimizationTool", and spice kernels into the "Kernels" directory (ajaja's spice.dll already uses this folder).
2. Locking out the "Reload SPICE kernels" button during the run. I haven't tried that, but suppose hitting it by accident could lead to some nastiness. (the same goes for other important controls - flight plan, perhaps)
3. Restart functionality - if I'm finishing lunch, for instance, would like to pause execution and save restart data for later.

Will certainly use the tool for more than test runs as soon as I get ready for the next interplanetary trip (to Neptune, I hope) and will report the results!

Hi Wishbone:

Thanks for the ideas. Let me respond to them in turn:

1) This one may not actually be possible, believe it or not. The MATLAB Compiler is real touchy about where it will look for referenced files. I think every sub-directory in the executable's directory gets searched, but nothing outside of that. A little research shows that adding paths to the search path list doesn't work with compiled applications, meaning that is out, as well. For now I'm not going to touch this, but it's something to keep in mind for later, I suppose, if I ever feel like going that way.

2) Very good point. I'll be doing this.

3) I think I figured out a decent way to make this work, I'll give implementing it a go tomorrow as time allows. It's a nice feature, though.

Thanks! :cheers:
 

Spaceboy79

New member
Joined
Jan 19, 2011
Messages
1
Reaction score
0
Points
0
Arrowstar, stumbled onto the work and threads and I have to say great job. Some for-fun suggestions for add-ons that might be of interest if you continue developing the tool:

A low-thrust transfer addon using exponential sinusoid trajectories:
Dario Izzo (2006) Lambert's problem for exponential sinusoids. In Journal of Guidance, Control, and Dynamics.
http://www.esa.int/gsp/ACT/doc/MAD/pub/ACT-TNT-MAD-LMSP01.pdf
-This can easily be modified into an alternative Lambert solver and makes for some fun trade studies (bigger launch windows, more solutions, etc.)

Addition of a differential evolution solver for the optimizations (shown to work quite well for this problem):
Given a range of dates, flyby sequences, etc, a relatively straightforward approach with nice straightforward open-source solvers in multiple languages - including MATLAB
http://www.icsi.berkeley.edu/~storn/code.html. These will help produce globally optimal solutions rather than locally optimal ones, and is especially helpful for multi-flyby solutions when the Pork-Chop plots can no longer be used.

Implementation of the Gooding algorithm for the Lambert solver (known to be one of the most robust approaches available, converges when others method such as p-iteration have trouble)
R.H. Gooding, "A procedure for the solution of Lambert's orbital boundary-value problem
", Celestial Mechanics and Dynamical Astronomy
Volume 48, Number 2, 145-165, DOI: 10.1007/BF00049511

A Kepler Solver to visualize the trajectories in position space:
Using F and G series as taught in astrodynamics courses at Purdue. This way you can see what the trajectory looks like. (You may have already done this).

Keep up the great work.
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Arrowstar, think have solved the directory problem by hard-linking. The tool would make a neat course project or, with some growth along the low-thrust lines indicated by Spaceboy79, even a thesis :) (not that I am overly fond of GAs).
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Wishbone: I think I'm going to leave the directory structure they way I've got it for the time being. Since this tool doesn't use the normal directory Orbiter structure anyway (/config, /textures, /modules, etc) I guess I'm not seeing any usefulness is reorganizing how the tool is setup. On another note, your second suggestion was straightforward to implement, so I've done that and it works nicely. Regarding pause/resume capability: it'd be extremely difficult to try to allow the program to be completely closed and then reopened at some point you left off. I wasn't able to see a way to do that. What I was able to do was build in a pause/resume function into the tool that will resume program execution while the program is open. I guess you could always minimize it if you want to pause for an extended duration. Probably the best I can do in this regard without a completely rewrite.

Also - what's a GA? :D

Spaceboy79: Thanks for the great information! At the moment, your link to the differential evolution solver is quite intriguing. Could I PM you with some questions I have regarding how it works?

The low-thrust transfer work is something I want to get to, as well. Most likely I'll build that as a separate tool, as I can see some differences in design philosophy that would have to be taken into account. Thanks for the link to the paper! I'll be bookmarking it for sure. :)

I'll look into the Gooding algorithm. I've heard of it, of course, but it wasn't covered in the texts I was using as reference, so I passed it by. Thanks for the reference. :)
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Arrowstar - no pressure. GA stands for genetic algorithms, popularized by David Goldberg and co., there are lots of techniques to do global optimization, most of them randomized, and not guaranteed to be better that setting random starting points and doing standard local maximization from there.

There are quite a few articles on low-thrust trajectories in the J of GC and D.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Thanks for the tips. I think I'm going to leave global optimization up to the user for now. Part of my graduate coursework next year will be a trajectory optimization course, so perhaps I'll improve this aspect of my work then. :)

---------- Post added 01-22-11 at 12:33 AM ---------- Previous post was 01-21-11 at 02:38 PM ----------

Updated to version 1.0. See the first post of this thread for details and download information.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Bit of a news update on this little project:

I've implemented a Gooding Lambert solver that should be more robust than the p-iteration technique I was using before. As an added bonus, it can handle multiple revolution transfers, so Wishbone, you got your wish. I also did some hardcore optimization of the code that searches through the B-plane for the correct fly-by trajectory, and it is now a solid five time faster than it was before. Other minus updates include an "estimated time remaining" counter and some other minor back-end tweaks.

Version 1.1 is going to be a lot better than version 1.0! :)
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Thanks to sraque's suggestion, the Trajectory Optimization Tool has a new feature. If asked, it now outputs a plot of arrival velocities on the same arrival/departure plane that the C3 energy and fly-by deltaV are plotted on. Here's an example from my favorite transfer, 2005 Earth to Mars:

First, let me display the Porkchop Plot for this transfer. It appears something like:
porkchop.png


Now, let's take a look at the arrival velocity for our spacecraft with a similar plot:

arrivevel.png


If you inspect these plots closely, you see you can decrease your arrival velocity by a pretty good amount while keeping C3 energy low if you leave Earth on MJD 53600 and arrive at Mars about MJD 53825 or so. This should help mission planning quite a bit, I hope!

New version with this feature and more should be out either tonight or tomorrow morning. :tiphat:

---------- Post added at 11:58 PM ---------- Previous post was at 09:42 PM ----------

The Trajectory Optimization Tool has been updated to version 1.1! The list of updates for this version is as follows:

Version 1.1 – Major Revision. The Lambert solver has been changed from p-iteration to a Gooding solver, which is more robust and should also be faster. Multiple revolution transfers are also possible using this solver now. The B-Plane fly-by search code has been heavily optimized for a five-fold increase in speed during this segment of calculations. The ability to output a plot of arrival velocities at the final body on the flight plan has been implemented. An estimated time remaining clock has been added. The legend on plots has been moved to below the abscissa on all plots. Other minor bug fixes and tweaks. Documentation updated.

The upload to Orbit Hanger Mods is in progress, so this should be hitting shelves in a few minutes. I would highly recommend updating to this version, as the speed improvements alone should make it worthwhile.

As always, comments, questions, and concerns are appreciated!
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Another little update. Yesterday I started work on a cost function for trajectory optimization directly. I'm still working out some kinks, but the basic idea is to be able to use this function in a nonlinear, multi-variable minimization routine to find the optimal trajectory around a set of initial conditions that would include launch date, flyby dates, arrival date, and the number of revolutions for trajectories like the V-E-E gravity assist. It won't do all the work for you, but it'll make looking for those exact launch/arrival numbers easier once you've used porkchops to narrow things down a bit.

Like I said, I've still got a kink or two in the cost function, but I'm hoping this'll make it into v1.2, along with some bug fixes and a tweak to the B-Plane plot.

As usual, comments, questions, and concerns are welcome! :)
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
The tool has been updated to version 1.1.1, which is a bug fix release. No new features have been included. The official description:

Version 1.1.1 – Bug-fix release. The zooming/panning issue with axis tick mark numbers on graphs should be eliminated. The B-Plane plot legend has been moved and updated to show additional information. Other minor tweaks.

The full version of the Tool can be found [ame="http://www.orbithangar.com/searchid.php?ID=5034"]here[/ame]. Everyone with the previous version (1.1) installed can grab the patch to upgrade [ame="http://www.orbithangar.com/searchid.php?ID=5076"]here[/ame]. The patch is much smaller than the full installation.
 

The Aviator

Active member
Joined
Jul 20, 2008
Messages
127
Reaction score
0
Points
31
Location
Venegono
I have a problem: The window doesn't fit with my monitor, and I can't scroll or resize it. So I can't view or use the top buttons and I can see only few pixels of the Optimize Trajectory button... Here's a screenshot.
 

Attachments

  • Desktop.jpg
    Desktop.jpg
    140.4 KB · Views: 19
Last edited:

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
I have a problem: The window doesn't fit with my monitor, and I can't scroll or resize it. So I can't view or use the top buttons and I can see only few pixels of the Optimize Trajectory button... Here's a screenshot.

Aviator: What resolution are you using? The tool should fit on any monitor that is running at least 900px in height.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
I'm using my max resolution: 1366x768px...

Well, let me see what I can do.

EDIT: Alright, it should be possible for me to get it under 750px, but it's going to involve a bit of a reorganization of the GUI and the implementation of "tabs". I should be able to do it this weekend, if my academic workload doesn't skyrocket in the next two days.
 
Last edited:
Top