Author Topic: Tool: Generate C3 porkchop plots for interplanetary travel  (Read 40708 times)

Offline Lampyridae

  • Veteran
  • Senior Member
  • *****
  • Posts: 2675
  • South Africa
  • Liked: 973
  • Likes Given: 2164
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #20 on: 10/27/2015 06:42 am »
Not working for me either. Running Chrome on XP (LOL).

Offline Robotbeat

  • Senior Member
  • *****
  • Posts: 39444
  • Minnesota
  • Liked: 25546
  • Likes Given: 12224
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #21 on: 10/31/2015 12:54 pm »
Bump. If this isn't fixed, does anyone know a similar tool? Or would I have to write one myself?
Chris  Whoever loves correction loves knowledge, but he who hates reproof is stupid.

To the maximum extent practicable, the Federal Government shall plan missions to accommodate the space transportation services capabilities of United States commercial providers. US law http://goo.gl/YZYNt0

Offline Robotbeat

  • Senior Member
  • *****
  • Posts: 39444
  • Minnesota
  • Liked: 25546
  • Likes Given: 12224
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #22 on: 11/05/2015 01:07 am »
Bump, dang it!
Chris  Whoever loves correction loves knowledge, but he who hates reproof is stupid.

To the maximum extent practicable, the Federal Government shall plan missions to accommodate the space transportation services capabilities of United States commercial providers. US law http://goo.gl/YZYNt0

Offline Robotbeat

  • Senior Member
  • *****
  • Posts: 39444
  • Minnesota
  • Liked: 25546
  • Likes Given: 12224
Chris  Whoever loves correction loves knowledge, but he who hates reproof is stupid.

To the maximum extent practicable, the Federal Government shall plan missions to accommodate the space transportation services capabilities of United States commercial providers. US law http://goo.gl/YZYNt0

I'm about 5 years late to the party here, but I just made a Porkchopper tool on Flight Club. It includes most basic functionality. Does the maths in the client so should be pretty easy to use and responsive too

Try running some plots first with the granularity set to a high number (perhaps 7 or 14 days). Then when you get a feel for the dates and travel times you're interested in, refine those fields and lower the granularity down to whatever you want. That way, you don't spend ages waiting for your browser to solve a bunch of redundant Lambert iterations

https://flightclub.io/porkchopper

Offline sdsds

  • Senior Member
  • *****
  • Posts: 7559
  • “With peace and hope for all mankind.”
  • Seattle
  • Liked: 2364
  • Likes Given: 2190
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #25 on: 07/27/2020 05:46 am »
OMG this is great; thanks for sharing. BTW like a fool I tried a granularity of 0.5. The result ... wasn't as expected.

(Oh, and plotly eh? Are you happy with that?)
— 𝐬𝐝𝐒𝐝𝐬 —

> (Oh, and plotly eh? Are you happy with that?)

Ah look it does the job quickly. I can see a switch to d3 in the future for better performance, but it's not necessary at the moment

One question I have for anybody here who might know the answer is about the results of the Lambert solver. I get the initial and final velocities out of it and subtract the origin/destination planets velocities, respectively, to figure out the required delta-v needed at each end of the transfer orbit

But literally every other source I see has lower numbers than my model predicts. But like, consistently lower numbers. For Earth-Mars windows, I'm a pretty consistent 1-2km/s too high than other sources seem to say. So my shape is perfect, but my scale is a pinch too high, if that makes sense.

Do other porkchop apps include some sort of gravity assist at Mars approach which takes care of some of the delta-v perhaps? Or what may explain this discrepancy?

Offline Robotbeat

  • Senior Member
  • *****
  • Posts: 39444
  • Minnesota
  • Liked: 25546
  • Likes Given: 12224
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #27 on: 07/27/2020 08:11 pm »
I'm about 5 years late to the party here, but I just made a Porkchopper tool on Flight Club. It includes most basic functionality. Does the maths in the client so should be pretty easy to use and responsive too

Try running some plots first with the granularity set to a high number (perhaps 7 or 14 days). Then when you get a feel for the dates and travel times you're interested in, refine those fields and lower the granularity down to whatever you want. That way, you don't spend ages waiting for your browser to solve a bunch of redundant Lambert iterations

https://flightclub.io/porkchopper
Can you please increase the plot range to show higher c3 and delta-v values? A pet project of mine is trying to see how one could do extremely fast transfers (~30-40 days).
Chris  Whoever loves correction loves knowledge, but he who hates reproof is stupid.

To the maximum extent practicable, the Federal Government shall plan missions to accommodate the space transportation services capabilities of United States commercial providers. US law http://goo.gl/YZYNt0

Online waveney

I'm about 5 years late to the party here, but I just made a Porkchopper tool on Flight Club. It includes most basic functionality. Does the maths in the client so should be pretty easy to use and responsive too

Try running some plots first with the granularity set to a high number (perhaps 7 or 14 days). Then when you get a feel for the dates and travel times you're interested in, refine those fields and lower the granularity down to whatever you want. That way, you don't spend ages waiting for your browser to solve a bunch of redundant Lambert iterations

https://flightclub.io/porkchopper

I've just found this (as the plotting program I used to use has gone awol).  Please could the dates allow much further in the future?  at least to 2050?

Offline Twark_Main

  • Senior Member
  • *****
  • Posts: 4053
  • Technically we ALL live in space
  • Liked: 2167
  • Likes Given: 1311
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #29 on: 05/16/2024 11:30 pm »
the plotting program I used to use has gone awol

If you're referring to EasyPorkchop written by Juan Luis Gonzalo at UPM, it's still available (for now) on Archive.org.

https://web.archive.org/web/20240115183644/http://sdg.aero.upm.es/index.php/online-apps/porkchop-plot

You can also download a local copy, which doesn't rely on any website remaining available. I would highly recommend doing this. I have also attached a backup copy to this post, as it's licensed GPL v3.

Locally runnable copy available here: https://web.archive.org/web/20240115183644/http://sdg.aero.upm.es/ONLINEAPPS/Lambert/SDG_EasyPorkchop_1.0.0.zip
« Last Edit: 05/17/2024 01:09 am by Twark_Main »

Online waveney

the plotting program I used to use has gone awol

If you're referring to EasyPorkchop written by Juan Luis Gonzalo at UPM, it's still available (for now) on Archive.org.

https://web.archive.org/web/20240115183644/http://sdg.aero.upm.es/index.php/online-apps/porkchop-plot

You can also download a local copy, which doesn't rely on any website remaining available. I would highly recommend doing this. I have also attached a backup copy to this post, as it's licensed GPL v3.

Locally runnable copy available here: https://web.archive.org/web/20240115183644/http://sdg.aero.upm.es/ONLINEAPPS/Lambert/SDG_EasyPorkchop_1.0.0.zip

Thanks,  I've put it on one of my servers at https://wavwebs.com/PorkChopPlot/ for anyone to use.

Offline InterestedEngineer

  • Senior Member
  • *****
  • Posts: 2703
  • Seattle
  • Liked: 2094
  • Likes Given: 3421
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #31 on: 05/18/2024 11:02 pm »
I think I found out why the porkchop simulators limit the deltaV range.

There's something oddly wrong when you go to large deltavs.

Here's what I changed in the code to get higher deltaVs. I get an intermediate high deltaV departure window that at 20km/sec claims 10 days... doesn't seem right.

here's the code for a deltaV range of 10km/sec:

 var levelsStep = [ 0, 1.0, 2.0 , 3.0, 4.0,  5.0,  6.0,  7.0,  8.0,  9.0, 10.0 ] // Values for the contour levels
      , colors = [ "#4ba7fc", "#3d93ff", "#137bff", "#13ff9b", "#00e785", "#00e01f", "#42c700", "#c76300", "#c71700", "#a40000" ] // Colors for the contour levels
      , ndim = 300 // Grid size in departure time
      , mdim = 300 // Grid size in time of flight
      , DVrange = 10; // Maximum Delta-v range [km/s]

Offline Twark_Main

  • Senior Member
  • *****
  • Posts: 4053
  • Technically we ALL live in space
  • Liked: 2167
  • Likes Given: 1311
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #32 on: 05/18/2024 11:30 pm »
I think I found out why the porkchop simulators limit the deltaV range.

There's something oddly wrong when you go to large deltavs.

Here's what I changed in the code to get higher deltaVs. I get an intermediate high deltaV departure window that at 20km/sec claims 10 days... doesn't seem right.

here's the code for a deltaV range of 10km/sec:

 var levelsStep = [ 0, 1.0, 2.0 , 3.0, 4.0,  5.0,  6.0,  7.0,  8.0,  9.0, 10.0 ] // Values for the contour levels
      , colors = [ "#4ba7fc", "#3d93ff", "#137bff", "#13ff9b", "#00e785", "#00e01f", "#42c700", "#c76300", "#c71700", "#a40000" ] // Colors for the contour levels
      , ndim = 300 // Grid size in departure time
      , mdim = 300 // Grid size in time of flight
      , DVrange = 10; // Maximum Delta-v range [km/s]


There's...  a lot of limitations in Easy Porkchop. The main one is that the accuracy is terrible, thanks to a limited number of refinement iterations. But even just updating it to modern Javascript and doing some minor refactoring can lead to large speedups.

And yes, for efficiency Easy Porkchop will "prune" any solutions that are >10 km/s (vinfinity) above the 'optimal' solution, as found by a sparse 50x50 grid search (see the Javascript function GlobalDVminEstimator in the file LambertSDG-1.0.0.js).

Offline InterestedEngineer

  • Senior Member
  • *****
  • Posts: 2703
  • Seattle
  • Liked: 2094
  • Likes Given: 3421
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #33 on: 05/18/2024 11:56 pm »
I think I found out why the porkchop simulators limit the deltaV range.

There's something oddly wrong when you go to large deltavs.

Here's what I changed in the code to get higher deltaVs. I get an intermediate high deltaV departure window that at 20km/sec claims 10 days... doesn't seem right.

here's the code for a deltaV range of 10km/sec:

 var levelsStep = [ 0, 1.0, 2.0 , 3.0, 4.0,  5.0,  6.0,  7.0,  8.0,  9.0, 10.0 ] // Values for the contour levels
      , colors = [ "#4ba7fc", "#3d93ff", "#137bff", "#13ff9b", "#00e785", "#00e01f", "#42c700", "#c76300", "#c71700", "#a40000" ] // Colors for the contour levels
      , ndim = 300 // Grid size in departure time
      , mdim = 300 // Grid size in time of flight
      , DVrange = 10; // Maximum Delta-v range [km/s]


There's...  a lot of limitations in Easy Porkchop. The main one is that the accuracy is terrible, thanks to a limited number of refinement iterations. But even just updating it to modern Javascript and doing some minor refactoring can lead to large speedups.

And yes, for efficiency Easy Porkchop will "prune" any solutions that are >10 km/s (vinfinity) above the 'optimal' solution, as found by a sparse 50x50 grid search (see the Javascript function GlobalDVminEstimator in the file LambertSDG-1.0.0.js).

I'm pretty good at Javascript.  If I can get a "source of truth", I'd be happy to spend some time hacking this up and putting it on Github.

It needs some unit tests.

Offline InterestedEngineer

  • Senior Member
  • *****
  • Posts: 2703
  • Seattle
  • Liked: 2094
  • Likes Given: 3421
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #34 on: 05/19/2024 12:01 am »
Here's what it looks like when I attempt 20km/sec

var levelsStep = [ 0, 2.0, 4.0 , 6.0, 8.0,  10.0,  12.0,  14.0,  16.0,  18.0, 20.0 ] // Values for the contour levels
      , colors = [ "#4ba7fc", "#3d93ff", "#137bff", "#13ff9b", "#00e785", "#00e01f", "#42c700", "#c76300", "#c71700", "#a40000" ] // Colors for the contour levels
      , ndim = 600 // Grid size in departure time
      , mdim = 600 // Grid size in time of flight
      , DVrange = 20; // Maximum Delta-v range [km/s]
 
« Last Edit: 05/19/2024 12:02 am by InterestedEngineer »

Offline InterestedEngineer

  • Senior Member
  • *****
  • Posts: 2703
  • Seattle
  • Liked: 2094
  • Likes Given: 3421
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #35 on: 05/19/2024 12:04 am »
and here's 10km/sec version.  Seems more reasonable, but I wonder what the mid-window high deltaV pathway is

Offline Twark_Main

  • Senior Member
  • *****
  • Posts: 4053
  • Technically we ALL live in space
  • Liked: 2167
  • Likes Given: 1311
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #36 on: 05/19/2024 12:22 am »
Yes, the Easy Porkchop errors get larger the further you get from the "peak" of the porkchop (which is normally not a big concern). This is discussed in the accompanying paper.


Offline InterestedEngineer

  • Senior Member
  • *****
  • Posts: 2703
  • Seattle
  • Liked: 2094
  • Likes Given: 3421
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #37 on: 05/19/2024 12:35 am »
Yes, the Easy Porkchop errors get larger the further you get from the "peak" of the porkchop (which is normally not a big concern). This is discussed in the accompanying paper.

There also might be something wrong with the "is elliptical" case - it seems when I exceed Vinf of ~12km/sec I get more weird results.  This happens to be the escape velocity of the Sun for Vinf at Earth.

Offline Twark_Main

  • Senior Member
  • *****
  • Posts: 4053
  • Technically we ALL live in space
  • Liked: 2167
  • Likes Given: 1311
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #38 on: 05/19/2024 12:55 am »
I think I found out why the porkchop simulators limit the deltaV range.

There's something oddly wrong when you go to large deltavs.

Here's what I changed in the code to get higher deltaVs. I get an intermediate high deltaV departure window that at 20km/sec claims 10 days... doesn't seem right.

here's the code for a deltaV range of 10km/sec:

 var levelsStep = [ 0, 1.0, 2.0 , 3.0, 4.0,  5.0,  6.0,  7.0,  8.0,  9.0, 10.0 ] // Values for the contour levels
      , colors = [ "#4ba7fc", "#3d93ff", "#137bff", "#13ff9b", "#00e785", "#00e01f", "#42c700", "#c76300", "#c71700", "#a40000" ] // Colors for the contour levels
      , ndim = 300 // Grid size in departure time
      , mdim = 300 // Grid size in time of flight
      , DVrange = 10; // Maximum Delta-v range [km/s]


There's...  a lot of limitations in Easy Porkchop. The main one is that the accuracy is terrible, thanks to a limited number of refinement iterations. But even just updating it to modern Javascript and doing some minor refactoring can lead to large speedups.

And yes, for efficiency Easy Porkchop will "prune" any solutions that are >10 km/s (vinfinity) above the 'optimal' solution, as found by a sparse 50x50 grid search (see the Javascript function GlobalDVminEstimator in the file LambertSDG-1.0.0.js).

I'm pretty good at Javascript.  If I can get a "source of truth", I'd be happy to spend some time hacking this up and putting it on Github.

It needs some unit tests.

Hmm, let me see if I can dig up my old local fork. I added a bunch more Solar system bodies to the dropdown, updated the JS somewhat, refactored to eliminate duplicate calculations between SingleImpulseDvOpt and LambertAn, and optimized it sufficiently to bump up the resolution and eliminate Marching Squares altogether (which actually introduces some graphical errors like "filling in" holes in the graph that should be empty)...   :o

Offline InterestedEngineer

  • Senior Member
  • *****
  • Posts: 2703
  • Seattle
  • Liked: 2094
  • Likes Given: 3421
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #39 on: 05/19/2024 12:57 am »
Check it in to github!

Tags:
 

Advertisement NovaTech
Advertisement
Advertisement Margaritaville Beach Resort South Padre Island
Advertisement Brady Kenniston
Advertisement NextSpaceflight
Advertisement Nathan Barker Photography
0