Whitecat106

[1.1.3] Orbital Decay v1.5.2 (17/07/2016) - Total Overhaul

Recommended Posts

1 minute ago, Thalur said:

I'm seeing some exceptions in the logs when I select certain probe cores in the VAB:


[EXC 21:22:56.467] NullReferenceException: Object reference not set to an instance of an object
	System.Guid.BaseToString (Boolean h, Boolean p, Boolean b)
	System.Guid.ToString ()
	WhitecatIndustries.VesselData.UpdateActiveVesselData (.Vessel vessel)
	WhitecatIndustries.DecayManager.UpdateActiveVesselInformation (.Vessel vessel)
	EventData`1[Vessel].Fire (.Vessel data)
	RemoteTech.Modules.ModuleRTAntenna.AddTransmitter ()
	RemoteTech.Modules.ModuleRTAntenna.SetState (Boolean state)
	RemoteTech.Modules.ModuleRTAntenna.OnStart (StartState state)
	Part.ModulesOnStart ()
	Part+<Start>c__Iterator25.MoveNext ()

This is then followed by an unending stream of "Updating craftname" until I remove that probe core.  Looking at the source, my guess is the vessel in the VAB doesn't have an id yet?

I'm using version 1.5.1 from CKAN as part of a fairly typical RO/RSS/RP-0 install and removing your mod fixes the problem, which is a shame as I rather like it :(.

Hmm interesting, I am using the same version with the same type of install without issue. I will do some testing into this, definitely caused by Orbital Decay, a solution to this would be to temporarily exclude the certain probe core from the module manager file included in the WhitecatIndustries/Orbital Decay folder.

Which probe core(s) in particular are causing the problem?

Share this post


Link to post
Share on other sites
7 minutes ago, Whitecat106 said:

Hmm interesting, I am using the same version with the same type of install without issue. I will do some testing into this, definitely caused by Orbital Decay, a solution to this would be to temporarily exclude the certain probe core from the module manager file included in the WhitecatIndustries/Orbital Decay folder.

Which probe core(s) in particular are causing the problem?

In my career save it is affecting the Explorer 1 probe (which I think is a FASA part) but not affecting the other three cores I have unlocked.  That part is also the only probe core I have in orbit at the moment, if that makes a difference.

In my sandbox save I have 97 probes, so I won't be checking them all, but it seems to be affecting some but not all probes in FASA and RaiderNick's US and Soviet probes packs.  I haven't seen it happen on a stock or Ven's revamp probe yet.

Share this post


Link to post
Share on other sites
5 minutes ago, Thalur said:

In my career save it is affecting the Explorer 1 probe (which I think is a FASA part) but not affecting the other three cores I have unlocked.  That part is also the only probe core I have in orbit at the moment, if that makes a difference.

In my sandbox save I have 97 probes, so I won't be checking them all, but it seems to be affecting some but not all probes in FASA and RaiderNick's US and Soviet probes packs.  I haven't seen it happen on a stock or Ven's revamp probe yet.

Bizarre, maybe because FASA part modules are still outdated by a few updates? I am not sure, I have the Soviet probes packs installed and have not yet encountered this problem but I will certainly look into it. If you experience this with any other parts please let me know which parts these are so I can write some MM patches to fix this. :)

Share this post


Link to post
Share on other sites

Alright so a bit of an update from earlier.. I've not changed anything in my install, but now all of a sudden I'm able to turn on station keeping. However even while on, the orbit seems to still be decaying. I've also checked the persistence file as you asked and found that there were no entries of the module you had mentioned. That being said when I last got off of KSP, I had 0 ships in flight, so I suspect that's why.

EDIT: Oh also, I added this mod to a pre-existing save, that is running over 100 mods.. Which is why I asked if this has any known incompatibilities with other mods the other day. Does that matter at all?

EDIT: Alright so I temporarily removed Orbital Decay to test a launch script I'm working on with kOS and I've noticed something strange, it appears that even though I'm in space, my orbit seems to be decaying. (Without the mod...?) Any idea if your mod when removed leaves anything behind that may cause that? (I don't believe that I have any other mods that would affect that.)

2653b81a59f509c86a8887051c850d63.gif

EDIT: Or maybe I'm just experiencing this bug.. Hadn't noticed until now. http://bugs.kerbalspaceprogram.com/issues/9619

Edited by CoriW

Share this post


Link to post
Share on other sites

I've experienced some exceptions being thrown as well with orbital decay,  I'm using the seti mod which makes you use probes before manned flight. The exceptions occurred while I had a Satelite in orbit    Is there a reason this happening?      Or is it meaningless gibberish 

Share this post


Link to post
Share on other sites

figured I'd highlight this from the 1.1.3 patch notes for ya @Whitecat106 since it seems it could be applicable here:

Greatly reduce Apoapsis/Periapsis changing with no input, with thanks to ferram4 and eggrobin. option is toggleable in Settings->Gameplay and tunable in Physics.cfg.

The variables in question are commented in physics.cfg tho I'm not really able to figure out the exact purpose of them.

Share this post


Link to post
Share on other sites
3 minutes ago, Gaiiden said:

figured I'd highlight this from the 1.1.3 patch notes for ya @Whitecat106 since it seems it could be applicable here:


Greatly reduce Apoapsis/Periapsis changing with no input, with thanks to ferram4 and eggrobin. option is toggleable in Settings->Gameplay and tunable in Physics.cfg.

The variables in question are commented in physics.cfg tho I'm not really able to figure out the exact purpose of them.

Thanks!

I will hopefully add in a check to force this option off when playing with the Orbital Decay mod since this is a pretty big incompatibility, considering the decay rate is wholly inaccurate with imaginary numbers for the physics.cfg... thanks again squad... In my opinion; do it properly or leave it to the modders!

@CoriW I am glad the vab issue has stopped, I have also encountered this but I cannot quite work out what is causing it :( As for the decay bug, it would appear its a feature squad added in with 1.1.0 without noting this in a change log, which to me is incredibly infuriating as I spent a lot of time trying to fix this issue by adapting my own plugin! Yet again.

@NemesisBosseret I will need to see an instance of the error from your ksp output log to know whats going on, please post a small snippet of this showing the exception in this thread :)

 

Still working on NBody perturbations, getting some mixed results, the biggest issue will be drawing conics (there is so little information on the web about this) and managing rendezvous (possibly a make or break with N-Body simulation).

Whitecat106 :)

Share this post


Link to post
Share on other sites
3 minutes ago, Whitecat106 said:

thanks again squad... In my opinion; do it properly or leave it to the modders!

welllll in this case it's not entirely Squad :P especially considering one of the modders who made this change is working on his own n-body mod

Share this post


Link to post
Share on other sites

Hey there, sorry to interrupt what I'm sure will be another dash to get the mod ready for another update, but I'm not sure if I might be experiencing a problem or not, and if not I'd be curious to know if this is an inaccuracy in the mod's calculations or perhaps a conflict somewhere. I'm playing an RSS/RO RP-0 career, and following Historic missions pack to do the real launches, I launched Vanguard-1 (still in orbit today) and Vanguard-2 (also still in orbit), I used replica's of the real launchers and real satellites, and launched them into as close as I could get to the real life orbital parameters, they both displayed negligible decay rates and >1000 years lifespans. However Vanguard-1 lasted about 2 years in orbit, and Vanguard-2 is about to decay (after about 2.5 years in orbit). This is obviously significantly out of line with real life, and my decay rate in the settings was already set to half just in case. Curiously though some other satellites have performed almost exactly to their real life specs (Explorer-6 for example is about to decay out of orbit after about 2 years). I wondered if maybe the mod took into account surface area and mass, but perhaps not drag coefficient? Or would a spherical satellite not have too different of a decay rate to a more blunt satellite? Any help would be greatly appreciated :). Please keep up the good work, love the mod.

Summary: Some satellites not lasting anywhere near as long as they should in real life, others decaying at almost exactly the right time.

Keep up the fantastic work! :)

>Also just noticed that the upper stage SRM for Vanguard-1 is still in orbit, yet the satellite is not, interesting.

Edited by Sir_Fanch
Missed some possibly important info :)

Share this post


Link to post
Share on other sites
5 hours ago, Sir_Fanch said:

Hey there, sorry to interrupt what I'm sure will be another dash to get the mod ready for another update, but I'm not sure if I might be experiencing a problem or not, and if not I'd be curious to know if this is an inaccuracy in the mod's calculations or perhaps a conflict somewhere. I'm playing an RSS/RO RP-0 career, and following Historic missions pack to do the real launches, I launched Vanguard-1 (still in orbit today) and Vanguard-2 (also still in orbit), I used replica's of the real launchers and real satellites, and launched them into as close as I could get to the real life orbital parameters, they both displayed negligible decay rates and >1000 years lifespans. However Vanguard-1 lasted about 2 years in orbit, and Vanguard-2 is about to decay (after about 2.5 years in orbit). This is obviously significantly out of line with real life, and my decay rate in the settings was already set to half just in case. Curiously though some other satellites have performed almost exactly to their real life specs (Explorer-6 for example is about to decay out of orbit after about 2 years). I wondered if maybe the mod took into account surface area and mass, but perhaps not drag coefficient? Or would a spherical satellite not have too different of a decay rate to a more blunt satellite? Any help would be greatly appreciated :). Please keep up the good work, love the mod.

Summary: Some satellites not lasting anywhere near as long as they should in real life, others decaying at almost exactly the right time.

Keep up the fantastic work! :)

>Also just noticed that the upper stage SRM for Vanguard-1 is still in orbit, yet the satellite is not, interesting.

Hello! Yes I can see the issue you're experiencing, I noticed this myself for the Vanguard - 2 (decaying in the equivalent of 1961 for me), however as of now (1966 with a RSS RP-0 playthrough) Vanguard 1 from American Probe pack remains in orbit. I believe the issue stems from the area calculations of a vessel and the inclination of the vessel orbit with Mascons in consideration. 

The problem is that with off rails vessels, the area of the vessel does not really exist, thus stock calculations to manage the area fail to work. Instead I use a formula which creates an average area 'bubble' around the vessel. For proportionately shaped objects like spheres the area is close to the actual value but not quite. In this case the vanguard 1 probe area could possibly include the deploy-able antennas (so the area bubble is now more than double the actual area; thus causing a higher drag). The only solution to this would be to use part meshes to work out the exact (prograde) facing area, something I probably will not touch upon until 1.7.0. The coefficient of drag is another variable which I must look at, at the moment this has been hard coded to the fabled 2.2, however obviously this is variable; if I can calculate a more accurate coefficient I shall endeavor to for the next update! :)

 

I am still working on 1.6.0 which will be the KSP 1.1.3 release version too, so bear with me on this. If anyone can find any issues with the current 1.5.1 version in the new KSP version please let me know since I have not yet downloaded KSP 1.1.3 and this will speed up the next release!

Share this post


Link to post
Share on other sites

Starting using this mod on my new playthrough, loving the mod, thanks for putting in the work to make it. 

Share this post


Link to post
Share on other sites
20 hours ago, Whitecat106 said:

Hello! Yes I can see the issue you're experiencing, I noticed this myself for the Vanguard - 2 (decaying in the equivalent of 1961 for me), however as of now (1966 with a RSS RP-0 playthrough) Vanguard 1 from American Probe pack remains in orbit. I believe the issue stems from the area calculations of a vessel and the inclination of the vessel orbit with Mascons in consideration. 

The problem is that with off rails vessels, the area of the vessel does not really exist, thus stock calculations to manage the area fail to work. Instead I use a formula which creates an average area 'bubble' around the vessel. For proportionately shaped objects like spheres the area is close to the actual value but not quite. In this case the vanguard 1 probe area could possibly include the deploy-able antennas (so the area bubble is now more than double the actual area; thus causing a higher drag). The only solution to this would be to use part meshes to work out the exact (prograde) facing area, something I probably will not touch upon until 1.7.0. The coefficient of drag is another variable which I must look at, at the moment this has been hard coded to the fabled 2.2, however obviously this is variable; if I can calculate a more accurate coefficient I shall endeavor to for the next update! :)

 

I am still working on 1.6.0 which will be the KSP 1.1.3 release version too, so bear with me on this. If anyone can find any issues with the current 1.5.1 version in the new KSP version please let me know since I have not yet downloaded KSP 1.1.3 and this will speed up the next release!

Thanks so much for the prompt reply, and that's great news I had hoped it would be something like that, means all my other things should behave pretty well, which is all we can really ask for. I figured Vanguard-1 probably wasn't the best to use as a comparison, given it's low weight. I don't mind the probes not staying up for as long as they are meant to, they were fairly non-functional aside from maybe for communications, doing it more for the challenge, and the fun of it, and this mod is definitely one that made me giddy when I found it. The passive station keeping is awesome too, thanks again for the reply, and again please continue your great work :D.

Beauty shot for your troubles :P

e24265s.jpg

Share this post


Link to post
Share on other sites
13 hours ago, Sir_Fanch said:

Thanks so much for the prompt reply, and that's great news I had hoped it would be something like that, means all my other things should behave pretty well, which is all we can really ask for. I figured Vanguard-1 probably wasn't the best to use as a comparison, given it's low weight. I don't mind the probes not staying up for as long as they are meant to, they were fairly non-functional aside from maybe for communications, doing it more for the challenge, and the fun of it, and this mod is definitely one that made me giddy when I found it. The passive station keeping is awesome too, thanks again for the reply, and again please continue your great work :D.

Beauty shot for your troubles :P

 

No problem! Wow that's a pretty gorgeous shot! Out of curiosity how did you manage to get RVE working with RSS? My install still has the standard EVE install and I just cant figure out how to make RVE work properly! :( I have added both points made about area calculations and drag coefficients to issues #71 and #72 respectively in the Github :)

 

Work on the 1.6.0 version is coming along, having a magnitude of issues with the NBody simulation, starting to think I should change to an Astrophysics degree after all this! Basically everything works pretty well, maybe a little aggressively at the moment... probably some orbit.GetPosAtUT() accidentally somewhere rather than GetRelativePosAtUT(). The biggest issue is managing the system during timewarp, especially with RSS.

Basically the NBody simulator works by:

1. Find the vessel location at a certain time (t) and the location of all influencing bodies nearby.

2. Calculate the resultant acceleration from each force  at time (t)

3. Update the orbit based on the change in velocity as a vector.

 

Now this works perfectly fine in regular 1x game time. However in timewarp this is a different matter all together since in an N-Body scenario a position point in the future can really only be determined by the result of forces acting on a satellite across the entire duration, of course this can be simplified but is still processor intensive.  My current system to manage this works as follows:

1. Determine the UT at which timewarp began. Determine time since this began or since the last update to the system.

2. Define a time interval to sample the vessel across the time since timewarp began. (Since the Orbital Decay mod does everything based on steps of 1 second (for simplicity) this means a time interval at RSS full timewarp could be more than 100000 seconds in the future!)

3. Find the velocity vector from the acceleration vector imposed by n number of bodies in the system.

4. Calculate a new orbit prediction from State Vectors of the velocity and position at the current time.

5. Save this orbit to a list and update the time of last update.

6. Update the actual orbit of the vessel to this value when timewarp has ceased.

 

The main problem is with point 4. KSP has a function that does just this, called .UpdateFromStateVectors(pos, vel, body, UT). However this automatically updates the actual orbit (thus updating before timewarp has ceased preventing 5. .and 6. from correctly working. What I am working on now is an extension to the orbitdriver.orbit method that will return a new orbit based on the state vectors but not actually set the orbit into 'reality'. Which is a real pain!!!

The conics management has been put on hold until I can get the actual orbit predictions working properly, at which point I will delve into generating orbit lines for 'predicted paths', a rendezvous management system (Disable nbody movement if within 500Km of a vessel maybe), and possibly varying frames of reference - yay pretty pictures!

In the meantime I would be grateful if anyone could help out at the Github page, looking over some code offering suggestions, pull requests are all welcome!

Whitecat106 :)

 

Share this post


Link to post
Share on other sites

@Whitecat106 Really nice mod!

As per requested by a message in game, I'm submitting the Lat/Long and body because of a MasCon issue: 0°31'16'' N, 82°51'15''E, on a GEO orbit.

In a sidenote, to install RVE, just follow these instructions: https://github.com/Pingopete/RVE-KSP-1.0.4/blob/Linux64/Readme.txt

Edit: Also, there is some further problem with RN's US probes and this mod. My Vanguard-1 gets very buggy, not showing delta-v stats and other issues after this mod was installed. Given I'm past this stage in my career, it probably won't be an issue now, but it is weird anyway.

Edited by leudaimon

Share this post


Link to post
Share on other sites
8 hours ago, Whitecat106 said:

No problem! Wow that's a pretty gorgeous shot! Out of curiosity how did you manage to get RVE working with RSS? My install still has the standard EVE install and I just cant figure out how to make RVE work properly! :( I have added both points made about area calculations and drag coefficients to issues #71 and #72 respectively in the Github :)

I can't recall the exact steps it was (it was several complicated rockets ago :P), but if you check out the recent RVE posts there have been people posting the guide like crazy to combat all the people asking how to get it working :P. IIRC it involved the linux version of RVE and maybe older versions of EVE and scatterer, not quite 100% on that, but something was linux :P. The last page or two of the RVE forum should have a repost for you, were I little more familiar with this site I'd link it for you, but I can't quite figure that out :P. RVE was a big reason I decided to try RSS in the first place haha, gotta get that working.

 

Edit: Holy crap I didn't actually realise you made the historic missions pack too lol, something else to thank you for :P, the depth of that pack is ridiculous haha, well done sir. Also thanks for the compliment on my shot, first screenshot I've shown anyone haha.

Edited by Sir_Fanch

Share this post


Link to post
Share on other sites

I found another issue/bug with orbital decay. It doesn't work well with quickloading. I had a vessel in orbit around the moon (low, but stable orbit - 40x100km), quickloaded and the vessel appeared inside the moon, exploding instantly. I deleted Orbital decay and the quickload worked as expected.

Share this post


Link to post
Share on other sites
1 hour ago, leudaimon said:

I found another issue/bug with orbital decay. It doesn't work well with quickloading. I had a vessel in orbit around the moon (low, but stable orbit - 40x100km), quickloaded and the vessel appeared inside the moon, exploding instantly. I deleted Orbital decay and the quickload worked as expected.

Thanks for that! It would appear that this is an issue with 1.5.1, I accidentally forgot to update a small line of code, this is fixed for 1.6.0 but I would recommend downloading the 1.5.0 version from the SpaceDock to prevent this happening again until the next release,this may mean longer loading times for Module Manager but has the same features of the 1.5.1!

Sorry for the trouble here! :)

Cheers for the RVE instructions too by the way and the Lat/Longitude, I have noted this and this will be useful in my debugging of this issue!

Edited by Whitecat106

Share this post


Link to post
Share on other sites

@Whitecat106 Good to know it's a minor bug already solved! I'll install it back then. I installed it in a RP-0 career already in progress and it was great to see the storm of debris de-orbiting :) 

About the Vanguard-1 problem, I hope it solves itself in 1.1.3... Yours is not the only mod conflicting with it, had the same issue with Connected Living Space, that shouldn't affect it at all.

RVE is working great... still some small glitches, but the game visuals are mesmerizing with it anyway.

Share this post


Link to post
Share on other sites
On 6/24/2016 at 0:31 PM, Whitecat106 said:

Thanks for that! It would appear that this is an issue with 1.5.1, I accidentally forgot to update a small line of code, this is fixed for 1.6.0 but I would recommend downloading the 1.5.0 version from the SpaceDock to prevent this happening again until the next release,this may mean longer loading times for Module Manager but has the same features of the 1.5.1!

Sorry for the trouble here! :)

Cheers for the RVE instructions too by the way and the Lat/Longitude, I have noted this and this will be useful in my debugging of this issue!

OOo ok I had a feeling.  It only happened once but on quickload a vessel got nuked at 50k meters on Eve haha.  Thanks for the info I can handle the load times (thaaaaaaaaaaaank u new SSHD) :D

Share this post


Link to post
Share on other sites

FYI I got a pop-up about a mascon issue at 11°47'45" S, 174°7'20" W (Earth) using KSP 1.1.2 and orbital decay 1.5.1 (and all the other RO/RSS mods).

Share this post


Link to post
Share on other sites

Getting an endless spam of

MissingMethodException: Method not found: 'TimeWarp.SetRate'.
  at WhitecatIndustries.DecayManager.RealisticDecaySimulator (.Vessel vessel) [0x00000] in <filename unknown>:0
  at WhitecatIndustries.DecayManager.FixedUpdate () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

Seems to have to do with the new Time Warping in 1.1.3.  But that's a given until the update just in case anyone is curious why things may have gone wonky for anyone else.

Share this post


Link to post
Share on other sites
On 25/06/2016 at 3:13 AM, leudaimon said:

About the Vanguard-1 problem

Are you using Mechjeb for your deltaV readouts? I had a similar problem with my mechjeb suddenly deactivating and deltaV's getting messed up with some of the RN probes. I solved it by deactivating the mechjeb modules on the probe (in the editor via right click, not in the cfg), this worked for me. Sorry if this doesn't help you, I'm not particularly skilled in the area, just thought if there was a small chance I should post :P. As a backup re-rooting to a part that isn't the vanguard (or any other probe with the problem) also solved it for me. Hope this helps! :).

 

I have a list of MassCon errors in a notepad somewhere, but they're in 1.1.2 and RSS, are these still helpful to you Whitecat? If so I'll post them (there's a few). Keep up the great work mate :)

Share this post


Link to post
Share on other sites

@Sir_Fanch Thank you for the suggestion. I think I tried to do that, but on one side, changing root also messes with the delta-v depending on the part selected (my impression was that delta-v was counted correctly only for lower stages), and on the other side, I think there is some deeper problem than delta-v readings, because the center of lift is also messed up, and stays in the probe regardless of vessel aerodynamics. I'm hoping that this issue will be solved on 1.1.3...

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.