Jump to content

[old thread] Trajectories : atmospheric predictions


Recommended Posts

I should try MechJeb, heard a lot about it, but never installed it yet. I thought it didn't work with FAR though, but maybe I'm wrong ?

By the way, I've added some screenshots to the original post. Sorry for the delay.

Link to post
Share on other sites
Well, it's about time!

ATM drag and trajectory prediction was long overdue.

Does this plot off a trajectory called in by a maneuver node, or just trajectory actual?

Just the actual trajectory right now. Maneuver nodes are on my task list for later.

Link to post
Share on other sites

I m quite interested by how you made it work with FAR. MJ predict the landing with the stock drag model but I never found out how to do it properly with FAR.

Well done !

Edit : one thing. You link the FAR dll, so it won't load if FAR is not here. You should have 2 versions, or have fun with reflection/delegate. PM if you need any example for KSP.

Edited by sarbian
Link to post
Share on other sites
I m quite interested by how you made it work with FAR. MJ predict the landing with the stock drag model but I never found out how to do it properly with FAR.

Well done !

Edit : one thing. You link the FAR dll, so it won't load if FAR is not here. You should have 2 versions, or have fun with reflection/delegate. PM if you need any example for KSP.

That's weird, it works on my computer. If I remove the FAR folder from GameData, trying to access FAR functions just throw an exception, which I catch and assume FAR is not installed in that case. Anyway, for better compatibility with any FAR version, I'll probably need to dynamically find the assembly and use reflection to call the methods, as you suggest. I have to look at the details as I never did this kind of thing before.

The way I make it work with FAR is quite simple : I call the main FAR methods on each part to compute the forces. I just trick FAR to give me the situation I want by sending a velocity rotated to the current vessel orientation. That is, if I want to know the drag/lift forces for the vessel going forward, I send a velocity aligned to the forward vector, even if the resulting velocity is not oriented in the direction I actually want, it just needs to be correct relatively to the vessel. Maybe I'm not clear, it's harder to explain than it actually is...

And then I cache all forces in a big array to avoid recomputing the same thing over and over for each prediction step. Otherwise we'd run into serious performance issues. The cache is updated whenever a big difference is found in the model (this happens when a part is decoupled, rotated, etc.), or when clicking the corresponding button in the map view.

Link to post
Share on other sites

I'm in flight in an aircraft right now with this installed, and I do have some data to feed you.

It appears that every once in a while, it will report 'too many iterations' and stop trajectory simulation. About the moment it does this, the simulation freezes up multiple times for five to ten seconds. At first I thought I was getting a permenant lockup similar to something else, but it freed itself up after thirty seconds of scaring me. Viewing the logs in flight, it seems to kick out a FAR based warning for 'NAN' values on multiple parts.

Anyway, looking at the interface in the map menu, it needs some work. First, it needs to be linked to one of the button popup methods so we can hide, it and second, the panels need to be freed up so I can move them around. Right now they appear to be fixed in the top left corner where you spawn them.

Also, the descent profile values need axis labeling.

Might also be prudent that when you turn off trajectory display, it turns off the sampling and computing as well. There's no point in wasting CPU cycles for a process you're not even using.

Link to post
Share on other sites

Query - since this tool works with FAR, does it also work with NEAR? I've used FAR in the past (and I'm an aerospace engineer by education) but I never liked fiddling with all of FAR's GUI elements; NEAR is thus perfect for me - as if ferram read my mind when he created it. So I'm using NEAR in my current build and loving it. I really hope this new mod works with NEAR the same way it does with FAR.

Link to post
Share on other sites

Thank you for starting this! This is a great idea, and I look forward to seeing how it develops.

Just thought I'd let you know about an odd bug I found: When this mod is installed, boosters don't consume any fuel - they run indefinitely. After deleting the mod file, they work as normal again.

Link to post
Share on other sites
Any reason why the red trajectory line doesn't show up? Only the white one for now.

You're not the first one to report this bug. I can't reproduce it yet, can you look at the FAQ I just added on the first post ? I'd like details to help reproduce the issue(s) on my computer if you have some time (mods, craft, log)

Link to post
Share on other sites
Thank you for starting this! This is a great idea, and I look forward to seeing how it develops.

Just thought I'd let you know about an odd bug I found: When this mod is installed, boosters don't consume any fuel - they run indefinitely. After deleting the mod file, they work as normal again.

That's really weird :-S I'll check that ASAP, I mostly test with spaceplanes so haven't checked that yet. Can you double check infinite fuel is not enabled ? (alt+F12)

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