Jump to content

[1.4.x] Orbital Decay - Resumed v1.6.1.1, 04 Jun 2018


Papa_Joe

Recommended Posts

  • 1 month later...

@Papa_Joe I am having the same issue as rakol, I have installed the mod and it's dependancy correctly, but the orbits never seem to decay. Are there any troubleshooting steps I should take, any known mod conflicts etc.?

EDIT: Crafts do decay, but they decay at a very fast rate (objects in LKO decay in hours) even with the multiplier set to 0.1, and station keeping doesn't seem to work, stating that crafts (fully fueled with engines and/or RCS thrusters) don't have any fuel available.

Edited by golkaidakhaana
Link to comment
Share on other sites

20 hours ago, sslaptnhablhat said:

@Papa_Joe I am having the same issue as rakol, I have installed the mod and it's dependancy correctly, but the orbits never seem to decay. Are there any troubleshooting steps I should take, any known mod conflicts etc.?

EDIT: Crafts do decay, but they decay at a very fast rate (objects in LKO decay in hours) even with the multiplier set to 0.1, and station keeping doesn't seem to work, stating that crafts (fully fueled with engines and/or RCS thrusters) don't have any fuel available.

The Decay rate is depending on the mass and size of an object. Objects with an light mass can be slow down very fast so the decay rate is very high. For me it works well in 1.4.5. My station in an LKO has an Decay of around 85 days without station keeping.
Station keeping and Decay is working but you should concern that it didn`t work in flight scene itself, only if you are NOT flying this Object like when you are at the Space Center or other Objects.

Link to comment
Share on other sites

1 hour ago, Cheesecake said:

The Decay rate is depending on the mass and size of an object. Objects with an light mass can be slow down very fast so the decay rate is very high. For me it works well in 1.4.5. My station in an LKO has an Decay of around 85 days without station keeping.
Station keeping and Decay is working but you should concern that it didn`t work in flight scene itself, only if you are NOT flying this Object like when you are at the Space Center or other Objects.

Yes, but the object I was testing in question was two parts and weighted <1000kg, however my main concern is that station keeping doesn't seem to work at all.

Edited by golkaidakhaana
Link to comment
Share on other sites

1 hour ago, Tonas1997 said:

Which version of Orbital Decay should I get for KSP 1.3.1? The releases page is kinda confusing :P

This mod as maintained by Papa_Joe has only been compiled/released for 1.4.x. For a 1.3.1 compatible version, you'll need to do some digging; refer to this thread's OP for a link to the previous thread for this mod (before it was adopted) and work back from the final page to see if there are any available links. No guarantees though!

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 2 weeks later...

@Papa_Joe

Glad to see this mod being maintained. It's strange for me that something so important is highly neglected by the game and modding community.

I tested the last release in a 1.3.1 version, worked perfectly, without any bugs. So far, any vessel hasn't lost it's LAN, a bug that the old version had. You did something to address that?

I also have a couple of suggestions to make the mod even better:

- Exclude from the decay vessels above a certain altitude, to save processing power and reduce the clutter in the interface. At some altitudes the decay times gets to > 1000 years anyway, and the station keeping don't use any mensurable amount of fuel.

- The interface could get some improvements and a better sorting of the vessels

- A new icon for the tool bar would be nice, that white cat is kinda creepy and don't fit in the game (nothing against white cats, I have two). The button also don't have any animation when clicked, like most mods nowadays.

- Make the Solar Activity mod an optional, I think this adds a lot of complexity that many player don't want

- Make optional that the alerts stops the time warping, specially for debris
 

Link to comment
Share on other sites

28 minutes ago, MaximumThrust said:

Exclude from the decay vessels above a certain altitude, to save processing power and reduce the clutter in the interface. At some altitudes the decay times gets to > 1000 years anyway, and the station keeping don't use any mensurable amount of fuel.

This could also solve the "on-rails-leave-SOI-and-die" issue I first saw in KSP 1.4.x

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
On 6/24/2018 at 12:35 PM, FreeThinker said:

Hey @Papa_Joe

For my own research in orbital decay simulation for solarsail, I looked at how the Orbital Decays "RealisticAtmosphericDragDecay" method worked and noticed that is mainly functions by modifying and persisting a vessel orbit semi-major axis . This might be sufficient for a circular orbit but for an elliptic orbits, this is highly unrealistic as the decay would decrease the periapsis much to fast, causing a vessel to get lost prematurely. I fiddled around a bit I figured a better method by simply applying a drag factor to the every vessel orbit.

Here is the simplified code:

Spoiler


            foreach (var currentvessel in FlightGlobals.Vessels)
            {
                var vesselHeading = currentvessel.GetOrbitDriver().orbit.GetWorldSpaceVel();

                var vesselDeceleration = vesselHeading.normalized * -dragOnVessel;

                ChangeVesselVelocity(currentvessel, universalTime, vesselDeceleration * TimeWarp.fixedDeltaTime);
            }

        private static void ChangeVesselVelocity(Vessel vessel, double universalTime, Vector3d acceleration)
        {
            if (vessel.packed)
                vessel.orbit.Perturb(acceleration, universalTime);
            else
                vessel.ChangeWorldVelocity(acceleration);
        }

        public static void Perturb(this Orbit orbit, Vector3d deltaVV, double universalTime)
        {
            // Transpose deltaVV Y and Z to match orbit frame
            Vector3d deltaVV_orbit = deltaVV.xzy;

            // Position vector
            Vector3d position = orbit.getRelativePositionAtUT(universalTime);

            // Update with current position and new velocity
            orbit.UpdateFromStateVectors(position, orbit.getOrbitalVelocityAtUT(universalTime) + deltaVV_orbit, orbit.referenceBody, universalTime);
            orbit.Init();
            orbit.UpdateFromUT(universalTime);
        }

 

 

As you can see this code simply applied a drag factor to all vessel and persistence is automatically taken care by KSP.

3
3

Did this code ever get implemented? I ask because I am not sure where how it was meant to be added to the mod otherwise I'd compile the code myself

Edited by Svm420
Link to comment
Share on other sites

I tried the last release, and the UI bugged out. I compiled the source against the latest KSP and the UI is working but I think it's buggy. Only the active vessel is decaying (for other vessels there are only the warning messages about decay and vessel destroyed, but this isn't reflected in a shrinking orbit) for me and stationkeeping doesn't always recognizes the engine. 

Edit: after some digging I figured out, that the decay is properly tracked in the mod's data structure, but somehow the update function, which should update that in the game data, fails.

Edited by kalmor
Link to comment
Share on other sites

I think this mod is great and adds to the realism factor for those who enjoy that.  I've been using the current version in my 1.6.1 career.  After kalmor's post I looked more closely and saw that some debris objects were not decaying while others were.  As far as I can tell all other objects are decaying but I'm going to keep a log and monitor for a while.  As for the station keeping, as a test, I enabled it on one of my probes around Kerbin and it appeared to turn on and gave me a time remaining.  The probe was using an LFO engine (88-M6 from RLA Reborn), no RCS.

Link to comment
Share on other sites

So, here is a recompile for 1.6.1:

https://github.com/kalmoran/SolarCycleSimulator/releases/tag/v1.1.0.2
https://github.com/kalmoran/OrbitalDecay/releases/tag/1.6.1.2

Since this is my first github release, please go easy on me (or not). I replaced most of the icons, cost they annoyed the hell out of me. I haven't fixed any bugs but only found one major one, which I mentioned in my previous post (In flight other vessels' in-game SMA isn't updated, but the decay is tracked in the mod's persistence and it destroys vessels, if they fall below half of the stock atmosphere).

It is advised to backup your save (especially for hard mode). 

I would not like to take up this mod until we hear back from @Papa_Joe, but I will start to rework some aspects:

  • Stationkeeping: it's a bit clunky atm, works fine on unloaded vessels, I will try to come up with a solution for active ones (any suggestions are welcome). For now I think there should be a target AP and minimum PE (top of the stock atmosphere?), if a vessel falls near it, there would be a warning message (so EVAs and docking can be aborted) and the station would boost up with a bi-Hoffman transfer to the target orbit. Ofc if the player switches off of a vessel with just a slightly decayed orbit, stationkeeping would still boost it up to the target orbit anyway.
  • The mod's data structure and handling is all over the place, redundant data (looking at you SMA) should be eliminated. 
  • Debris warning messages are irritating. I might disable them altogether, if i can give back vehicle crash handling to KSP.
  • Drag is applied in a weird way on the active vessel. Instead of affecting the opposite side of the orbit it simply decreases the SMA. I will look into how to change that.
  • There might be some performance issues. With 4-5 active vessels and ~10 asteroids it felt like, that the mod had a notable impact on my game. 
Link to comment
Share on other sites

Sorry, I haven't realized, that you already started to incorporate this mod in KSA, since it was only listed as a planned addition. Guess in that case I will go with Plan B, and make my own mod, which only accounts for atmospheric drag, since the other effects are negligible in the scope of this game. One of my main beef with this mod is that it puts a lot of effort (and processing power) to simulate decay but then the calculated ship drag model is more or less a joke compared to that.   

Link to comment
Share on other sites

@kalmor, I'm using your recompile in my current career save and I already notice some things are working that weren't before.  Debris list is accurate now, active vessel actually decays and the icons are definitely better!  Sorry I don't have more detailed info but I just wanted to thank you and give some feedback.  I don't quite follow what you mean't when saying KSA was incorporating this mod.  What does that have to do with you updating this mod or starting your own?

Link to comment
Share on other sites

16 hours ago, kalmor said:

Sorry, I haven't realized, that you already started to incorporate this mod in KSA, since it was only listed as a planned addition. Guess in that case I will go with Plan B, and make my own mod, which only accounts for atmospheric drag, since the other effects are negligible in the scope of this game. One of my main beef with this mod is that it puts a lot of effort (and processing power) to simulate decay but then the calculated ship drag model is more or less a joke compared to that.   

well, I still haven't reached orbit and I'm still not actually using this mod in the current form - mainly since I wasn't sure if it was going to be continued or not. My current plan actually was to use the orbital decay modeling Arrowstar implemented and just manually copy the revised orbital parameters into the game as needed. Like, if I have some junk in space I can leave it in space in the game but use KSPTOT to calculate the decay and update the Ops Tracker, then when the debris re-enters I just delete it from the game. Or for an active vessel I only need to update the game vessel when I have reason to switch to it. Still, I would prefer the mod in-game to save me lots of work once more sats start orbiting around places :P So all I really ask is that any new version of the mod remain compatible with KSPTOT

Link to comment
Share on other sites

17 minutes ago, kalmor said:

@Arrowstar, since I am a newbie, and can't send messages, I would ask you here: Is the Edit Drag properties is the only place, where you can set the drag characteristics of a ship in KSPTOT?

Hey there!  In Mission Architect, drag is only important for aerobraking, so that's where you set drag.  In Launch Vehicle Designer, the "Edit Drag Properties" area of the initial state is one place where you can edit those parameters.  However, events can have actions that modify drag parameters.  You can add a "Set Drag Properties" action to do this.

In the future, you are welcome to please post KSPTOT questions over in the KSPTOT thread.  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...