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

Offline malu5531

  • Full Member
  • **
  • Posts: 289
  • Sweden
  • Liked: 155
  • Likes Given: 195
I could not find any other forum suitable for this post, please move it if it's more appropriate elsewhere.

Web-based tool for creating C3 porkchop plots (useful when planning interplanetary travel)

As Mars missions are more frequently discussed in the SpaceX forum, I was missing some easy-to-use tools for calculating C3 "porkchop" plots for interplanetary travels, such as Earth->Mars.

View it as an "early beta" at the moment, but if you can work around Ux issues and other minor problems it should at least be "usable" at the moment. I have a number of ideas for improvements and useful add-ons I will develop as I have time, so stay tuned for the improved version! ;)

I appreciate any feedback, bug reports or ideas for improvements! :)

Technical info
* Front-end; AngularJS / Bootstrap / D3JS
* Back-end for calculating trajectories; PyKEP
* Data push framework; jsFlow
* Earth, Mars and ~650k asteroids are included. Will include other planets soon.

Rough feature pipeline
* Progress-bar during calculations, so user knows when it's complete.
* Smart select of calculations -> fewer calculations necessary
* Send calculations in smarter order to client -> more "nice" rendering
* Pan/zoom in graph -> generate missing data
* More beautiful rendering of graphs, adjustable color-levels for C3 areas of interest. + X/Y axis.
* Caching of lambert solutions for faster execution
* Visualisation of trajectory
* Expose PyKEP feature; Relative velocity on arrival (help for calculating orbital insertion delta-v)
* Expose PyKEP feature; Multiple trips around sun (now only one)
* Expose PyKEP feature; Gravity assist
* Expose PyKEP feature; Low-thrust trajectories
* Identify suitable parking orbit -> calculate necessary delta-v from this orbit
* Cargo that can be thrown using a particular vehicle (say F9H).
* Combine multiple travels, such as Earth->Mars->[Time at Mars]->Earth
« Last Edit: 12/31/2013 02:50 am by malu5531 »

Offline QuantumG

  • Senior Member
  • *****
  • Posts: 9271
  • Australia
  • Liked: 4493
  • Likes Given: 1131
Looks awesome. Thanks for sharing!
Human spaceflight is basically just LARPing now.

Offline deltaV

  • Senior Member
  • *****
  • Posts: 2706
  • Change in velocity
  • Liked: 1041
  • Likes Given: 3902
Are the last two fields the min and max transit time in days?

Offline Robotbeat

  • Senior Member
  • *****
  • Posts: 39444
  • Minnesota
  • Liked: 25546
  • Likes Given: 12224
It's not working for me. Is it Java?
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 deltaV

  • Senior Member
  • *****
  • Posts: 2706
  • Change in velocity
  • Liked: 1041
  • Likes Given: 3902
It works for me the first time I hit "Plot C3". If I change some parameters and hit that button again it doesn't work right (doesn't update the image). I'm using Chrome on Windows 7.

Offline malu5531

  • Full Member
  • **
  • Posts: 289
  • Sweden
  • Liked: 155
  • Likes Given: 195
Are the last two fields the min and max transit time in days?

Yes.

It's not working for me. Is it Java?

It's not Java, but might depend on recent Javascript. Which web browser are you running? I've tried it in Chrome and Safari (OS X and iOS), should work in Firefox as well. Calculations are done server-side, however, the data-stream for updating the graphics as calculations are made are over websockets, which not all browsers can handle.

Also, the current version is quite sensitive to input error, make sure you have correct planetary bodies, valid dates (as selected by the calendar) and a reasonable span of days (defaults are good).

Any more information about this problem would be very appreciated as it will help me improve the service.

It works for me the first time I hit "Plot C3". If I change some parameters and hit that button again it doesn't work right (doesn't update the image). I'm using Chrome on Windows 7.

Thanks, I get the same error. I need to flush some data in javascript when clicking the second time. Will fix in next release. :)

Offline malu5531

  • Full Member
  • **
  • Posts: 289
  • Sweden
  • Liked: 155
  • Likes Given: 195
New version released today (2014-01-17), with following changes;

* Relative arrival velocity displayed along departure & arrival dates (mouseover)
* "Re-plotting" bug fixed, now one can tweak parameters and re-plot
* New naming convention of planets to allow more robust auto-complete.

Additional planets beyond Earth and Mars will soon be added when I have time to find the right data.

Offline Hop_David

  • Full Member
  • ****
  • Posts: 1656
  • Ajo, Arizona
    • Hop's Gallery
  • Liked: 147
  • Likes Given: 60
I've made several attempts but haven't been able to get it to work.

I have a general complaint against apps based on Lambert iterations. For a Hohmann orbit the departure and arrival points of a Lambert space triangle differ by 180º. If inclination of destination planet isn't zero, this forces the heliocentric transfer orbit to be polar. This transfer orbit is at 90º to earth's orbit and usualy around 90º to the destination planet's orbit.

A 90 degree plane change is huge. So usually pork chop apps like this discourage Hohmann transfers.

The 90 degree plane change can be largely mitigated by a midcourse burn or a broken plane transfer. I wish online pork chop apps would have this caveat. I talk about this more at Deboning the Porkchop Plot.

Offline malu5531

  • Full Member
  • **
  • Posts: 289
  • Sweden
  • Liked: 155
  • Likes Given: 195
Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #8 on: 01/18/2014 05:55 pm »
I've made several attempts but haven't been able to get it to work.

Which OS/Browser are you using? Which steps did you take and/or where/how did it fail? (to be sure; you had valid input data in all fields?)

If you want to be very helpful, please open the development console in your web browser (chrome have a great dev console) and cut n' paste the output here, from loading the page until failure (and/or post screenshots).

Thanks a lot in advance!
« Last Edit: 01/18/2014 05:58 pm by malu5531 »

Offline Robotbeat

  • Senior Member
  • *****
  • Posts: 39444
  • Minnesota
  • Liked: 25546
  • Likes Given: 12224
I was trying this on iOS and it didn't work, which isn't a surprise. I'll try it with a real computer.
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 malu5531

  • Full Member
  • **
  • Posts: 289
  • Sweden
  • Liked: 155
  • Likes Given: 195
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #10 on: 01/18/2014 06:17 pm »
I was trying this on iOS and it didn't work, which isn't a surprise. I'll try it with a real computer.

It should work, works on my iPhone. Responsive design and all. :D

I suspect there might either;

- Be a problem with websockets for firewall / proxy / global network blocks / whatever. (will be obvious from the dev console)
- Latency issues preventing the correct function of autocomplete of body names (necessary for correct functionality - properly entered there is a green border around the departure and destination fields).
- Missing / malformed dates (have to be YYYY-MM-DD) (I just realised the date picker plugin might format the date according to locals, in which case it won't work).
- Different usage patterns from how I use it (I've missed something)
- Browser / OS issues

I attach a screenshot from a working configuration for me, with the associated output in development console in Chrome.
« Last Edit: 01/18/2014 06:26 pm by malu5531 »

Offline Hop_David

  • Full Member
  • ****
  • Posts: 1656
  • Ajo, Arizona
    • Hop's Gallery
  • Liked: 147
  • Likes Given: 60
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #11 on: 01/18/2014 09:53 pm »
I've made several attempts but haven't been able to get it to work.

Which OS/Browser are you using? Which steps did you take and/or where/how did it fail? (to be sure; you had valid input data in all fields?)

The first attempts I typed "earth" and "mars" into the fields and nothing happened. This time I waited a bit and option Earth (planet) appeared. Waiting a bit after I typed Mars gave me a bunch of options and I chose Mars (planet)

When I clicked the plot C3 button it worked fine this time.

I moved my mouse about until hovering over approximate Hohmann departure and arrival dates: March 12 2016 and November 27 2016. As expected, this was in the middle of a dark diagonal stripe. Arrival velocity was given as 20635m/s.

As expected, the chart seems to say steer clear of Hohmann windows.
« Last Edit: 01/18/2014 09:54 pm by Hop_David »

Offline Hop_David

  • Full Member
  • ****
  • Posts: 1656
  • Ajo, Arizona
    • Hop's Gallery
  • Liked: 147
  • Likes Given: 60
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #12 on: 01/18/2014 10:08 pm »
Awhile back Kirk Sorensen posted a similar app, his ballistic trajectory planner. He talked it about on a Ceres thread.

I posted the same objection then.

I've just been playing around with the trajectories and see a few interesting things--when you look "down" on them as we're used to doing, they look wrong.  Very non-Hohmann transfer.  But when you look at them obliquely you can see why--they always "want" to arrive when Ceres is crossing its "line-of-nodes" which is where its orbital plane intersects with the Earth's orbital plane (the ecliptic).

The earth at departure, Ceres at Arrival, and the sun form the corners of a Lambert space triangle. The transfer ellipse must be coplanar with this triangle.

A Hohmann transfer traverses 180 degrees. Since Ceres' orbit isn't coplanar with the earth, this forces the transfer orbit to be at right angles to both earth's orbit and Ceres' orbit.



This geometry that forces a polar orbit is what I believe accounts for the diagonal streak through pork chop plots.

I tested this notion by clicking on the diagonal on one of your pork chop plots and looking at the trajectory:



It does indeed look like the departure and destination are 180 degrees from one another which forces a polar orbit at 90 degrees to both departure and destination orbit.

I believe it's much better to depart on a Hohmann coplanar with earth's orbit. Then at the line of nodes, do a plane change burn and continue onto the destination:



I like to call this a folded Hohmann transfer.

Depending on where the line of nodes folds the earth to Ceres Hohmann, plane change can range from 6.7 km/sec to 2.4 km/sec.

The 6.7 km/sec plane change is at perihelion of the Hohmann. This is the 10.5 degree plane change between two 36 km/sec vectors. But the perihelion is at earth departure. So V infinity would be the difference between a 30 and 36 km/sec vectors at 10.5 degrees to each. You would also enjoy an Oberth help if you're launching from LEO. So there is a benefit if your launch is at the line of nodes.

However, I believe your application exaggerates the benefits of launching at the line of nodes since it doesn't allow for midcourse plane changes.

Offline malu5531

  • Full Member
  • **
  • Posts: 289
  • Sweden
  • Liked: 155
  • Likes Given: 195
Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #13 on: 01/19/2014 01:05 am »
I moved my mouse about until hovering over approximate Hohmann departure and arrival dates: March 12 2016 and November 27 2016. As expected, this was in the middle of a dark diagonal stripe. Arrival velocity was given as 20635m/s.

As expected, the chart seems to say steer clear of Hohmann windows.

If I understand you correctly, the lamberts method does not handle the Hohmann edge-case, however the areas outside the black stripes are still correct? Then I should have a notice of this limitation.

However, does it matter, at least in case of earth->mars? I have a question for you; would the total delta-v requirement for your proposed 'ideal' trajectory be less than the alternative trajectories around the stripe? 6.7 to 2.4 km/s plane change sounds a bit expensive?

Looking at NASAs MAVEN, they seem to have followed a trajectory given by solving lamberts problem, rather than a Hohmann transfer.

C3 = 12.2
Depart: November 18, 2013
Arrive: September 22, 2014

Elon also seem more interested in the C3=~35, 3-4 month transit opportunities than your proposed 8 month Hohmann transfer.

What is the advantage of your proposal, to also consider Hohmann transfers?
« Last Edit: 01/19/2014 01:23 am by malu5531 »

Offline JohnFornaro

  • Not an expert
  • Senior Member
  • *****
  • Posts: 11013
  • Delta-t is an important metric.
  • Planet Eaarth
    • Design / Program Associates
  • Liked: 1282
  • Likes Given: 739
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #14 on: 01/19/2014 01:33 pm »
I've made several attempts but haven't been able to get it to work.

I have a general complaint against apps based on Lambert iterations. For a Hohmann orbit the departure and arrival points of a Lambert space triangle differ by 180º. If inclination of destination planet isn't zero, this forces the heliocentric transfer orbit to be polar. This transfer orbit is at 90º to earth's orbit and usualy around 90º to the destination planet's orbit.

A 90 degree plane change is huge. So usually pork chop apps like this discourage Hohmann transfers.

The 90 degree plane change can be largely mitigated by a midcourse burn or a broken plane transfer. I wish online pork chop apps would have this caveat. I talk about this more at Deboning the Porkchop Plot.

I gotta say, thanks for this post, the blog post, and your subsequent remarks on these orbits.
Sometimes I just flat out don't get it.

Offline Hop_David

  • Full Member
  • ****
  • Posts: 1656
  • Ajo, Arizona
    • Hop's Gallery
  • Liked: 147
  • Likes Given: 60
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #15 on: 01/19/2014 06:55 pm »
If I understand you correctly, the lamberts method does not handle the Hohmann edge-case, however the areas outside the black stripes are still correct? Then I should have a notice of this limitation.

The app is correct. It's just that a two burn ballistic trajectory often is far from the least delta V path. If the line of nodes is distant from launch, 3 burns (Departure burn, mid course plane change, arrival burn) can give a path with a substantially lower delta V budget. See this broken plane transfer pdf.


However, does it matter, at least in case of earth->mars? I have a question for you; would the total delta-v requirement for your proposed 'ideal' trajectory be less than the alternative trajectories around the stripe? 6.7 to 2.4 km/s plane change sounds a bit expensive?

Looking at NASAs MAVEN, they seem to have followed a trajectory given by solving lamberts problem, rather than a Hohmann transfer.

The virtue of a Hohmann is that the transfer orbit is tangent to both departure and destination orbits. With parallel velocity vectors, no direction change is needed only speed change.

Mars' orbit is noticeably elliptical. So a transfer orbit tangent to both earth and Mars orbit sometimes differs from an 180 degree Hohmann from one circular orbit to another.

From the Spaceflight 101 Maven Mission Profile here is a pic of the Maven path:


Notice the transfer orbit is tangent to departure and destination orbits. Little or no delta V is needed for direction change, only speed change.

Also the launch window for this tangent orbit was pretty close to Mars. ascending node: 50º. Earth crosses Mars' ascending node in early  to mid November.


What is the advantage of your proposal, to also consider Hohmann transfers?

An 8 month Hohmann transfer is only an approximation based on the simplifying assumption of a circular Mars orbit. Since Mars orbit is an ellipse, tangent transfer orbit can be shorter or longer than 8 months.  The transfer orbit can be more or less than 180 degrees, but in that neighborhood.

The advantage of tangent transfer orbits is less delta V.

Offline kfsorensen

  • aerospace and nuclear engineer
  • Full Member
  • ****
  • Posts: 1569
  • Huntsville, AL
    • Flibe Energy
  • Liked: 151
  • Likes Given: 0
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #16 on: 01/20/2014 10:23 pm »
I wish online pork chop apps would have this caveat. I talk about this more at Deboning the Porkchop Plot.

Oh, I'm so sorry that the free software that people have provided for you hasn't embodied every little feature your precious heart could desire.  How dare we go out and work for hundreds of hours and make our work freely available for your use without taking into account the minor feature that you desire and will cause you to complain?

Forgive us, please.  Forgive us.

Offline malu5531

  • Full Member
  • **
  • Posts: 289
  • Sweden
  • Liked: 155
  • Likes Given: 195
Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #17 on: 01/20/2014 10:51 pm »
The app is correct. It's just that a two burn ballistic trajectory often is far from the least delta V path. If the line of nodes is distant from launch, 3 burns (Departure burn, mid course plane change, arrival burn) can give a path with a substantially lower delta V budget. See this broken plane transfer pdf.

Thanks for that paper! I will try to implement the solution outlined - as an optional feature, where the porkchop plot is augmented with optimal three burn trajectories where appropriate. Also optimization of broken plane using constant thrust would be interesting IMO.

The virtue of a Hohmann is that the transfer orbit is tangent to both departure and destination orbits. With parallel velocity vectors, no direction change is needed only speed change.

Mars' orbit is noticeably elliptical. So a transfer orbit tangent to both earth and Mars orbit sometimes differs from an 180 degree Hohmann from one circular orbit to another.

I guess in general it's important to make sure arrival velocity is tangential to the destination orbit? Which then would be an important consideration when looking at 3-4 month transit with constant thrust.

From the Spaceflight 101 Maven Mission Profile here is a pic of the Maven path:


Notice the transfer orbit is tangent to departure and destination orbits. Little or no delta V is needed for direction change, only speed change.

Also the launch window for this tangent orbit was pretty close to Mars. ascending node: 50º. Earth crosses Mars' ascending node in early  to mid November.

Ah, ok, so the similarity with ballistic trajectory is only a coincidence. In general, does NASA/JPL uses broken plane trajectories?

What is the advantage of your proposal, to also consider Hohmann transfers?

An 8 month Hohmann transfer is only an approximation based on the simplifying assumption of a circular Mars orbit. Since Mars orbit is an ellipse, tangent transfer orbit can be shorter or longer than 8 months.  The transfer orbit can be more or less than 180 degrees, but in that neighborhood.

The advantage of tangent transfer orbits is less delta V.

Good, clear answer. How would you approach solving the high delta-v trajectories, such as SpaceX envisioned 3-4 month travel time (C3>30)? I assume broken plane would make little difference for these trajectories?

I am also wondering if it's possible to leave earth at a C3~13 'low delta-v' trajectory to Mars using chemical means, but by aiming a constant thrust in a certain directions during transit, shorten the travel time in such a way we still reach Mars even if all/some electric propulsion would fail en route. I.e. continuous thrust always in the direction required for the new ballistic (in case of failure) transit intersects Mars, but at an earlier date; allowing short transit in normal operation, but longer transit in case of propulsion failure. Longer transit time would in worst case scenario mean loss of one opportunity of reuse of MCT, or doubling mission cost, but would not be LOM/crew.

However, I lack a good approach on how to find this optimal thrust-vectoring over time. Suggestions?
« Last Edit: 01/21/2014 05:57 pm by malu5531 »

Offline Hop_David

  • Full Member
  • ****
  • Posts: 1656
  • Ajo, Arizona
    • Hop's Gallery
  • Liked: 147
  • Likes Given: 60
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #18 on: 01/21/2014 04:09 pm »
I guess in general it's important to make sure arrival velocity is tangential to the destination orbit?

That's my general approach. The closer to parallel the ship's velocity vector is with the planet's velocity vector, the less delta V needed for direction change, only speed change.

The example I like to give is two cars differing in speed by 1 mile an hour -- 40 vs 41 mph. If they're traveling in the same lane in the same direction, the difference is only 1 mph. But if one is traveling north and the other east and they T-bone at an intersection, the difference is 57 mph.

For contrast here's a sketch of a decidedly non-tangent transfer orbit:

This transfer orbit has healthy flight path angles at departure and destination. These big angles make for big direction changes which jacks up delta V.

A body in a circular orbit will have a flight path angle of 0º, it will be moving horizontally with regard to the sun.  The only time an elliptical orbit has a 0º flight path angle is at perihelion and aphelion.  So given two coplanar circular orbits, the elliptical transfer orbit should touch the lower orbit at perihelion and the higher orbit at aphelion

Here's a pic of a Hohmann to Jupiter assuming circular, coplanar orbits:

Traveling the same direction in the same lanes so to speak. the V infinities aren't that big.

But Jupiter's not coplanar.
Here's a side view of an ~180º transfer orbit to an inclined Jupiter orbit:

Notice the Jupiter point of the Lambert Space triangle (in blue) is directly above the 180 degree mark on the ecliptic plane. This triangle must lie in a plane at right angles to the ecliptic. And these three points determine the orbital plane of the transfer orbit.

The transfer orbit has a 0º flight path angle at departure and destination. But that matters little if it's inclination is 90º! The T-bone scenario I mentioned earlier. sqrt(302 + 392)  is about 49. At Jupiter's end sqrt(132 + 7.52) is 15.

So you can see the polar transfer orbit has V infinities totaling 64 km/s! Lambert ballistic trajectories suggest you need monstrous delta Vs to get from point A to B on opposite sides of an 180º protractor.

Which is wildly misleading, not minor (in my opinion). With a mid-course plane change, a polar orbit is absolutely not needed.

I like your app. But I don't know how you would calculate C3s of 3 burns since I don't know of a straightforward way to find the best place to do a midcourse plane change.

What I'd recommend is a simple disclaimer saying porkchop plot ridges can be mitigated with broken plane transfers.



« Last Edit: 01/21/2014 04:39 pm by Hop_David »

Offline Robotbeat

  • Senior Member
  • *****
  • Posts: 39444
  • Minnesota
  • Liked: 25546
  • Likes Given: 12224
Re: Tool: Generate C3 porkchop plots for interplanetary travel
« Reply #19 on: 10/27/2015 12:32 am »
I can't get this online tool to work anymore. Anyone else able to get it to work? Trying to see the minimum c3 Mars to Earth.
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

Tags:
 

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