Jump to content

Resonant Orbit Calculator v1.4


meyerweb

Recommended Posts

Not 100% sure this is the right place to post this, but I created a single-use widget for calculating resonant orbits to deploy satellites into a circular orbit at regular intervals along that orbit.  It’s at http://meyerweb.com/eric/ksp/resonant-orbits/.

In case you’re wondering “what the heck is this?”, a resonant orbit is most commonly used to set up CommNet constellations around non-Kerbin bodies.  Suppose you want to put three relay satellites into circular polar orbit around Minmus.  You could launch them one at a time from Kerbin and do all kinds of shenanigans to get them into a common orbit (say, 100,000 km above Minmus) at 120-degree intervals along that shared orbit.  Which requires matching inclination and LAN and all manner of stuff, and then trying to jostle them into the right places along the circle.

Or, you could build a carrier craft that hauls three satellites to Minmus, then release them one at a time.  That solves inclination and LAN problems, but what about timing?  The easiest thing is to put the carrier craft into an eccentric orbit with its periapsis at the altitude the satellites should share, and an orbital period 4/3rds the length the satellites will have in their circular orbit.  In this example, the satellites’ final orbits at 100,000m above Minmus will have a period of 2 hours, 39 minutes, 29.5 seconds.  So you put the carrier into an orbit with a periapsis of 100,000m and an apoapsis of 167,652.4m.  That has an orbital period of 3 hours, 32 minutes, 39.3 seconds—exactly 133% the orbital period of the circular orbit.

Having done that, you just release one satellite from the carrier as it passes periapsis on each of three successive orbits.  Hey presto!  You now have three satellites in a polar triangle, sufficient to cover the entirety of Minmus and maintain a network back to Kerbin.  Quick, deorbit or otherwise move the carrier’s orbit so it won’t smack into the first satellite you released on its next periapsis.

I built some spreadsheets to manage the necessary calculations for myself, but it seemed more fun to build a web-based tool that could draw a diagram of the orbits and all that while also spitting out exact Ap and Pe altitudes.  And, while I was at it, show the minimum altitude for a functioning three-satellite setup as well as the edge of the SOI for whatever body I was trying to put satellites around if my orbits were large enough to be a problem, show atmospheres (where applicable), tell me the dV I’d need to inject each satellite into its final circular orbit, and stuff like that.  It looks like this:

screenshot.png

It’s of fairly limited use, but it was fun to make and it supports stock as well as RSS and GPP.  I figured if someone out there could make use of it, that was good enough for me to release it.  Share and enjoy!

 

(P.S. If anyone has feature requests, I’m happy to hear them, though I may not get around to actually doing them.  I mean, I might do them, but I have a tendency to toss these little projects into the wild and then get distracted by some new project and never go back to update the old ones.  So fair warning and all that.)

Edited by meyerweb
Updated to note it supports RSS and GPP
Link to comment
Share on other sites

2 hours ago, meyerweb said:

Not 100% sure this is the right place to post this, but I created a single-use widget for calculating resonant orbits to deploy satellites into a circular orbit at regular intervals along that orbit.  It’s at http://meyerweb.com/eric/ksp/resonant-orbits/.

I spent a few hours today working on exactly the same thing. :o

Link to comment
Share on other sites

12 hours ago, Nathair said:

I spent a few hours today working on exactly the same thing. :o

Heh, like minds and all that.  Don’t let my implementation stop you, though—I learned a ton about JS and SVG in the process!  Which was honestly the real point.

Link to comment
Share on other sites

meyerweb,

 I'm sure that this will come in handy for the community. Thanks for sharing!

 A couple points to add:

-There is more than one way to seed a resonant orbit. In addition to having the Ap above the final orbit, there is also the option of having the Pe below it. This approach often requires less DV in the launch bus, but both approaches must be checked.

-There is also the possibility that your starting Pe is a fixed value (such as Kerbin's SMA about the sun) and you need to find the Ap (and thus SMA) that will yield a resonance. Or vice-versa... for example:

cheepnet_zpsrcojlwsu.jpg


-Semi- resonant orbits are also an option, where the seeder orbit isn't 2/3 or 4/3, but rather 5/6 or 7/6 (releasing a sat every alternate pass). These arrangements, while taking more time to complete, can also result in substantial DV savings.

 Just food for thought if you wish to expand the flexibility of your webapp. I took the lazy way out (like always) and made mine a spreadsheet.

Best,
-Slashy

Edited by GoSlash27
Link to comment
Share on other sites

4 hours ago, GoSlash27 said:

-There is more than one way to seed a resonant orbit. In addition to having the Ap above the final orbit, there is also the option of having the Pe below it. This approach often requires less DV in the launch bus, but both approaches must be checked.

I don’t do this, it’s true, though I do check to see if an Ap will leave the SOI, and if so flip the resonant orbit.  But in my various tests (which were not at all exhaustive), I never found a situation where the injection dV was lower for a Pe-below-final resonance than it was for an Ap-above-final resonance.  Do you have an example of one?  I feel like the math precludes it, but I may not be thinking robustly enough.

Unless—are you thinking of the situation around Kerbin, where the goal is to get a carrier craft to as low an orbit as possible to save on launch dV?

-Semi- resonant orbits are also an option, where the seeder orbit isn't 2/3 or 4/3, but rather 5/6 or 7/6 (releasing a sat every alternate pass). These arrangements, while taking more time to complete, can also result in substantial DV savings.

This one I’m not quite understanding.  Do you mean a 5/6 resonance for a six-satellite constellation, or a 5/6 resonance for a three-satellite constellation?

Link to comment
Share on other sites

18 minutes ago, meyerweb said:

I don’t do this, it’s true, though I do check to see if an Ap will leave the SOI, and if so flip the resonant orbit.  But in my various tests (which were not at all exhaustive), I never found a situation where the injection dV was lower for a Pe-below-final resonance than it was for an Ap-above-final resonance.  Do you have an example of one?  I feel like the math precludes it, but I may not be thinking robustly enough.

Unless—are you thinking of the situation around Kerbin, where the goal is to get a carrier craft to as low an orbit as possible to save on launch dV?

meyerweb,

 Yeah, I'm thinking specifically about the situation around Kerbin. For example, a 2/3 seeder/ final arrangement would require a much smaller booster than a 4/3. As an added bonus, the bus is easier to deorbit at the end.

18 minutes ago, meyerweb said:

This one I’m not quite understanding.  Do you mean a 5/6 resonance for a six-satellite constellation, or a 5/6 resonance for a three-satellite constellation?

That'd be the latter; a 3 sat formation. In some cases, I have found that this "staggered" arrangement allows for more flexibility and a cheaper launch in exchange for a longer insertion procedure. You may not be able to execute a 2/3 pattern due to the Pe being atmospheric (or subterranean), but you can still do a 5/6 and just pop off a sat every other pass. Likewise, a 4/3 arrangement may not work because the Ap is outside the SoI, but a 7/6 does.

For other bodies, it always pays to seed from a higher Ap because 1) That's the direction you're coming from and 2) (N+1)/N > N/(N-1).

HTHs,
-Slashy

Edited by GoSlash27
Link to comment
Share on other sites

Oh, another scenario where the seeder periapsis may be below the final orbit:

Sending a mothership/ lander combo to a planet where it's going to set up it's own constellation, then circ at low orbit to conduct landings. The low DV way to do this is with the feeder orbit below the final orbit for the constellation, preferably with the Pe at low orbit altitude, or close to it. This way the mothership doesn't incur a DV penalty on the way.

Best,
-Slashy

 

Link to comment
Share on other sites

5 hours ago, GoSlash27 said:

Oh, another scenario where the seeder periapsis may be below the final orbit:

Sending a mothership/ lander combo to a planet where it's going to set up it's own constellation, then circ at low orbit to conduct landings. The low DV way to do this is with the feeder orbit below the final orbit for the constellation, preferably with the Pe at low orbit altitude, or close to it. This way the mothership doesn't incur a DV penalty on the way.

Oh, that’s a very good point.  I’ll have to think about a way to let the user easily flip the orbit direction.  Probably a checkbox?  I might need one anyway, to cover your earlier “take longer for lower dV” scenario.  Pondering…

Link to comment
Share on other sites

23 minutes ago, Nathair said:

There's a long standing Remotetech orbit calculator out there you might want to take a look at. It has a multiple launch calculator that shows the options with either Pe or Ap at the target altitude. Maybe you could do something similar?

Interesting!  And I kinda wish my Google searches had turned that up before I started work; I might’ve taken a different approach.  There are a couple of things there I might take inspiration from—I’d been thinking about line-of-sight lines between satellite positions—but I don’t think I want to go as far as trying to map broadcast ranges or calculate connection strengths.  It’s a bit beyond the scope of what I intend here.

I just added a “Flip orbit” checkbox to mine to let users choose which resonant orbit they want to see, at least if there’s no SOI bounds involved (I’ll fix that limitation eventually, I hope).  I prefer showing one carrier orbit at a time; showing both at once seems a bit too cluttered and potentially confusing.  I do think I’ll add an option for showing a body’s geosynchronous altitude, if one exists.

Link to comment
Share on other sites

1 minute ago, meyerweb said:

There are a couple of things there I might take inspiration from—I’d been thinking about line-of-sight lines between satellite positions—but I don’t think I want to go as far as trying to map broadcast ranges or calculate connection strengths.  It’s a bit beyond the scope of what I intend here.

I just added a “Flip orbit” checkbox to mine to let users choose which resonant orbit they want to see, at least if there’s no SOI bounds involved (I’ll fix that limitation eventually, I hope).  I prefer showing one carrier orbit at a time; showing both at once seems a bit too cluttered and potentially confusing.  I do think I’ll add an option for showing a body’s geosynchronous altitude, if one exists.

That's the beauty of making your own tools, right?

Link to comment
Share on other sites

Meyerweb,

I was thinking about it today at work, and realized that the end user wouldn't actually have to manually select the option at all.

For any seeder/ final arrangement, the SMA of the final orbit is related to the seeder's "peak" radius (which would be Ap or Pe) by the following relationship:

Final orbit SMA * Cr = Seeder radius (Pe if smaller, Ap if larger)

Cr = 2*(seeder period/final period)2/3-1

Your webapp could simply check to see if Cr is greater or less than 1 and flag the output as seeder Ap or Pe, respectively.

This would work fine for the case where final desired SMA is is known. For the other case where the seeder peak is known, you can flip the equation to seeder radius/Cr = final SMA

So for example, say you want a 7/6 relationship between the seeder and final orbit. You want the final orbit's SMA to be 700,217m

Cr = 2*(7/6)2/3-1= 1.2164666. Since it's >1, the app knows that the output is seeder Ap.

700,217*Cr= 851,791m

If, OTOH, you want a 7/15 seeder/final resonance for a final KSO orbit, it would be

Cr= 2*(7/15)2/3-1 = 0.2032832. Since this is <1, the app knows it's seeder Pe.

3,463,334m* Cr = 704,038m

HTHs,

-Slashy

Edited by GoSlash27
Link to comment
Share on other sites

  • 5 months later...

Nice, pap1723—thanks!  My actual name is Eric Meyer (or Eric A. Meyer if you’re going by my book-writing name) but you can also use meyerweb as an identifier.  However you want to do it.

I’ll go update the original page to include my name (kind of an obvious oversight now that you’ve pointed it out!) and link to your version for those of the RSS persuasion.

Link to comment
Share on other sites

  • 1 month later...

I had a similar thing with resonant orbits that was queried about recently be someone who "doesn't like doing the maths" where the issue was determining the resonant fraction that their orbit needed to be to position their satellite correctly. I set up a quick Google Sheets to solve the issue: https://docs.google.com/spreadsheets/d/1ZEckmqo7aDPG2ihkM1CuvV9-DCYCt5cBu7leaHrVg1Y/edit?usp=sharing

If you feel any concept in that sheet would be worthwhile integrating feel free to copy or reference it in its entirety as your current tool is great. :D 

Link to comment
Share on other sites

On 9/10/2017 at 3:48 AM, Poodmund said:

I had a similar thing with resonant orbits that was queried about recently be someone who "doesn't like doing the maths" where the issue was determining the resonant fraction that their orbit needed to be to position their satellite correctly. I set up a quick Google Sheets to solve the issue: https://docs.google.com/spreadsheets/d/1ZEckmqo7aDPG2ihkM1CuvV9-DCYCt5cBu7leaHrVg1Y/edit?usp=sharing

Interesting, Poodmund!  I think there’s a lot of overlap there, but what interests me is that (if I’ve understood it correctly) you’ve also basically made a rendezvous calculator—I’ve reached the same orbit, but I’m here and it’s there, so how do I fire to meet up with it on the next orbit?  Pretty cool!

Of course, if I haven’t understood, let me know.  I’e never really used MechJeb, so maybe I’m not getting the actual goal of your tool.  (I do like the rosette lines…maybe I’ll steal those…)

Edited by meyerweb
Link to comment
Share on other sites

Its basically like what you said, either you've already met the orbit in a rough position and now you're figuring out what resonant orbit you need to burn to achieve the correct positioning for a symmetric constellation of satellites or its handy if you've already set up your network but its become out of alignment. You can say, "oh, one of my sats has drifted 20 degrees out of phases, what resonant orbit do I need to set to put it back in place" kind of thing.

Link to comment
Share on other sites

23 hours ago, Poodmund said:

Its basically like what you said, either you've already met the orbit in a rough position and now you're figuring out what resonant orbit you need to burn to achieve the correct positioning for a symmetric constellation of satellites or its handy if you've already set up your network but its become out of alignment. You can say, "oh, one of my sats has drifted 20 degrees out of phases, what resonant orbit do I need to set to put it back in place" kind of thing.

Ahhhh, I see.  I guess I’ve never played a non-kOS game long enough to have satellites drift!

 

Link to comment
Share on other sites

  • 1 month later...
On 11/2/2017 at 5:40 AM, [insert_name_here] said:

Wow, thanks, this is exactly what I needed at the exact right time! Literally an hour ago I was thinking about KSP and how I was going to get three communications satellites into high Kerbin orbit in a triangular formation. Thank you!

You’re most welcome, and thank YOU—your comment was also exactly what I needed at the right time.  Now that http://shop.oreilly.com/product/0636920012726.do is done and off to the printers, I’ve been thinking about what personal projects to work on, now that I have some spare time again.  Your comment has definitely pushed this project higher on the list.

Link to comment
Share on other sites

  • 4 weeks later...

Hey gang—I’ve updated the ROC to v1.1 at https://meyerweb.com/eric/ksp/resonant-orbits/.  It functions mostly the same, but has the following enhancements:

  • Calculates and displays the minimum altitudes for maintaining Line of Sight (LOS) for various constellations.
  • Buttons to instantly set the constellation orbital altitude to the minimum LOS or geosynchronous altitudes (where applicable).
  • Warns you if your constellation’s altitude is inside the planet’s atmosphere (where applicable).
  • Also tries to warn you when a dive orbit’s periapsis will lead to lithobraking.
  • Has a toggle to show the LOS lines between points in the constellation.  The lines will be broken and flickery if they’re blocked by the planet.  (Does not take KSP’s occlusion modifiers into account—this may be added in a future version.)
  • Now under the MIT license!  (TL;DR: do what you like with it as long as you preserve the license and have a link back to the original.)

It also works on mobile, though the layout’s not great.  Ah well, always leave some low-hanging fruit to pluck later, amirite?

Share and enjoy!

Link to comment
Share on other sites

Very useful! I've done several synchronous orbits around Kerbin, Mun and Minmus.

Now I want to do one around Kerbol, 4 vessels 90º apart, at 17x10^9 meters (between Kerbin and Duna).

I want to consume the least possible amount of game-time, warping the minimum possible. Any tips?

Thanks!!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...