Jump to content

[1.12.x] KSP Resonant Orbit Calculator


linuxgurugamer

Recommended Posts

"Three???" Gene howled as he burst thru Wernher von Kerman's office door... "Three satellites gone in only ten days??"
"I'm afraid so..." von Kerman stammered.
"Do you know how much this is costing us???" Gene sighed... "What happened this time?
"The same as before... as soon as it passed around the Mun, we lost contact, and it couldn't execute its final burn..."
"Great... just great." Gene frowned. "And how do you plan in solving this?"
"Well... Linus Kerman has the R&D crew working double shifts, and they may have come up with an idea... Its called a resonant orbit calculator..."
"A... what???" Gene shook is head. "Speak Kerbal, please..."
"Well... the idea is to launch a string of satellites, instead of just one... each in communication with the next... using this calculator to determine each orbit precicely..."

Gene stood for a moment before responding...
"Do it"

Important Kopernicus Note

The information in the spoiler below has been superseded by the latest update:

The mod is now aware of Kopernicus and properly generates the images.  I'm leaving the information below in case anyone wants to do it manually; however, you can also force a regen of the images in the settings page

Spoiler



Thanks to forum user @Gordon Dry for the following:

    Disable Kopernicus onDemand where you find it:
        %useOnDemand = False
        %useManualMemoryManagement = False
        
    Don't forget to reenable it after the testing.
    
    Delete the files in
    GameData\ResonantOrbitCalculator\PluginData\Cache\
    then start the game one time.
    Get to the Main Menu, wait a minute and then exit the game.
    
    --
    
    The cache files will not be overwritten once created, so you could set up 
    a test install with only the planets, make a backup of the created cache 
    and then copy the cache directly over on reinstalling the mod.
    
    You need at least:
    
        000_ClickThroughBlocker\
        001_ToolbarControl\
        CTTP\
        EnvironmentalVisualEnhancements\
        Kopernicus\
        ModularFlightIntegrator\
        ResonantOrbitCalculator\
        Squad\
    
    plus everything what belongs to the planet pack, like for example for RSS with RSSVE:

        KSCSwitcher\
        RealSolarSystem\
        RSSDateTime\
        RSS-Textures\
        RSSVE\

Resonant Orbit Calculator window

SDpMyhM.png

 

Showing the alarms added to Kerbal Alarm Clock:

SuSNm81.png

 

Settings page

igO9wCi.png

Availability

Dependencies

Usage

  • Select the planet you want to work with.  The first time in, it will use the default homeworld, subsequent uses will remember the last planet used
  • Select the number of satellites you want to emplace
  • Either enter an orbital altitude, or select Synchronous or Minimum LOS orbit
  • To show the Lines of Sight, select the Show LOS Lines
  • By default, the occlusion of the LOS is the planet surface.  Select the Occlusion modifiers to change that
  • By default, it will calculate an orbit which goes higher than the target orbital altitude.  To instead do a dive orbit, select Dive Orbit
  • To select an orbit based on the current Ap or Pe, click the appropriate toggle
    • When this is done, a button will be presented to create a maneuver node at either the Ap or Pe (whichever you selected)
    • Some more buttons will be presented:
      • Clear all nodes
      • Add alarms to KAC (only if Kerbal Alarm Clock is installed)
      • Execute Maneuver (only if Mechjeb is installed)

Settings

There are several settings available, in the stock settings pages:

  • Deselect Show planet image if you prefer a solid circle instead of the image of the planet
  • Deselect Show tooltips if you don't want the tooltips shown
  • Deselect Use last selected planet if you don't want to use the last planet as the default

My thanks to the following people for their assistance:

All code included in this mod which I didn't write are under the MIT license.

 

Edited by linuxgurugamer
Link to comment
Share on other sites

On 8/25/2018 at 11:28 AM, jpkerman said:

It already Sunday in Sydney, New South Wales, Australia.

  posted by Jpkerman winner of the 2017 Butthead award,

People are soooo impatient :D

On 8/25/2018 at 11:28 AM, jpkerman said:

It already Sunday in Sydney, New South Wales, Australia.

  posted by Jpkerman winner of the 2017 Butthead award,

and now released

23 hours ago, zer0Kerbal said:

 

but what day and time is it on the Mun? ;p

released

Link to comment
Share on other sites

@linuxgurugamer Nice to see the finished mod, great work! :)

Anyway, I have a few suggestions/issues :P

  • First of all: I can already hear all the guys/girls screaming that the mod button does not appear, you might want to add ClickThroughBlocker and ToolbarControl as dependencies to your OP ;)
  • The buttons for 'Minimum LOS orbit' and 'Synchronous orbit' don't get a white dot when selected
  • If possible: It would be nice to save the settings while changing from the editor to the flight scene. If the screenshot feature is your solution to this, that's fine too ;)
  • Maybe set the color for 'Synchronous orbit' to the same color in the drawing, like it is already done for 'Minimum LOS orbit' and 'Resonant Orbit'
  • Typing in a number of satellites does not update the calculated numbers/drawing

I guess that's all for this time^^

Link to comment
Share on other sites

7 minutes ago, 4x4cheesecake said:

@linuxgurugamer Nice to see the finished mod, great work! :)

Anyway, I have a few suggestions/issues :P

  • First of all: I can already hear all the guys/girls screaming that the mod button does not appear, you might want to add ClickThroughBlocker and ToolbarControl as dependencies to your OP ;)
  • The buttons for 'Minimum LOS orbit' and 'Synchronous orbit' don't get a white dot when selected
  • If possible: It would be nice to save the settings while changing from the editor to the flight scene. If the screenshot feature is your solution to this, that's fine too ;)
  • Maybe set the color for 'Synchronous orbit' to the same color in the drawing, like it is already done for 'Minimum LOS orbit' and 'Resonant Orbit'
  • Typing in a number of satellites does not update the calculated numbers/drawing

I guess that's all for this time^^

Dependencies added.

Buttons are not supposed to get a white dot, it's an instant selection, and the altitude can be changed by hand.

I'm fixing the update when typing in the number of sats now

I'll look at the color of the synchronous orbit and the saving between scenes later.

Thanks

 

Link to comment
Share on other sites

1 minute ago, linuxgurugamer said:

Buttons are not supposed to get a white dot, it's an instant selection, and the altitude can be changed by hand.

Ok :)

2 minutes ago, linuxgurugamer said:

I'll look at the color of the synchronous orbit

I guess, this one depends also on 'readability' respective contrast but it is easy for you to find out and hard for me^^

Link to comment
Share on other sites

7 minutes ago, eberkain said:

Oh wow, this completely blows my away.    I think the only tool left I wish was in-game was some kind of gravity assist planner. 

I'm thinking about enhancing this with antennas and antenna range info.

Re. the gravity assist planner, is there a web-based planner?

Link to comment
Share on other sites

5 minutes ago, linuxgurugamer said:

I'm thinking about enhancing this with antennas and antenna range info.

Re. the gravity assist planner, is there a web-based planner?

I've seen people refer to using matlab, which this looks like a plugin for that.  I've never took the time to learn how to use it because it looks so intimidating, I want a for-dummies version where I can just plugin my destination and the gravity assist body and then have it calculate a launch window.  

Link to comment
Share on other sites

15 minutes ago, eberkain said:

Oh wow, this completely blows my away.    I think the only tool left I wish was in-game was some kind of gravity assist planner. 

That's rather complicated.  But there are these tools available:

 

The Flyby finder is not updated for 1.4, although I think the values haven't changed.  It's not a simple process, and takes time, I don't think an in-game tool would be worth it at this time.

 

Just now, eberkain said:

I've seen people refer to using matlab, which this looks like a plugin for that.  I've never took the time to learn how to use it because it looks so intimidating, I want a for-dummies version where I can just plugin my destination and the gravity assist body and then have it calculate a launch window.  

Flybys are not for "dummies", it takes time and patience to both figure them out and execute them

Link to comment
Share on other sites

51 minutes ago, linuxgurugamer said:

The Flyby finder is not updated for 1.4, although I think the values haven't changed.  It's not a simple process, and takes time, I don't think an in-game tool would be worth it at this time.

I can confirm that it still works in 1.4 for the stock system and OPM, I'm not sure about GPP (surface gravity values for Lili were changed in the last update but who wants to use Lili for a gravity assist^^) and KSS.

Link to comment
Share on other sites

1 hour ago, 4x4cheesecake said:

I can confirm that it still works in 1.4 for the stock system and OPM, I'm not sure about GPP (surface gravity values for Lili were changed in the last update but who wants to use Lili for a gravity assist^^) and KSS.

I looked (briefly) into the FlybyFinder with an eye towards making it a native mod.  But it's written in what appears to be a form of Pascal, which isn't a killer, but then looking at the instructions on how to use it just made me shudder

Link to comment
Share on other sites

4 minutes ago, linuxgurugamer said:

I looked (briefly) into the FlybyFinder with an eye towards making it a native mod.  But it's written in what appears to be a form of Pascal, which isn't a killer, but then looking at the instructions on how to use it just made me shudder

Yeah, it is not really intuitive and it took me some time to actually get any usable results. Even if you know how to use it, it can still be a hassle to get results, especially if you want to use multiple flybys...

Link to comment
Share on other sites

2 hours ago, 4x4cheesecake said:

Yeah, it is not really intuitive and it took me some time to actually get any usable results. Even if you know how to use it, it can still be a hassle to get results, especially if you want to use multiple flybys...

Thinking about it, it's really just a more advanced form of TransferWindowPlanner, instead of just 1, it deals with multiple sequential destinations.  But it has to be easier to use, right now you do a lot of guessing before getting anywhere

Link to comment
Share on other sites

32 minutes ago, linuxgurugamer said:

Thinking about it, it's really just a more advanced form of TransferWindowPlanner, instead of just 1, it deals with multiple sequential destinations.  But it has to be easier to use, right now you do a lot of guessing before getting anywhere

I have a wild guess here: The algorithm looks for trajectories without any midcourse corrections, so it becomes harder and harder with every body added to the calculation. So to improve the calculations, it may helps to include small maneuvers, maybe just withthin the SOI of a flyby to reduce the number of calculations. These maneuvers are necessaray anyway, since I highly doubt anybody can perform a Kerbin -> Eve -> Kerbin -> Eve -> Jool encounter with just a single burn at Kerbin. Probably, limiting the dV to some small numbers so the results will not end up with dV requirements much higher than a simple hohmann transfer.

Actually, the web based transfer window planner can include midcourse plane changes, so if you want to think about possible solutions, you may want to take a look there ;)

Edited by 4x4cheesecake
Link to comment
Share on other sites

Linux, this is a really neat tool. :D Have you possibly thought about changing the white background to black (or maybe having the ability to change it)? It may look more appropriate in the depths of space and would mean if you opened the GUI in space, you wouldn't be blinded by a big white square. :D

I did a little mock up to show the difference:

QkZP2zP.png

If you really wanted to expand on its feature set I could suggest the following additions:

  • Button to grab the current orbital parameters of the vessel.
  • Button to create node at either periapsis or apoapsis to adjust your current orbit to the required resonant orbit.

Apart from that it looks great. If you are planning to do a antenna or flyby mod though, I'm not sure it'd fit within this mod necessarily though and may be more suitable being an independent mod.

Link to comment
Share on other sites

1 hour ago, Poodmund said:

Have you possibly thought about changing the white background to black (or maybe having the ability to change it)?

Yes, being worked on.  Since you mentioned it, do you think having it be configurable for both the editor and in flight would be useful?

1 hour ago, Poodmund said:

Button to grab the current orbital parameters of the vessel

This only deals with perfect orbits.  If grabbing current parameters, how would you suggest it be done?  Get the Ap?  the Pe?  An average?

1 hour ago, Poodmund said:

Button to create node at either periapsis or apoapsis to adjust your current orbit to the required resonant orbit

I suppose I could do that, but again, this is designed with a perfect circular orbit in mind.  I thought about this, and didn't want to have to start calculating a circulization maneuver.  I can see that becoming just a bit hairy.

1 hour ago, Poodmund said:

antenna

I was thinking of possibly having an antenna selectable, and then showing it's range, somewhat similar to Antenna Helper, although I have no wish to replicate that mod.  And I'm definitely NOT thinking of a flyby mod at this time

Link to comment
Share on other sites

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...