Jump to content

[1.8-1.11.x] Trajectories v2.4.0 (2021-02-07) : atmospheric predictions


Recommended Posts

Used for a bit @Devoblue's version of mod for 1.8. Right after some crash got a bunch of those:

[EXC 18:00:16.606] NullReferenceException
	FerramAerospaceResearch.FARAeroComponents.FARVesselAero.SimulateAeroProperties (UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, UnityEngine.Vector3 velocityWorldVector, System.Double altitude) (at <6338ca968c7c4c8a971a01d858e759df>:0)
	FerramAerospaceResearch.FARAPI.CalculateVesselAeroForces (Vessel vessel, UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, UnityEngine.Vector3 velocityWorldVector, System.Double altitude) (at <6338ca968c7c4c8a971a01d858e759df>:0)
	System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
	System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	Trajectories.FARModel.ComputeForces_Model (Vector3d airVelocity, System.Double altitude) (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	Trajectories.VesselAerodynamicModel.ComputeForces (System.Double altitude, Vector3d airVelocity, Vector3d vup, System.Double angleOfAttack) (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	Trajectories.VesselAerodynamicModel.GetForces (CelestialBody body, Vector3d bodySpacePosition, Vector3d airVelocity, System.Double angleOfAttack) (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	Trajectories.Trajectory+<>c__DisplayClass51_0.<AddPatch>b__0 (Vector3d position, Vector3d velocity) (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	Trajectories.Trajectory.RK4Step (Trajectories.Trajectory+SimulationState state, System.Func`3[T1,T2,TResult] accelerationFunc, System.Double dt, Vector3d& accel) (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	Trajectories.Trajectory+<AddPatch>d__51.MoveNext () (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	Trajectories.Trajectory+<ComputeTrajectoryIncrement>d__42.MoveNext () (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	Trajectories.Trajectory.ComputeTrajectory (Vessel vessel, Trajectories.DescentProfile profile) (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	Trajectories.Trajectory.Update () (at <d900c2c6cc8646f093c1ac4037e93254>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

Not sure if it is FAR fault or trajectories' :)

Link to post
Share on other sites

Kobymaru has not been on in almost 6 months, is the mod being considered for someone else stepping in? This is the last mod in my short mod list that is still waiting for a 1.8 update, just wondering. Hoping someone will take over if koby doesnt come back and update it for ckan

Link to post
Share on other sites
On 10/30/2019 at 12:02 PM, bigorangemachine said:

Add this to your Trajectories Mod Directory for KSP 1.8.

Not to be a downer, but the rules say you cannot post a mod without source code[1]. Binary-only releases are a big no-no.

Please fork on GitHub and release there so that everybody can see what, if anything, you changed, or include in your zip.


[1] See section 4 :

 

Link to post
Share on other sites
On 11/24/2019 at 12:15 AM, Morse said:

Not sure if it is FAR fault or trajectories' :)

Based on the first line of the exception, the crash happens inside FAR, however as far as I can tell (I don't use FAR), Trajectories checks all the input parameters before invoking the call to FAR. So at a guess I'd say it's FAR's fault.

Link to post
Share on other sites

So I've recompiled this for 1.8.

I've included the bug-fixes supplied by @Devoblue and @Xyphos, as well as catching (and logging) exceptions when using FAR.

Can be downloaded from GitHub which also has all the changes I made to the source code.

PLEASE NOTE: THIS IS AN UNOFFICIAL RECOMPILE; PLEASE DO NOT RAISE BUG REPORTS TO THE ORIGINAL AUTHORS IF USING THIS BUILD

Bugs can be PM'd to me or raised on the GitHub tracker for this unofficial recompile.


EDIT: Log is full of "CheckEncounter: failed to find any intercepts at all" and exceptions after parachutes are deployed. If any modder knows how to fix this (it's raised in the call to PatchedConics.CalculatePatch(), I'm failing to find any relevant information.)

EDIT2: I've got a hacky fix which prevents calling PatchedConics.CalculatePatch() when timeToPe/timeToAp become infinite. This stops log spam. But it also breaks the ground intersect calculations.

Edited by micha
Link to post
Share on other sites
On 11/28/2019 at 12:52 PM, micha said:

So I've recompiled this for 1.8.

I've included the bug-fixes supplied by @Devoblue and @Xyphos, as well as catching (and logging) exceptions when using FAR.

Can be downloaded from GitHub which also has all the changes I made to the source code.

PLEASE NOTE: THIS IS AN UNOFFICIAL RECOMPILE; PLEASE DO NOT RAISE BUG REPORTS TO THE ORIGINAL AUTHORS IF USING THIS BUILD

Bugs can be PM'd to me or raised on the GitHub tracker for this unofficial recompile.


EDIT: Log is full of "CheckEncounter: failed to find any intercepts at all" and exceptions after parachutes are deployed. If any modder knows how to fix this (it's raised in the call to PatchedConics.CalculatePatch(), I'm failing to find any relevant information.)

EDIT2: I've got a hacky fix which prevents calling PatchedConics.CalculatePatch() when timeToPe/timeToAp become infinite. This stops log spam. But it also breaks the ground intersect calculations.

I don't understand what's happening, but your build also has that disappearing in-flight landing marker. Freshly downloaded game from Steam, nothing is installed except Trajectories and Module Manager. 

Link to post
Share on other sites
17 minutes ago, dok_377 said:

I don't understand what's happening, but your build also has that disappearing in-flight landing marker. Freshly downloaded game from Steam, nothing is installed except Trajectories and Module Manager. 

Does it disappear when you deploy parachutes? If so, yeah, it's an issue I'm trying to investigate.  There's some weird stuff going on with the patched conics just as parachutes are being deployed.  

If you hide the Trajectories window while landing it seems to be ok.

Link to post
Share on other sites
17 minutes ago, micha said:

Does it disappear when you deploy parachutes? If so, yeah, it's an issue I'm trying to investigate.  There's some weird stuff going on with the patched conics just as parachutes are being deployed.  

If you hide the Trajectories window while landing it seems to be ok.

No, it just happens. Without parachutes. Hiding the window doesn't matter. It's the same thing as in one of my previous posts, nothing has changed: 

 

Link to post
Share on other sites

Ah well, that's a helicopter. It doesn't exactly have an orbit... no idea how the calculations handle that, I'd guess it's gonna be pretty chaotic as the "orbit" keeps changing.  Did it work fine in 1.7?
There definitely seem to be more issues inside the patchedconics library in 1.8. Will take some sorting out, and I'm not sure I'm the right person for that. For now I'm just going to try to reduce log spam as much as possible and perhaps fix some of the easier issues until people with the relevant knowledge/skills can figure out what's going on with the calculations.  Or I get some time off work and can figure it out.

Link to post
Share on other sites
33 minutes ago, micha said:

Ah well, that's a helicopter. It doesn't exactly have an orbit... no idea how the calculations handle that, I'd guess it's gonna be pretty chaotic as the "orbit" keeps changing.  Did it work fine in 1.7?
There definitely seem to be more issues inside the patchedconics library in 1.8. Will take some sorting out, and I'm not sure I'm the right person for that. For now I'm just going to try to reduce log spam as much as possible and perhaps fix some of the easier issues until people with the relevant knowledge/skills can figure out what's going on with the calculations.  Or I get some time off work and can figure it out.

It shows just fine in 1.7. I'm using a helicopter just for testing so I don't need to launch an actual rocket every time. It's quicker. Trajectories should show the landing marker in any circumstance, even without an orbit. Well, it did until 1.8 came out. Kerbal Engineer has a landing marker as well and it shows just fine, doesn't disappear. As far as I can guess, Trajectories and KER are using similar code for the landing marker. The difference here, I think, is the rendering method. 

Update: Well, I stand corrected. Just tried it with a helicopter in 1.7 and it disappeared again. So it's not the game that is responsible here. Very interesting. On the other hand, the landing marker from KER is working fine in 1.7 as well. 

Edited by dok_377
Link to post
Share on other sites

I also noticed when I launched an actual rocket with a landable first stage to test it further some time ago, the marker surprisingly didn't disappear all the way down to landing. It was working well in previous versions of the game and I didn't even think about checking it with a helicopter there. That's why I didn't know it disappeared in 1.7 also (and maybe even further back than that). So I guess this is somehow connected and you need to be at least suborbital with high altitude for it to show correctly. Don't know why I completely disregard that information until today. I have no idea when it started to disappear in the first place, but at least I have some understanding of this whole thing now, and the most important thing is - at least it works. 

Edited by dok_377
Link to post
Share on other sites

FYI, I don't mind helping other mods make the necessary changes, but the last time I offered to release an "unofficial update" I got chewed TF out by @linuxgurugamer's fan club claiming that I was disrespecting their lord and savoir.

in general, it's not a good idea to do such, but feel free to compile your own non-distributed version if you can.
also, it's not generally acceptable to upload a binary without matching source code.

Edited by Xyphos
Link to post
Share on other sites
18 minutes ago, Xyphos said:

FYI, I don't mind helping other mods make the necessary changes, but the last time I offered to release an "unofficial update" I got chewed TF out by @linuxgurugamer's fan club claiming that I was disrespecting their lord and savoir.

in general, it's not a good idea to do such, but feel free to compile your own non-distributed version if you can.
also, it's not generally acceptable to upload a binary without matching source code.

Help is always welcome, but sometimes the help can cause problems, such as making binaries available in the main mods channel, especially if no contact was made first.  I don't remember the details, but I think the issue was that you had released binaries in the mod's forum, and either there was a concern, or it had happened (probably not)  that help was requested about the unofficial version.

It has happened in the past that unofficial binaries were released, people downloaded them, and then asked for help from the original author.  This actually happened to me, with EditorExtensions, and the unofficial binaries were seriously broken.  Back then EEX was version-locked because of what it was doing, and the person who made the unofficial fix actually patched the binary without any understanding of what he was doing.  This did cause me some grief until I realized what had happened.  As I recall, I had to stop working on what I was on in order to rush out an update to stop the flow of support requests.

For myself, if someone asks first, I would be willing to consider allowing them to do that.  But doing it without asking first, or even without notification, is problematic.

 

I'll add that since @Kobymaru hasn't been around since July, that a fork would not be amiss.  If done, then that should be in it's own thread with a different or modified name to indicate that it's a fork.

No, I am not planning on adopting this mod

Edited by linuxgurugamer
Link to post
Share on other sites
2 hours ago, dok_377 said:

Do you mind sharing the reason? If that's okay, of course. 

I second that. Not to discredit the efforts of other contributors and mod-maintainers (@micha, I'm looking at you in this case. Thank you! I'd love to see you fix this if you can!), but, @linuxgurugamer has earned a reputation on this community for fast and reliable revivals/maintenance/parenting of would-be-dead mods for a reason.

 

I have seen...works of dubious quality...let's put it like that...of other contributors. I have never seen that in a patch from linux. He ain't perfect; but when mistakes did/do happen, they were/are not from lack of effort or for looking at the mods' source code for 30s and deciding you understand enough to patch it; they are genuine mistakes after substantial effort to do things right.

...And they are quickly fixed.

Link to post
Share on other sites
3 hours ago, dok_377 said:

Do you mind sharing the reason? If that's okay, of course. 

Most of the mod I adopt have something in them which I’m interested in, or strikes my fancy.

While I like and use this mod, I don’t have a desire to dig into it and fix things.

In a generalization, people mod because they want to.  There is no, or very little money involved.  Some like myself have a Patreon account, but the number of hours put into modding far outweigh any financial benefits from contributions.  I do it because for me, it’s also my hobby, and when I estimate the number of hours spent playing, I include the hours I spend working on mods.  Thats not to say that I don't appreciate contributions, and they do help out, but it certainly not a paying job

Link to post
Share on other sites
3 hours ago, linuxgurugamer said:

Most of the mod I adopt have something in them which I’m interested in, or strikes my fancy.

While I like and use this mod, I don’t have a desire to dig into it and fix things.

In a generalization, people mod because they want to.  There is no, or very little money involved.  Some like myself have a Patreon account, but the number of hours put into modding far outweigh any financial benefits from contributions.  I do it because for me, it’s also my hobby, and when I estimate the number of hours spent playing, I include the hours I spend working on mods.  Thats not to say that I don't appreciate contributions, and they do help out, but it certainly not a paying job

Fair enough. It is a loss (of a god maintainer) in my eyes, but I respect all the work you are doing for the whole community with all of the other mods. I cannot for the love of me ask for more from you. 

Link to post
Share on other sites

I don't think a couple of months counts as "abanonment" just yet. Real-life can really throw a spanner in the works, so I think it's too early to make a fork of this mod.  Furthermore there are several other developers active on the mod's GitHub including @PiezPiedPy who mentioned they'd take a look at some of the issues this weekend.

Earliest time for forking IMHO is after the holiday season if there has been no official response by then.  Yes, it's frustrating for players if their favourite mods don't get updated immediately when a new version of KSP is out, but as @linuxgurugamermentioned, modding is a mostly unpaid hobby activity, not a paid job.

Link to post
Share on other sites
18 minutes ago, micha said:

I don't think a couple of months counts as "abanonment" just yet. Real-life can really throw a spanner in the works, so I think it's too early to make a fork of this mod.  Furthermore there are several other developers active on the mod's GitHub including @PiezPiedPy who mentioned they'd take a look at some of the issues this weekend.

Earliest time for forking IMHO is after the holiday season if there has been no official response by then.  Yes, it's frustrating for players if their favourite mods don't get updated immediately when a new version of KSP is out, but as @linuxgurugamermentioned, modding is a mostly unpaid hobby activity, not a paid job.

Well, it's at least 4 months, if not longer.  But if there are active contributors, then more time should be allowed,

Link to post
Share on other sites

Another recompile to reduce logspam when degenerate orbital information (infinite time to Periapsis/Apoapsis) are being passed in to the PatchedConics API. This happens when parachutes are being opened (the FAQ mentions parachutes are not being modelled so might be related).

Also included a bugfix from @whale_2 about disappearing GUI after resuming from Pause (this actually only happens if using ESCAPE key to unpause; using the "Resume" button doesn't cause this issue..)

Can be downloaded from GitHub which also has all the changes I made to the source code.

PLEASE NOTE: THIS IS AN UNOFFICIAL RECOMPILE; PLEASE DO NOT RAISE BUG REPORTS TO THE ORIGINAL AUTHORS IF USING THIS BUILD


PS. While I love this mod, I unfortunately also cannot take this on as an official fork, as I lack the orbital mechanics knowledge and related APIs within KSP to be an effective maintainer.

Link to post
Share on other sites

New release is up!

Version 2.3.0 for all versions of KSP from 1.3.1 to 1.8.1

Download from GitHub or Spacedock

Full Changelog:

Spoiler

v2.3.0 for all versions of KSP from 1.3.1 to 1.8.1

  • 2019-12-03

Changes since the last release

  • Support for KSP 1.8.x
  • In-Flight trajectory not showing bug fixed by Xyphos
  • GUI disappearing bug #164 fixed thanks to whale2 and mwerle

 

Link to post
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...