Space Math

The following forms use javascript to perform their calculations. Changing one variable or unit will force a recalculation. The process converts all units into MKS and the back to the desired results. This always creates rounding errors, so be aware that the results are good only to a few decimal places.

Javascript is limited to the size of the numbers it can handle and you will see that some of these calculators break down when using large accelerations for long periods of time. The universe is larger than java script can handle. Meters and seconds are pitifully small units for doing calculations involving millions of light years.

I first wrote some of these calculators about 15 years ago, and the code style reflects this. The code is fragile and every time I fix a bug I create another. If you find a bug, please let me know.

Newtonian Constant Acceleration in g's.
Use this to calculate how far a spaceship will go in a certain time at a certain acceleration. A ship going at a rate of 1g for 100 seconds will travel 49000 meters. If you put in distance traveled it will tell you the time needed to travel that distance at the specified g force. G force here is the force of gravity at the earth's surface. This does not take into account relativistic effects, so use this for interplanetary travel.
Acceleration Time Distance v=0

Acceleration in g's on a cylinder such as a space station or space colony.
Use this to find out how fast a space station must spin (period of rotation time in seconds) to maintain a certain force of gravity. You can vary the radius to get a new acceleration or vary the period to get a new radius. Changing the g force will recalculate the period. G force here is the force of gravity at the earth's surface.

Period Radius Acceleration

Period and radius of a circular orbit around a planet.
This gives you the distance from the center of planet and the time it takes for one circular orbit. The units are in terms of planet mass. I've given Earth, Jupiter and the sun for examples. (remember the earth is 6,378 km in radius so subtract that out to get distance from the surface.) Click these links to pre load set diameters Earth, Venus, Mars, Jupiter, The Moon

Period Radius Planet Mass

Escape velocity at a planet's surface
This is the speed that will allow an object to leave the gravitational field of a planet. Anything slower will be slowed down enough by gravity to fall backwards to the planet. Radius is is the radius of the planet. Click these links to pre load set diameters Earth, Venus, Mars, Jupiter, The Moon

Velocity Radius Planet Mass

Relativistic effects

Length Contraction.

The length of things shrinks in the direction of the motion. This is measurable at relativistic speeds. Enter the Rest length and a Velocity and get the contracted length. Enter the Contracted length and get the Velocity. How long will a yard stick be at 1/2 the speed of light? The answer is about 2.6 feet. This calculation is based on an Earth Observer.
Velocity Earth length Moving Length

Time Dilation.
At relativistic speeds time slows down. Enter the Rest interval and a Velocity and get the dilated time. For example how long will ten seconds appear to be when traveling at 1/2 C? Answer=11.57 seconds. This is a Little confusing. Time slows down for a fast moving space traveller which means that it looks like more seconds pass on Earth than for the traveller. This calculation is based on an observer from earth.

Velocity Moving Time Earth Time

Long Relativistic Journeys
Going to a star requires that you speed up and then slow down. It is a double calculation. Half of the trip you accelerate, but if you need to slow down for the second half so that you reach the star, not splat against it. A traveler experiences the trip at one time rate and an observer on one of the stars will experience much longer time. At 1 G acceleration, it is possible to travel to a near galaxy within a generation, but when you will come back it will be millions of years later.
Use this calculator to figure the time it takes to get to a star at constant acceleration and then constant deceleration. Counter to what we might expect, a voyager can make it to a star 20 light years away in 6 years. This is not a violation of Relativity, but a side effect.
Note: unlike the other functions I didn't include the calculation where you plug in time and get distance. That acosh got me.
Note 2: If you try for really long distances the trip time shows infinity - this is due to limitations of JavaScript.

Acceleration Distance
Trip Time Earth Time

Size of Black Holes

The Swarzchilde radius is calculated as r=2*G*M/c^2. The actual size of black holes is tiny.


Mass Radius

Conversions

Here are some conversions of units which might be used in space travel

Length Conversions

 

Energy Conversions

 

91 Responses to “Space Math”

  1. Keith says:

    I fixed the units thing. It not converts to the various unit correctly so if you change from meters to feet it does the conversion. Same with hours.

    Nope, I just tested it and it is not doing the conversion on all events. Change the values – it works. Change the units and it doesn’t. Back to work.

  2. Keith says:

    Got it. It looks like it works now. I just hope that I didn’t introduce a new bug.

    Keith

  3. D says:

    Late coming back to comment Kieth, but it is good to see you’re maintaining such a useful site and right on top of squashing little bugs. Kudos! And thanks.

  4. D says:

    Sorry about the typo misspelling of your name Keith.

  5. John says:

    this is great. There’s one thing I think you could use here… a way to calculate the earth-observed time versus traveler’s observe time between two points at a given rate of acceleration.

    example: spaceman spiff leaves earth at an acceleration rate of 1 G. How long will it take him to travel from earth to, say sirius (10 ly) assuming he accelerates at that rate the entire time and decelerates at the same rate when he reaches the halfway point? What amount of elapsed time does an observer on earth see and what would the ship-board time be?

  6. Keith says:

    The Long Relativistic trip calculator does exactly this. I think this is what you are asking for. Where it says earth time, it places the time for an observer who does not make the trip, and remains behind (not necessarily the earth, of course.)

    Keith

  7. Rod Rogers says:

    Oops, looks like a new bug.

    velocity box on Newtonian acceleration. Changing from seconds to minutes or hours or days yields bad data.

    Seemed to work well enough about a week ago.

  8. Keith says:

    Rod,

    I do updates at home and sometimes at work. I made changes to the code, but I did not download the latest version from the website first. As a result, I re-introduced the old bug.

    I use Subversion for my programming projects and it looks like it is time to start at website subversion repository so I can keep track of changes like this. Now I have to go and debug the same thing all over again and I can’t remember what it was that I fixed.

    Keith

  9. Rod Rogers says:

    It seems like the duration link to velocity is broken; I.E. velocity doesn’t update if I change from seconds to minutes or hours. Incrementing the force level changes the velocity, but not the duration.

  10. Keith says:

    Working on it. This darn job requires me to do uninteresting stuff for long periods of time (sometimes 8 hours at a time). I know what is wrong, I just need a few minutes to fix it.

    If the boss goes to a meeting I can get it done.

    Keith

  11. Keith says:

    I made another change. I think this might be it. Please check Newtonian acceleration to see if I have it right.

  12. Rod Rogers says:

    Understood. Time eventually changes that problem — trading age for greater freedom. I think it’s terrific that you’re maintaining this resource. I’d hate to be doing the math required otherwise.

  13. Keith says:

    I am 60 and I am looking forward eagerly to retirement. Wife seems to think I should work forever, though.

    Keith

  14. Rod Rogers says:

    Nope…that didn’t work. 1g for 1hr = 32ft/hour

    You might need some quiet time to fix this.

    There’s an additional problem now where changing the time duration interval now changes whatever you had in the time box in terms of units.

    And if I change the force level, that also changes the time duration interval now, which can be an irritation when trying to work backward from a desired plot result.

  15. Rod Rogers says:

    I’m 64. When Digital was acquired by Compaq, I got a golden parachute into the promised land (Montana). Never regretted it.

  16. Keith says:

    Another round of fixes. I am interested in seeing what new bugs I have introduced.

    Keith

  17. Rod Rogers says:

    Looks like you got it. In a day or two, I’ll be back into the long haul acceleration thing and it will get a workout then.

    Intuitively, I get how Newtonian acceleration blends with time dilation. If you pile on 1000g acceleration for ten hours, you end up going faster than light with the Newtonian tool. But the ship doing 1000g’s would never get to ten hours as time dilation would slow the relative (ship) passage of time as the velocity approaches .999999+ percent of C.

    Using the Relativistic Journey tool, I can approximate what that dilation is and how it affects the plot. Super tools. Thanks for sharing them.

  18. Anthony says:

    I use to do these calculations when I was a kid on my TI-83. Very cool to see someone else writing these programs for people.

  19. Cameron says:

    This is really an awesome webpage. I stumbled across it when I was randomly Googling interstellar propulsion. I have one question about constant acceleration drives. Once a ship is nearly at the speed of light, is it necessary to keep accelerating to get the same kinds of speeds indicated in the “Long Relativistic Journeys” section?

    Basically once one gets to 0.999% C, can they just coast for the light speed portion of the trip to save fuel for the deceleration, or do they need to keep adding .9′s to the percentage (if that makes sense). Oh, and I realize that the answer is probably “no” to the first and “yes” to the second, but I’m curious how much difference those extra .9′s make in journey time (for both traveler and Earther).

  20. Keith says:

    You would have to split it up into two calculations. First calculate just the acceleration of the trip based on how fast you want to go using the trip calculator. Then use the time dilation calculator to .999% for a length of time and add the results of both to get the total trip.

    Keith

  21. Rod Rogers says:

    It takes a lot of 9′s behind the decimal point to really dilate time for the travelers. Essentially as their time dilates, the rate of acceleration drops toward zero, never getting there of course, just like they never get to the speed of light.

    But while pouring on the power, time continues to dilate, making a very long trip, like 500 light years, pass in just days for the travelers, while 500 years go by in real-time.

    In my current plot, one of the characters constructed a virtual chronometer which compares ship’s time and real time, giving a sense of the passing years in real-time as the 9′s mount up behind the decimal point. At the point of flip-over, three months pass in about 150 seconds. This takes at least nine more nines behind 99% and a prodigious impulse engine – like a beam core antimatter source where the fuel has two orders of magnitude more energy than fusion.

    It is an awesome set of tools however. Much better to be composing the prose instead of doing the math long hand.

  22. Keith says:

    Some people say that collisions with objects, because of the relativistic energies involved would be catastrophic. A spec of dust moving towards us at .99999% of light would weigh tons and would not be stoppable by any kind of shield. Remember, even at this high speed, it appears to us that we are standing still and the rest of the universe is coming up to hit us in the face at .99999% C.

    I am going to see if I can make a Relativistic Kinetic Energy calculator

  23. Rod Rogers says:

    Catastrophic for the non-C object, perhaps. Not so much for the ship traveling at .9999999 C, with its huge kinetic load all the way down to the sub-atomic level. Seems to me it would be doing the vaporizing instead of being the vaporizee.

    Imagine trying to take a fix with sensors. Nothing but blue-shifted garbage coming in from up front, where 18 hours of data might arrive in a few seconds, and from astern, data red-shifted to…well nothing. Can’t detect the incoming photon because it takes too long to be detectable. Might be a 360 deg ring around midship, but somehow that concept seems to elude my imagination.

  24. Keith says:

    But the way relativity works, the ship would be standing still with no kinetic energy. The universe would be moving at it with huge kinetic energy. The frame of motion of the observer is always at rest.

  25. Rob says:

    This is a great tool. I usually just do these calculations in my head or on a regular calculator if I’m lazy. It’s nice to have a quick cheat to see if I have a mistake. Keep up the good work.

  26. Glenn says:

    Hey, I’m not getting any results out of the time dilation section. I’m curious to know the dilation that a speed of 0.5c will spit out.
    Can you help?

    Cheers
    :)

  27. Keith says:

    It works for me

    1 second at .5C is 1.1547 observed time. going the opposite way. If you observe a ship going .5C for one second, the ships passengers will age .866 seconds.

    Keith

  28. Ivan says:

    I love this page, thank you. It would be cool to have fuel/payload ratio for long distances assuming some theoretically perfect engine.

  29. C. Albert says:

    Thanks, Keith! I’m fairly conversant with several sciences on verbal, graphical and statistical (as they are concrete) levels, but not the math. I only passed basic calculus via memorization & a generous curve (managed a B, but I remember nothing but the graphical concepts and that there was a lot of trig having nothing to do with measuring the height of flagpoles). I couldn’t do the relativistic calculations on my own, and was excited to find this site to generate plausible numbers for my sci-fi stories. Your other sections are thought-provoking as well. At the risk of offending your Weasel Word Detector: thank you very much for your time & generosity in providing this tool.

  30. Rick Novy says:

    I stumbled across this resource today and have already shared it with the writers who follow me on Twitter.

    Shoot me an email if you want some help with those acsh calculations for the relativistic travel tool.

  31. Tom says:

    Hey, Keith. Just wanted to thank you again for the calculators and for the fix, some months back, on the units gadgets.

    If you ever have the time/inclination to do the velocity/mass->KE calculator you’ll be an even bigger hero in my book. After much frustration I’ve got my TI calculator to give mostly believable numbers but I’d be happier if I could compare them to your proven QA.

    Many thanks!

    -Tom

  32. Fernando Torres says:

    Hi Keith, this is a nice calculator. I have a suggestion for Long Relativistic Journeys, can you add the Average and Peak speeds in terms of c (and maybe other units)? Thanks.

  33. Maggie A says:

    Just a courtesy notice that I linked your site in my piece “Star Wars, Einstein and When Lucas Got It Right” ( http://members.cox.net/maggieameanderings/2011-Oct-16.htm ). And thanks……this page perfectly illustrated, in an easily understood way, the point I was making.

  34. Yoron says:

    Hi :)

    This is a impressive effort. One thing I would love to see though is the math behind your calculations. Yeah, I’m sort of curious.

  35. jac says:

    32000 ly journey at 1G will take only 20 yrs for the ship ?
    are you sure that is correct?

  36. Keith says:

    That’s the truth according to Einstein. The people on the ship will see that it takes 20 years. Of course, back on earth a period of more than 32000 years will have passed. You can’t go faster than C, but the people on the ship will feel as though they did. The observers on Earth will say that their time frame slowed down. There may not be any observers left on Earth when they arrive at their destination, though.

    I wrote a story based on this called “The Short Run”. In the long run we’re all dead.

  37. Tom says:

    Let me put in a vote for relativistic energies. Especially after reading the piece of prose pollution _Last Train From Hiroshima_. It’d be nice to have a one-stop source for the energy of a nucleus traveling at relativistic speeds, to say nothing of rocks, ships, planets, and whathaveyou.

    I really appreciate the fixes you did a few months back after I bugged you and I hope that there’s enough support and you have enough time and interest to add the energy calculators to the site.

    Once again, humble and unworthy thanks from a frequent visitor.

    TK

  38. astralith says:

    THANK YOU! THANK YOU! THANK YOU! As a sci-fi writer this is PERFECT! Never let this site go :-D

  39. JackF says:

    Thanks for this Keith. I’ve wondered about the math since I read A.C. Clarke’s “Rendevous with Rama” series in high school. Using your site for 10 or 15 minutes helped me get a much better mental model of the implications of relativity.

    A ship sets out from Earth to visit Sirius (about 8.6 LY distant) with an acceleration/decel of 1G for each half of the trip. It takes about 4.6 years ship time, and about 10.3 years earth time. A second ship heads out to visit Kepler 22B (~600 LY distant) at the same rates. The trip takes 12.5 years ship time, but over 602 earth years pass.

    I never had a firm mental picture of time dilation until I played with your calculator. STL speeds increase asymptotically, so the decimal places have incredible impact. I never visualized how much impact. Travel at .999C for 30 days ship time and 670 days pass on Earth. But travel at .999995C for 30 days and 9,486 days pass on earth. Observers on Earth see ship time slow; on-ship observers see Earth time speed up. I knew that but I couldn’t visualize it as clearly as I can now. Cool, thank you!

  40. Andrew says:

    Amazing!
    I love the relativistic journey calculator. I am planning on going into engineering and studying the building of spacecraft and propulsion systems. Playing around with the calculator provokes some interesting thoughts- how about a time capsule- send out a time capsule and it could return to earth thousands of years later. You could also do a two-in-one mission; send a heavily shielded time capsule and a robot to take observations of a star of your choice; imagine what people would think hundreds of years later. Of course, it also raises questions about the practical application of space travel and the real difficulties in maintaining a type II civilization.

  41. Jonathan Vos Post says:

    I argued with my later 4-time co-author Sir Arthur C. Clarke about this, and in 1969 he agreed that I was right. The relativistic multi-stage rocket equation, not within the reach of your calculators, allows for “Practical Robotic Interstellar Flight” even with fission power (which converts roughly 0.1% of mass to energy), and more easily with fusion power (roughly 1% conversion).

    See my refereed paper (republished by the British Interplanetary Society):

    INTERSTELLAR
    http://magicdragon.com/ComputerFutures/SpacePublications/STAR.html

    Hydrogen Ice Spacecraft for
    Robotic Interstellar Flight
    by
    Jonathan Vos Post, F.B.I.S.

    ABSTRACT

    Spacecraft constructed from cryogenic hydrogen (or deuterium
    and tritium) ice can use the same material for structure,
    shielding, coolant, and fuel. This type of “autophage”
    (self-consuming) spacecraft achieves an extremely low dead-weight
    fraction, which is a critical parameter for optimizing the
    performance of interstellar spacecraft.

    To reduce the volatility of hydrogen ice, a particular
    self-refrigerating structure is presented. Hydrogen ice by itself
    is imperfect as a structural element; various methods of
    stiffening by the admixture of carbon or boron fibers are
    discussed. Other cryogens relevant to specific fusion reactions
    are considered, including deuterium, tritium, boron-11, and
    saturated solutions of lithium in anhydrous ammonia.

    A quantitative analysis is presented of the relativistic
    kinematics of multi-staged interstellar iceships. In the limiting
    case of a 5-stage deuterium ice fusion spacecraft on a one-way
    mission with no deceleration at the destination, a dead-weight
    fraction of 10-1 for each stage, and a total payload fraction of
    10-5, then the final burnout velocity of the 5th stage is 0.64c,
    which at constant 0.0485 g acceleration would reach Alpha Centauri
    in 12.81 years, and at 1-g acceleration would get a probe zipping
    through the Alpha Centauri system in 6.7 years.

    Appears in: the Proceedings of “Practical Robotic Interstellar Flight: Are We Ready?”, New York University, New York City, 29 Aug-1 Sep 1994, and in Journal of the British Interplanetary Society, April 1996

Leave a Comment

 

 

 

 

 

 

 




 
About/Contact