I’m going to be running an RPG set in space, and I need to come up with a simplified way to determine the distance between two planets in the system. Been a while since I did any trig, so I’m trying to create a handy chart that I can consult. Here’s what I have so far:
Since it is a small star, the orbital distances are comparatively smaller than that of Earth.
Planet 1 is at a distance of 21 million miles, planet 2 at a distance of 29 million miles. (I realize that metric is sexier for science but all the unit measurements in GURPS are imperial.)
Planet 1 orbits in 58.8 Earth days, planet 2 orbits in 97.41. I looked at that and said, hey! The ratio is about 60:100. Or to look at it like a clock, every Earth day that passes, planet 1 moves 1 minute, and planet 2 moves 36 seconds.
Now I just need a way to calculate their distance from the number of “minutes” apart they are. I grok that the number of “minutes” * 6 = degrees, and that degrees * pi/180 = radians.
I also grok that at 0 minutes/0 degrees (their closest separation), the distance is distance2 - distance1, and that at 30 minutes/180 degrees (their farthest separation, as the spacecrow flies), the distance is distance2 + distance1. At 15 minutes/90 degrees apart, the Pythagorean theorem will suffice (since the orbital distances form the legs of a right triangle and I can solve for the hypotenuse).
It’s all them other distances between that get me. How do I figure 'em?
I started putting together a chart of distances in Excel using the formula for the law of cosines: c[sup]2[/sup] = a[sup]2[/sup] + b[sup]2[/sup] -2ab*cos(angle).
It seems to be giving accurate answers for angles below 90 degrees, except that for some reason the distance is greater at 66 degrees than it is at 90 degrees. Is that right?
For degrees over 90, the answers are clearly wrong.
I can’t do trig. May I offer an alternate, “poor man’s” version?
If I were to GM a game, I would use a hexagon based map of the planetary system, and decide on a scale. (Say, 1 hex equals 1 light minute.) (I have hex maps left over from my strategy boardgame heyday. )
Decide on an orbital period for each planet or asteroid, and their “start” positions (when the players first enter the system, for example). You should be able to figure out how long it takes for each planet to move one hex along it’s orbital track. (Example: Place the planet at 9 hexes out from the star, you can then count how many hexes are in the orbital ring. Divide number of hexes by the planetary year, and voila!)
When you need to know how far planet 3 is from planet 4, figure out which hexes they should be in at that moment, and count the distance, in hexes.
That works for circular orbits, not so well with irregular ones.
I did this for a Traveler RPG game.
I realise it ignores gravitational effects, but the sci-fi engines were so powerful that trips lasted only a few days, usually, so that minor course corrections due to the gravitational effects of the star(s) and planets were merely a footnote as far as the plot goes.
Are you sure you chose the correct denominations for the sides? If you letter the planets A and B and the sun they’re orbiting C, then the side whose length you’re looking for is a. The angle between the two planets is the angle at C, as it appears in the equation you’re quoting (the sides are named for the points of which they are opposite). Working on that equation, we get
Sorry, my fault (I labelled the points differently on my scrap paper than in that thread :smack:). You’re right, if we label the sun C, then the side you’re looking for is c and the angle at the sun is the one that goes into the cosine in your equation.
Then again, you must have goofed up your calculation when you said you got a bigger distance for an angle of 90° than for 66°. The cosine of 90° is zero, so the -2ab*cos part becomes zero as well, and we have c² = a² + b² (Pythagoras would agree with that). The cosine of 66° is something like .4067, in any case larger than zero, which means that your result ought to be lower.
The law of cosines also applies to obtuse triangles, so I don’t see why your results for angles > 90° can be wrong.
Jesus, Fish, there have only been something like 22 RPGs created in the history of the US space program. You’re working on number 23, and you are farting around in Excel? Come on, what are you really up to?!
I started with a known value (180 degrees) and worked backwards until I realized that the answer was 3.14159. Then I slapped my forehead and checked the input parameters for the COS() function. Yeah, it should be in radians.
Just in case you grow tired of working this out manually (or don’t want to write a script for it), here’s a web engine that lets you enter parameter for any triangle and computes the remaining values (providing that the known parameters are sufficient for this calculation, of course). The page is in German, but that shouldn’t keep you from using the engine.
I’m not clear on why you are trying to do this; if what you want is an accurate way to estimate the travel time between planets then you are also going to have to account for the differences in orbital velocity. (I’m assuming that your ships don’t have drives that can accelerate at multiple Gs or some other beyond-hard-science tech that would let you dispense with the issue entirely.) If what you want in an explicit answer, numerically integrating (i.e. adding up time steps) using Kepler’s second law will get you very, very close, and you can also figure out speed (though you’ll still have to figure out the vector for actual velocity). However, for game purposes, I think mlees’ solution is good enough for done; who wants to sit there doing orbital mechanics calculations every time your characters decide to fly from Planet F to Planet R? (I do, actually, but I’d set up the problem in Matlab or Mathematica and have it generate answers automatically, requiring a lot more math than you probably care for.)
It’s also a way of estimating information data lag between planets, as from an interplanetary information network; it’s also a way of calculating range for other things (for instance, a transporter) that have a maximum finite operational distance.
Yes, I would have to account for the vector of planetary movement involved, but having a round figure to start with is good enough for going on.