Project Trajectory Optimization Tool Development

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Status update: I've been busy finishing up an internship at NASA Marshall this week, but I plan to have updates out by Sunday or Monday for people test (that GUI still needs to get written). If anyone's up for testing at that point, I'd be much obliged. :)
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Okay, so the beta release on Sunday/Monday didn't happen as expected. I ended up running into a number of features I wanted to get in and those took a few more days than expected to write. As things stands now, I actually do still have two or three more minor functions to code up. It shouldn't be long now, though.

That said, I wanted to show some screenshots of the interface and of the application in action. Call it a demonstration of what's to come. Up first:

maingui.png


This is the main user interface. The upper box shows a trajectory, just computed, swinging around a number of planets. The lower box shows the text output of the program and gives details on arrival/departure information, deltaV, etc. Spacecraft trajectory is shown in white (dashed line). You can see here that the tool did fairly well in finding a decent trajectory to Jupiter using a Venus flyby: only about 11 m/s of powered dV needed at Venus to make the transfer, and the launch vehicle only has to supply ~37 km^2/sec^2 of C3 energy to the spacecraft on Earth departure.

gascreen.png

The ToT version 2 uses a genetic algorithm to minimize a trajectory cost function that is partially user definable. Output from the genetic algorithm can be monitored to determine how well it is doing in finding an optimum solution, and settings can be changed to improve results as necessary. This screenshot shows the current value of all the "individuals" in the "population" of solutions that are currently being evolved by the algorithm.

flightplan.png

Entering a flight plan to optimize is fairly straight-forward and similar in many respects to version 1.x of the ToT.

calcc3energy.png

The ability to generate porkchop plots is still a prime function of the ToT. Arrival velocity may also be computed. The genetic algorithm will output this plots if you ask it to, and in addition, special tools (such as the one shown here) exist in the program for computing the plots independently of any optimization run.

outputoptions.png

Finally, the output plots can be customized to some extent.

Any thoughts? :)

---------- Post added 08-11-11 at 12:38 PM ---------- Previous post was 08-10-11 at 04:56 PM ----------

Alright, the first test release of version 2.0 is up and running! At the moment there's no documentation as I still need to rewrite the version 1 docs for inclusion here. Other than that, this should be the complete package. I have a few other features I want to include, but they can wait for a bit.

Download links are as follows:

Trajectory Optimization Toolbox W/ MATLAB Component Runtime (~194 MB)
Trajectory Optimization Toolbox W/O MATLAB Component Runtime (~20 MB)

Download the ZIP, unpack into a new folder, and run trajOptTool2.exe. If you don't have the MATLAB component runtime from the previous releases of TOT, get the ZIP file with the MCR. Otherwise, you can grab the smaller package without the MCR. You'll have to play around with it for now, as like I said, no documentation has been written yet. Of course, I'm open to questions. :)

Once the documentation gets written, it'll go up on OHM permanently, but I didn't want to waste Vash's space with a "beta" version, so to speak.

(NOTE: It may be a minute or two yet until the files finish uploading. If you get broken ZIPs, come back in half an hour. :) )
 
Last edited:

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Cras: Thank you! I just updated those two ZIP files with the latest version of the TOT v2. I added some basic features that were missing in the previous build, namely the ability to recall previous solutions, generate reports that describe a solution run, and some back-end things that make my life a bit easier.

The ZIPs are uploading now. If you give it a few minutes they should be fully uploaded. (Actually, the smaller NoMCR package just finished now.)

Any feedback you have would be appreciated... :)
 

sraque

New member
Joined
Jan 11, 2011
Messages
7
Reaction score
0
Points
0
Oh my goodness!! Those screenshots look great.

-Steve
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
ZIP files have been updated to include a new executable and the first draft of the user's guide. This is going to be the last revision before the OHM release unless I find something horribly wrong between now and a few days from now. :)
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
UPDATE: So I lied. ;) Tonight I revamped the multi-revolution code so that finding a multi-revolution solution was now actually possible. In doing so I greatly enhanced the speed at which the genetic algorithm finds optimal solutions for simple trajectories. Zooming and panning for the main trajectory window also was implemented.

These updates should be online shortly.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
After testing the new version 2.0 for the past few days, I don't see any reason why I shouldn't release it to the public any longer. I'll update the first post in the thread in a few minutes, but OHM download links are as follows:

[ame="http://www.orbithangar.com/searchid.php?ID=5418"]Trajectory Optimization Tool ver 2.0[/ame]

[ame="http://www.orbithangar.com/searchid.php?ID=5419"]Trajectory Optimization Tool ver 2.0 Without MATLAB Compiler Runtime[/ame]
 

Zachstar

Addon Developer
Addon Developer
Donator
Joined
May 1, 2008
Messages
654
Reaction score
0
Points
0
Location
Shreveport, Louisiana
Website
www.ibiblio.org
I have to say that in the short time I have used this... I can fell the urge to get back into Orbiter again.. Bravo!!! :thumbup:

What an amazing tool! My only issue now is figuring out how to get the info loaded into transX. Then again my very old and outdated knowledge on TransX likely isn't helping. Tips?
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Since I don't use TransX myself, at least not in a long time, I'm afraid I can't help you there. What sorts of inputs does TransX look for? If I know that, I can probably set up something to either output that information or write the TransX flight plan directly.
 

Zachstar

Addon Developer
Addon Developer
Donator
Joined
May 1, 2008
Messages
654
Reaction score
0
Points
0
Location
Shreveport, Louisiana
Website
www.ibiblio.org
I am afraid I don't know much. However it does seem to save some data in the scenario file.

Code:
BEGIN_MFD Left
  TYPE User
  MODE TransX
  Ship  GL-01
  FNumber 2
  Int 0
  Orbit True
  Vector  -61585883732.6 -4922775789.28 -161322870409
  Vector  24325.0190692 -451.754873033 -14595.6717913
  Double  1.32712439955e+020
  Double  52060.8890023
  Handle Sun
  Handle Earth
  Handle Mars
Select Target
 0 Mars
Autoplan
0 0
Plan type
0 2
Plan
0 0
Plan
0 0
Plan
0 0
Select Minor
 0 None
Manoeuvre mode
0 1
Base Orbit
0 0
Prograde vel.
 2  49.52
Man. date
 3  52060.9294723
Outward vel.
 3  -16.75
Ch. plane vel.
 1  287.9
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
Finvars
  Finish BaseFunction
  Int 5
  Orbit False
  Handle Mars
  Handle NULL
  Handle NULL
Select Target
 0 None
Autoplan
0 0
Plan type
0 1
Plan
0 0
Plan
0 2
Plan
0 0
Select Minor
 0 None
Manoeuvre mode
0 0
Base Orbit
0 1
Prograde vel.
 0  0
Man. date
 0  52060.8905114
Outward vel.
 0  0
Ch. plane vel.
 0  0
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
Draw Base
0 0
Finvars
  Finish BaseFunction
END_MFD

BEGIN_MFD Right
  TYPE User
  MODE TransX
END_MFD

That was from my current state which I believe I was in the middle of an epic fail plan to mars in the process.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Hmm. Well, that tells me some things, but not everything by any means. For example, I'm not sure what those vectors or double values are in the initial TransX declaration.

If anyone has any insight into what TransX spits out and how it does so, or knows where that information is located, could you please let me know? :)
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
An uneducated guess: Vector 1 is position, vector 2 is velocity, double 1 is ???, double 2 is a date/time in MJD format.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Making some educated guesses on the units of those quantities, I'd say you're probably right. Still, it looks like there's a lot of things to decode. Do you know who maintains TransX now? I suppose I'll need to send an email.
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Nobody. The last maintainer was agentgonzo, but as far as I can judge it's abandonware now.
 

Zachstar

Addon Developer
Addon Developer
Donator
Joined
May 1, 2008
Messages
654
Reaction score
0
Points
0
Location
Shreveport, Louisiana
Website
www.ibiblio.org
Perhaps it might help if I posted the part of the file from one of the included sample TransX scns of the default orbiter.

A slingshot

Code:
BEGIN_MFD Left
  TYPE User
  MODE TransX
  Ship  GL-01
  FNumber 5
  Int 1
  Orbit True
  Vector  2603222.3662 835266.081978 5754595.12491
  Vector  -360.776764277 -76.4620501945 174.303887117
  Double  3.98600439969e+014
  Double  42988.5430289
  Handle Earth
  Handle NULL
  Handle NULL
Select Target
 0 Escape
Autoplan
0 0
Plan type
0 0
Plan
0 1
Plan
0 0
Plan
0 0
Select Minor
 0 None
Manoeuvre mode
0 0
Base Orbit
0 0
Prograde vel.
 0  0
Man. date
 0  42988.5430289
Outward vel.
 0  0
Ch. plane vel.
 0  0
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 3
Scale to view
0 0
Advanced
0 0
Pe Distance
 0  6571231.87388
Ej Orientation
 0  0.0795870138909
Equatorial view
0 0
Finvars
  Finish BaseFunction
  Int 2
  Orbit False
  Handle Sun
  Handle Earth
  Handle Jupiter
Select Target
 0 Jupiter
Autoplan
0 0
Plan type
0 2
Plan
0 0
Plan
0 0
Plan
0 1
Select Minor
 0 None
Manoeuvre mode
0 0
Base Orbit
0 1
Prograde vel.
 0  0
Man. date
 0  42988.5103237
Outward vel.
 0  0
Ch. plane vel.
 0  0
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
Prograde vel.
 0  8983.46151412
Eject date
 0  42989.2502986
Outward vel.
 0  99.9
Ch. plane vel.
 0  -1735.9925392
Finvars
  Finish BaseFunction
  Int 4
  Orbit True
  Vector  -303826660440 46853107680.4 -345005962229
  Vector  3882.56701112 -597.430709864 4390.9604952
  Double  1.26686534397e+017
  Double  42918.9090346
  Handle Jupiter
  Handle NULL
  Handle NULL
Select Target
 0 Escape
Autoplan
0 0
Plan type
0 1
Plan
0 0
Plan
0 1
Plan
0 0
Select Minor
 0 None
Manoeuvre mode
0 0
Base Orbit
0 0
Prograde vel.
 0  0
Man. date
 0  42988.5426771
Outward vel.
 0  0
Ch. plane vel.
 0  0
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
View Orbit
0 0
Finvars
  Finish BaseFunction
  Int 3
  Orbit True
  Vector  -366333761281 6344329894.12 699229247832
  Vector  -17322.8671085 823.74020589 -7231.28980235
  Double  1.32839126489e+020
  Double  43800.9050841
  Handle Sun
  Handle Jupiter
  Handle Saturn
Select Target
 0 Saturn
Autoplan
0 0
Plan type
0 2
Plan
0 0
Plan
0 0
Plan
0 2
Select Minor
 0 None
Manoeuvre mode
0 0
Base Orbit
0 0
Prograde vel.
 0  0
Man. date
 0  42988.5102313
Outward vel.
 0  0
Ch. plane vel.
 0  0
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
Velocity.
 0  0
Outward angle
 0  0.0626573201466
Inc. angle
 0  -0.0644375559836
Inherit Vel.
0 0
Eject date
 0  43800.9050841
Finvars
  Finish BaseFunction
  Int 5
  Orbit True
  Vector  502425384075 -19337356608.5 134668652399
  Vector  -8946.9743357 343.721265475 -2387.33164835
  Double  3.79311866084e+016
  Double  44159.1904923
  Handle Saturn
  Handle NULL
  Handle NULL
Select Target
 0 None
Autoplan
0 0
Plan type
0 1
Plan
0 0
Plan
0 2
Plan
0 0
Select Minor
 0 None
Manoeuvre mode
0 0
Base Orbit
0 0
Prograde vel.
 0  0
Man. date
 0  42988.5101966
Outward vel.
 0  0
Ch. plane vel.
 0  0
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
Draw Base
0 0
Finvars
  Finish BaseFunction
END_MFD

BEGIN_MFD Right
  TYPE User
  MODE TransX
END_MFD
 

agentgonzo

Grounded since '09
Addon Developer
Joined
Feb 8, 2008
Messages
1,649
Reaction score
4
Points
38
Location
Hampshire, UK
Website
orbiter.quorg.org
Nobody. The last maintainer was agentgonzo, but as far as I can judge it's abandonware now.
It's abandonware at the moment (unless anyone wants to take it up) but it's been open-sourced for a few years and I can provide guidance on it.

It's not the easiest code to decipher, but it's possible. Probably the best thing is a combination of running it in a debugger and reading the code. There should be nothing 'hidden' at the scenario read method:

TransxMFD::ReadStatus() (file: Transx.cpp) calls shipptrs::restoreallships(scn) (file: shiplist.cpp) which then calls transxstate::restoresave() (file: transxstate.cpp) for each ship in the scenario file. That's where it starts populating the data. It should be easier to follow if you get it in a debugger.


(I did not create the source structure or the really difficult classname<-->filename mess and never really changed this part as it worked. I just improved some of the prediction algorithms and added more functionality so this is the best that I can offer I'm afraid.)


Hope this helps.

---------- Post added at 10:58 ---------- Previous post was at 10:41 ----------

Hmm. Well, that tells me some things, but not everything by any means. For example, I'm not sure what those vectors or double values are in the initial TransX declaration.

If anyone has any insight into what TransX spits out and how it does so, or knows where that information is located, could you please let me know? :)
Second vector is likely to be the burn vector, one of the doubles is likely to be burntime (MJD). I can't really help more but tracing it through the debugger should make it easier to understand. If you need more help on it then send me a PM as I only stumbled onto this thread whilst bored at work.
 

Zachstar

Addon Developer
Addon Developer
Donator
Joined
May 1, 2008
Messages
654
Reaction score
0
Points
0
Location
Shreveport, Louisiana
Website
www.ibiblio.org
Alternatively might it be possible to reuse parts of TransX to make an MFD with the sole purpose of doing burns given to it by a master program such as yours?

Also what about Orbiter Navigator?
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
It might be possible to reuse TransX like that, but to be honest, I don't have too much interest in doing so. Being a graduate student, I don't have the available time to devote to learning a new language... the reason I got TOT v2 out into the public when I did is because my courses just started again and my workload is about to go up exponentially in the next week or two. If anyone wants to try something like this, I'd be happy to at least think about how it might be done, though, and provide whatever support I can...

Not sure what Orbiter Navigator is... you'll have to elaborate.
 
Top