Jump to content

[old thread] Trajectories : atmospheric predictions


Youen

Recommended Posts

Is there a 0.90 version and if so why is it not in the OP first post?

There is a .90 version. It's not in the OP first post post because

- The original author is not interested in maintaining it anymore. I "took over", but I can't modify the first post

- It works with stock, but there are problems with FAR. I want to fix that before releasing the new version

See this post for a download link to the prerelease:

http://forum.kerbalspaceprogram.com/threads/93685-0-24-0-25-Trajectories-v1-0-0-%282014-11-17%29-atmospheric-predictions-FAR-NEAR?p=1620366&viewfull=1#post1620366

Link to comment
Share on other sites

There is a .90 version. It's not in the OP first post post because

- The original author is not interested in maintaining it anymore. I "took over", but I can't modify the first post

- It works with stock, but there are problems with FAR. I want to fix that before releasing the new version

See this post for a download link to the prerelease:

http://forum.kerbalspaceprogram.com/threads/93685-0-24-0-25-Trajectories-v1-0-0-%282014-11-17%29-atmospheric-predictions-FAR-NEAR?p=1620366&viewfull=1#post1620366

if i may say, i think u should open a new post ones u'll release for 0.90... if u want to keep up the original author's work u need to have the right on the first page... otherwise u will answer this question forever...

also just to make sure u know about it, i don't know what this implies, but on ckan there is an incompatible version with 0.90 of Trajectory, i hope u'll check that also ^^

anyway, i'll try the release as soon as it come out, so good luck ;)

Link to comment
Share on other sites

if i may say, i think u should open a new post ones u'll release for 0.90... if u want to keep up the original author's work u need to have the right on the first page... otherwise u will answer this question forever...

Agree.

Also, this mod is more important now than ever, with fine print becoming stock.

Link to comment
Share on other sites

Yes I also agree. If you are taking over the mod you should create a new thread. I would also suggest posting the mod to kerbalstuff. It is far better then curse in that users can follow the mod and will get automatic emails whenever the mod is updated. Trying to search through over 500 posts to see if and when a mod is updated is a burden and when you consider users have more then one mod it only takes a couple where you have to hunt for updates buried in the bowls of a thousand posts before they just give up on that mod.

Link to comment
Share on other sites

There is a .90 version. It's not in the OP first post post because

- The original author is not interested in maintaining it anymore. I "took over", but I can't modify the first post

- It works with stock, but there are problems with FAR. I want to fix that before releasing the new version

See this post for a download link to the prerelease:

http://forum.kerbalspaceprogram.com/threads/93685-0-24-0-25-Trajectories-v1-0-0-%282014-11-17%29-atmospheric-predictions-FAR-NEAR?p=1620366&viewfull=1#post1620366

This is an extremely useful mod, and many people would appreciate it if you would continue.

i would suggest that you create a new thread, and possibly rename it a bit ti keep it separate (unless the license doesn't allow that)

Link to comment
Share on other sites

I'm not playing KSP anymore (for now), but that doesn't mean I'm dead ;-)

I can certainly update the first post (to update info or redirect to another thread), and already gave access to Kerbal Stuff and AVC to Kobymaru. I'll also take a look at how to give access to github. The "only" problem is that the new version is not stable yet (or is it ? I've not read all posts but the bug doesn't always happen)

Just let me know when you want to "officialy" release the 0.90 version.

Edited by Youen
Link to comment
Share on other sites

if i may say, i think u should open a new post ones u'll release for 0.90...

...

anyway, i'll try the release as soon as it come out, so good luck ;)

Also, this mod is more important now than ever, with fine print becoming stock.
Yes I also agree. If you are taking over the mod you should create a new thread.
This is an extremely useful mod, and many people would appreciate it if you would continue.

i would suggest that you create a new thread, and possibly rename it a bit ti keep it separate (unless the license doesn't allow that)

I also suggest you start a new thread,

Thanks for the encouragement guys :) But first the debugging, then the politics.

I can certainly update the first post (to update info or redirect to another thread), and already gave access to Kerbal Stuff and AVC to Kobymaru.
Thanks for that!

I'll also take a look at how to give access to github.
That's not really necessary. I have forked your repo and it can stay that way, no problem at all.

The "only" problem is that the new version is not stable yet (or is it ? I've not read all posts but the bug doesn't always happen)

Just let me know when you want to "officialy" release the 0.90 version.

I will let you (and everyone else) know!

Link to comment
Share on other sites

I've got something that might be it.

In VesselAerodynamicModel, computeFARReferenceDrag() calls computeForces_FAR which is causing all the NaN stuff in the log. You'll see a loop over the vessel parts, matching the NaNs in the log per part.

In the Kobymaru save file vessel, computeFARReferenceDrag() is always returning 0, if you look in isFARInitialized(), it always returns false with the NaN calls. I think somewhere that condition isn't getting caught causing the infinite loop.

If you create a new craft at the launchpad, it successfully returns a positive value for computeFARReferenceDrag() if you turn trajectories on.

So somehow FAR isn't getting initialized in orbit, but does get initialized in atmosphere. Any ideas anyone? I'm going to dig in some more.

Link to comment
Share on other sites

Thanks.

If you create a new craft at the launchpad, it successfully returns a positive value for computeFARReferenceDrag() if you turn trajectories on.

It's not just creating on the launchpad. The first time you fire it up in Debug mode (bypassing the main menu and going directly to the craft with the DebugFastStart plugin), everything is fine. If you go to KSC then back to the vessel via tracking station, then the bug happens.

Maybe this helps: http://i.imgur.com/VmYOVdI.png

Link to comment
Share on other sites

@Kobymaru

Could you tag the most-stable version of your fork on Github as release? With your permission, I'd like to add this to the CKAN, and the CKAN doesn't like pre-releases.

If CKAN doesn't like pre-releases, what's its stance on broken code? ;) Well, OK then. The git tag is v1.1.0.0-pre3 . Go ahead.

From reading this thread, I hope you understand that it can cause Game Lock-ups with far?

Do I have to write some sort of config file for CKAN?

Link to comment
Share on other sites

If CKAN doesn't like pre-releases, what's its stance on broken code? ;) Well, OK then. The git tag is v1.1.0.0-pre3 . Go ahead.

From reading this thread, I hope you understand that it can cause Game Lock-ups with far?

Do I have to write some sort of config file for CKAN?

Actually, I am already tracking the prerelease at https://github.com/hakan42/CKAN-meta-dev/tree/Trajectories-pre .

Until we have support for multiple repositories merged into the client, you can just download the ckan file from the link above, and run in a command prompt

ckan install -c <wherever-you-downloaded-it>\Trajectories-v1.1.0.0-pre3.ckan

Link to comment
Share on other sites

Independent of the actual solution to this problem, you should probably add a counter and emergency abort (printing a big fat warning message) to that while loop. I recall that it has caused lag issues in the past, and it probably will again in the future.

Regarding the issue: I've only taken a short glimpse at the code, but I think the relevant questions are:

- Will any save file that was created with FAR installed from the beginning cause this issue?

- Can the issue be reproduced with the old version and KSP 0.25?

- If not, what change caused things to break?

Great question. I think I may have something! I'm a total noob with C# but my day job involves detangling 1970's FORTRAN stuff, this was good learning opportunity. I might be totally off base here - please let me know.

I confirmed Trajectories 1.0 worked with KSP 0.25 and FAR 0.14.4, so I looked at the FAR source code differences between 0.14.4 and 0.14.5.1 that Trajectories calls. I diff'd FARBasicDragModel.cs between the two versions. Most of the changes couldn't cause any issues, but...

In 0.14.5.1 this got added:

            Cd *= MachMultiplier;


if (HighLogic.LoadedSceneIsFlight)
Cd += FARAeroUtil.SkinFrictionDrag(rho, lengthScale, local_velocity.magnitude, M, FlightGlobals.getExternalTemperature(part.transform.position) + FARAeroUtil.currentBodyTemp); //Skin friction drag
else
Cd += 0.005;

The section in 0.14.4 is:

            Cd += 0.003;       //Skin friction drag


Cd *= MachMultiplier;

That call the FARAeroUtil.SkinFractionDrag seems to be the culprit. I compiled a custom FAR version with the 0.14.4 code and got Trajectories prerelease to work with the example savefile from earlier in the thread. In addition to being a C# noob, I'm new to the forum and don't know how to proceed, so I'll just offer this up.

Link to comment
Share on other sites

Sorry guys, but I give up for the moment: I can't fix the FAR issue soon. I decided to release the Mod with FAR/NEAR support disabled. That's sort of good news for Stock users, I guess!

Stay tuned for FAR support!

Download here: https://github.com/fat-lobyte/KSPTrajectories/releases/download/v1.1.0.0/Trajectories-1.1.0.0.zip

Source code here:https://github.com/fat-lobyte/KSPTrajectories

License here: https://raw.githubusercontent.com/fat-lobyte/KSPTrajectories/master/License.txt

A new release thread and development thread will follow Soonâ„¢.

@hakan: Please things and stuff

Link to comment
Share on other sites

Great question. I think I may have something! I'm a total noob with C# but my day job involves detangling 1970's FORTRAN stuff, this was good learning opportunity.

C# is a good language, most of it should be clear when looking at it. Your detangling knowledge could be very useful!

I confirmed Trajectories 1.0 worked with KSP 0.25 and FAR 0.14.4, so I looked at the FAR source code differences between 0.14.4 and 0.14.5.1 that Trajectories calls. I diff'd FARBasicDragModel.cs between the two versions. Most of the changes couldn't cause any issues, but...

...

That call the FARAeroUtil.SkinFractionDrag seems to be the culprit. I compiled a custom FAR version with the 0.14.4 code and got Trajectories prerelease to work with the example savefile from earlier in the thread. In addition to being a C# noob, I'm new to the forum and don't know how to proceed, so I'll just offer this up.

Wow, that's amazing work! That helps a lot (I think).

There is one call to FARBasicDragModel.RunDragCalculation() at VesselAerodynamicModel.cs, Line 349 that causes FAR errors. Is it possible that under some conditions, one of the parameters (maybe machNumber?) is not properly initalized and the calculation produces nonsense (but didn't with FAR .14.4 because it was not important)?

p.s.:

While it's pretty awesome if we could pin the bug on this one, I think there still needs to be some refactoring done, because the code (and the code paths) look kinda weird and there is an awful lot of zero-vectors passed around and "isFARInitialized() == false" happening.

Link to comment
Share on other sites

The post immediately preceding your is the current mod dev working on maintaining this mod. The post before that one is also him, with the none=FAR supported release in the post. Looks like stock only for now on this one....

Link to comment
Share on other sites

From a quick skim of the last page or two - it sounds like this mod is not currently compatible with FAR in 0.90, but work is underway to get it there? Is that correct, and is there an ETA on a compatible release?

No FAR/NEAR at the moment. Work is underway, but no ETA. Sorry.

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