Jump to content

[1.0.4] Orbital Decay V0.0.1 (Full Release Version Coming This Week! 05/08/2015)


Whitecat106

What would you like to see introduced after the main features of this mod have been added?  

118 members have voted

  1. 1. What would you like to see introduced after the main features of this mod have been added?

    • Lagrange Points
      47
    • Solar Flares
      33
    • Pressurised Compartments
      11
    • Devoted Remote Tech Position Fixing
      25
    • Persistent Particle Space Debris
      18


Recommended Posts

KSP Orbital Decay

Introduction

Hello everyone, Whitecat106 here creator of the Historic Missions Contract Pack and I wish to share with you an early version of my new project. I have been working on this for the better part of a month after I finally had a break through in the code - as a result of months of tinkering! Some mods in the past have come so close to this but none actually produced a viable working version... well until now...

What does it do?

* On rails and off rails orbital decay for any vessel around any celestial body (except Kerbol.. - working on it), this decay is determined by the altitude above the body, the mass of the body and the density of the body atmosphere (if present).

* On rails and off rails Station Keeping for any vessel that has a Station Keeping module (currently included in all parts with a command module - Will be changed later). This Station-Keeping is suitable for integration with Remote Tech since it fixes vessels at a certain altitude and prevents floating point drifts over time.

* Estimated impact times are given for each vessel.

* All of the above work during time-warp! :D

I can already hear everyone screaming "No this isn't possible!", well...this video shows some of the features currently present and some orbital decay in action:

Planned features:

* Resource handling for On-rails and Off-rails vessels with a Station Keeping module active. - Possibly using Background Processing.

* A more realistic decay curve; this version uses a square function of decay mapping rather than an exponential differential function. The current model is equivalent to approximately 2x real life (~4km/month) but this is changeable in the UI.

* More accurate decay estimates; this version has a low accuracy due to the previous point, especially due to the differences in how decay is handled On and Off rails (active and non active vessels).

* Drag around Kerbol - Only removed due to the extremely small decay values occurring (1*10^-60 which even breaks the float container).

* Better warnings for decaying vessels & a better UI altogether (If anyone can help with UI's drop me a PM :D).

* Possibly a separate mod for Station Keeping more devoted to orbital precision than integration with decay (more useful for Remote Tech users).

You can check out some of my earlier ideas on my Ksp blog.

Known Issues:

* The UI button does not display correctly (probably a dds/png issue) again any advice would be really appreciated.

* The UI is ugly, especially in the Tracking station scene...

* Decay estimates are off, they do not currently factor in the inverse square relationship of altitude to decay therefore they are only point to point estimates, (which are especially broken during high timewarp).

* Stationkeeping uses no fuel (see above).

* Hitting vessels into planets at super high timewarp and super high speeds (literally 50km/s deltaV) can cause issues (to prevent intense calculations this mod currently only updates decay values per second so if a vessel is traveling fast enough the code sometimes cannot keep up).

Download:

Dropbox: | Release | Source |

This mod requires a recent version of Module Manager.

(I will be moving to KerbalStuff for version 0.1.0)

Help Wanted:

I am, by far, not a programmer and the code as it stands (although working) is very messy...

The next big hurdle is resource consumption with background and foreground(active) vessels, one that I am struggling with. I am in the process of integrating Background Processing but if anyone with plugin modding experience could lend a hand It would be greatly appreciated. Especially if you know how to make a nice looking UI and have knowledge coding with mods that involve resource consuption for off rails vessels (Such as TAC, Background processing or Karbonite).

If you fit the criteria and wouldn't mind having a look through the source code and/or giving me some suggestions/modifications to help with the aforementioned features please comment below or send me a PM! Thanks guys! :)

License:

This code is licensed under the Attribution-NonCommercial-ShareAlike 3.0 (CC BY-NC-SA 3.0) creative commons license. However I will be making this less restrictive as time goes on and this mod develops into a version fit for the main release thread.

Enjoy! Whitecat106 :D

Edited by Whitecat106
Update
Link to comment
Share on other sites

IMHO, if someone can make something like this that can integrate drag areas into the calculation and estimate atmosphere densities at arbitrary distances from an object, it should be in R.O. I've always disliked the fact that I can just keep a pod floating at 150 kilometers for years with no station-keeping whatsoever. (keep in mind that the drag area need only be a good guess, as the Reynold's number will be tiny).

Link to comment
Share on other sites

Thanks for all the comments guys, development is going well, I am currently working on resource management using Background Processing. If all goes well I will release version 0.1.0 with resource handling (monoprop for the moment) for Station Keeping vessels, and a fixed image for the toolbar button (why did Ksp 1.0 break .png's with the new .dds so badly? :(). After this I plan on making the UI all nice and pretty and changing the decay formula to a more realistic one (to be precise this one here).

Enjoy everyone! :)

Oh by the way, as for RO/RSS compatibility I have purposely altered the 'decay multiplier' slider in the settings to allow for the decay rates to be reduced. (Reducing this from 1 - Default to 0.1 will make the decay rates more realistic for that RSS feel).

With the new decay formulas I will release an RSS and a Stock version separately.

Link to comment
Share on other sites

Amazing. You will also have resource consumption (like power) being calculated constantly even when vessel is not in use by the player? That would be great!

Walter

Thanks! Yes I am working on this now, the next update will include a MonoPropellant drain at a rate proportional to the decay rate for all vessels in the background or active, this has been done before with many Life Support mods so this should not be too tricky to implement :)

Link to comment
Share on other sites

How about very inaccurate N-body physics that don't do much calculating?

Also, I remember the Orbital Manipulator mod that HoneyFox made a while back, but it hasn't been updated in such a long time!

Also, how about an option on the in-flight/space center menu that disables it so that you can turn it off at free will?

This sounds like an absolutely awesome mod.

Link to comment
Share on other sites

Thanks everyone! I am slowly working through things but I am pretty stumped at the moment :P If anyone could offer their coding help with this whole resource consumption thing it would be greatly appreciated! Infact if anyone can help I will make sure that they get a mention in a contract in my contract pack! :D

But I seem to be going in circles at the moment, really trying to make this resource handling work but I cant even get past making active vessels consume resources no matter the background ones, I understand that there is a way of doing this with ProtoPartModule snapshots but this is beyond my programming at the moment :( So yes.. Help wanted.. Needed.. Begged for!

I plan on making both the resource consumption and the decay its self be toggle-able within the UI. As for N-Body physics I do want to eventually dab into this but at the moment I will finish this mod.. With some help hopefully..

In the meantime untill I either find a burst of inspiration or someone willing to help out with this resource handling I am playing around with Solar Flares and their effect on vessels (Faulty modules, drained resources, kerbal damage, part damage (extreme cases)). As for Lagrange points, if you see my video on the first thread and look closely at the orbit of Kerbin, you may see three points (L3, L4 and L5) in a nice 60,180,300 resonant position around Kerbin (but this is far from perfect or releasable yet).

So back to the matter at hand, anyone interested in helping out? If so send me a PM and we can sort something out! In the meantime I may release an intermediate version with a fix for the ugly UI buttons. Enjoy! :)

Edit: Notice the plea for help theme? :wink:

Link to comment
Share on other sites

Very good mod, I'm giving you some rep and 5 stars, we do need more mods like these.

I suck at coding more than anyone, but one of the resource mods (OKS was it?) has this kind of resource consumption for active/proto vessels. Specifically there was a small logistic module that simulated a supply run from A to B automatically (it pretty much teleported) and used the resources in it to do so, I'd look there.

Link to comment
Share on other sites

There is this background processing mod which should help you dealing with resource consumption in the background.

Also, please don't take this the wrong way, since I really like what you have done, but I think you should limit the scope of your mod if it is overwhelming you. Orbital decay and station keeping seems good enough. Simulating Solar flares and N body seems like daunting tasks to take on. Not stopping you though, and good luck!

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