Jump to content

[old thread] Trajectories : atmospheric predictions


Youen

Recommended Posts

You are right. What do the developers think about thist? Youen, Should I change it back to[0.90] for now?

I don't know, you could write something like "1.0.2 (sort of)" ? Or "beta" ? Or we could release it on KerbalStuff with a message appearing at startup if FAR is not install telling that aerodynamic predictions are wrong for 1.0.2 stock aerodynamics ?

- - - Updated - - -

Or write "1.0.2 (FAR only)" as Gryphon suggested

Link to comment
Share on other sites

I have good news. (No, it isn't done yet, hang on!) I've patched in some stuff to access the stock aero drag system. Many thanks to sarbian who answered questions and NathanKell for the AeroGUI mod which I use to check my predictions.

The job isn't done yet. But I can now accurately predict drag and bodylift as a vessel re-enters while in retrograde. My code can't accurately predict wing lift/drag yet in stock aero.

There is a nasty bug if you start with a stable orbit, turn trajectories on, then lower periapsis into the atmosphere ... bad stuff happens. If you start with a periapsis in the atmosphere, it works OK.

The other major problem is that performance is slow - now stock aero needs the caching system FAR uses. That shouldn't be too hard of a job but will take some time.

I'm not willing to upload a test version until I can squash the bug where you start in orbit but then re-enter.

Any brave souls who want to help in development can take a look at my github aero_dev branch for the source.

Link to comment
Share on other sites

Is there any documentation out there on the basics of the new aero model? Things like drag as a function of velocity and atmospheric density, and atm density as a function of altitude?

KSP now uses the classic drag equation. Drag depends on atmospheric density, velocity, area and a drag coefficient. Atmospheric density and velocity are straightforward - area and drag coefficient are calculated by KSP based on the part geometry and the direction of flight relative to the velocity. One of the best forum discussions is here.

Link to comment
Share on other sites

I have good news. (No, it isn't done yet, hang on!) I've patched in some stuff to access the stock aero drag system. Many thanks to sarbian who answered questions and NathanKell for the AeroGUI mod which I use to check my predictions.

The job isn't done yet. But I can now accurately predict drag and bodylift as a vessel re-enters while in retrograde. My code can't accurately predict wing lift/drag yet in stock aero.

There is a nasty bug if you start with a stable orbit, turn trajectories on, then lower periapsis into the atmosphere ... bad stuff happens. If you start with a periapsis in the atmosphere, it works OK.

The other major problem is that performance is slow - now stock aero needs the caching system FAR uses. That shouldn't be too hard of a job but will take some time.

I'm not willing to upload a test version until I can squash the bug where you start in orbit but then re-enter.

Any brave souls who want to help in development can take a look at my github aero_dev branch for the source.

Great news, and good work, looks like you've solved the most difficult issues. Also, even in 0.90, wings were not predicted for stock aero, so if you can do that it's actually a new feature :-)

And I've seen ferram released version 0.15.2 of FAR, which solves the bug that could break wings during prediction. I will take a look at the crash/incorrect predictions for SOI changes with FAR, and with your work, when it's done, that should be it for a feature complete stable version.

Hope future KSP versions won't be as difficult to catch up with ;-)

Edited by Youen
Link to comment
Share on other sites

im going to donate $10 to you when it is compatible with stock aero. not to rush you, just this has drastically changed the way i play the game and i need it. I NEED IT MORE THAN I NEED $10 MAN COME ON

Link to comment
Share on other sites

@atomicfury @Youen

Hey guys, that's good news about the progress of the mod to keep up with stock.

I'd like to bring attention to a small issue that be taken into consideration. The Stock physics can be heavily modified, such as overall drag and lift constants, but also their curve depending on velocity and density.

I hope you're taking into consideration to use the loaded database values and not the default ones, as people such as myself may be using some altered version.

By the way, I'm in works to provide some better aero physics for stock, proper lift/drag curves and so on, link on my signature. Any help is welcome.

Link to comment
Share on other sites

Make sure to check the descent profile on the Trajectories menu. If you're re-entering, for example, with your ship in retrograde, check that box and the mod will recalculate.

I don't even have a mod menu for this. Well, I can't find it anyways if there is one. So I'm not sure how to do this.

EDIT: using the toolbar plugin there is only a right-click to toggle trajectories.

Link to comment
Share on other sites

@Gfurst,

The code reads the PhysicsGlobals curves - so if you modify Physics.cfg or use ModuleManager to change them, those changes *should* come through. Nothing is hardwired. I'll warn you that the drag/lift associated with wings is a bit off. Regular part drag and body lift are pretty much spot on.

Link to comment
Share on other sites

I don't even have a mod menu for this. Well, I can't find it anyways if there is one. So I'm not sure how to do this.

EDIT: using the toolbar plugin there is only a right-click to toggle trajectories.

If things work normally, with blizzy's toolbar installed, you should toggle trajectory display with left click on the toolbar button, and toggle the GUI window with the right click. If you don't have blizzy's toolbar installed, the button should appear in the stock toolbar, and there is only a left click to show/hide the main GUI window. All this is in map view. Let me know if it doesn't work for you (along with Trajectories and KSP versions).

Link to comment
Share on other sites

If things work normally, with blizzy's toolbar installed, you should toggle trajectory display with left click on the toolbar button, and toggle the GUI window with the right click. If you don't have blizzy's toolbar installed, the button should appear in the stock toolbar, and there is only a left click to show/hide the main GUI window. All this is in map view. Let me know if it doesn't work for you (along with Trajectories and KSP versions).

I have the toolbar and many other mods work together with it. But for this one there is no toolbar button even when I customize the toolbar to show the "Right click to toggle trajectories window".

Link to comment
Share on other sites

I've released the new version on KerbalStuff, it should now work with stock aerodynamics (thanks to atomicfury), the bug with other SOI is fixed (it won't predict atmospheric entry until you get in that body SOI, but it won't freeze/lag either), and if you use the latest FAR version (0.15.2) the bug of wings breaking during prediction is fixed as well. So this release should be stable (but as usual, hasn't been much tested before release due to lack of time)

Link to comment
Share on other sites

ModuleManager 2.5.6 is being bundled with the latest release and it is no longer current. MM 2.6.5 is the latest version as of this time of posting. Is it worth repackaging the latest Trajectories release with the latest version of MM?

Link to comment
Share on other sites

I don't even have a mod menu for this. Well, I can't find it anyways if there is one. So I'm not sure how to do this.

EDIT: using the toolbar plugin there is only a right-click to toggle trajectories.

I think Trajectories is only available on the toolbar when you are on map mode. Right click on it, and then you'll have 3 sub-menus (descent profile, target and settings). Click on descent profile and check the appropriate box (or play with the AoAs if you're on a space plane).

Link to comment
Share on other sites

Just tried out a Jool aerobrake with the new Trajectories. Worked like a charm!

In other news, roaring in at ~10 km/s will generate some heat.

I haven't downloaded the fixed version yet (something about MM version?), but I'm also halfway to Jool (for the first time actually). If I display Trajectories in the new version, it won't freeze the game but it will also not calculate aerobraking until I enter the SOI correct? I'm trying to tie an aerobrake with maybe a gravity assist to get straight to Pol.

Link to comment
Share on other sites

So if i understand the limits correctly, this only predicts the right landing spot if FAR doesn't make your craft fly? I tried landing a reusable Booster (2 orange tanks and then some, fairly long) and the prediction was wildly wrong because my "balanced brick with fins" started flying in the atmosphere, i even "bounced off" around 25km and started ascending for a little while

Link to comment
Share on other sites

I've released the new version on KerbalStuff, it should now work with stock aerodynamics (thanks to atomicfury), the bug with other SOI is fixed (it won't predict atmospheric entry until you get in that body SOI, but it won't freeze/lag either), and if you use the latest FAR version (0.15.2) the bug of wings breaking during prediction is fixed as well. So this release should be stable (but as usual, hasn't been much tested before release due to lack of time)

First test with a craft re-entering Kerbin atmosphere worked great. Predicted a landing close to KSC, then when I decoupled it recalculated a little farther out to sea. Seems to be working just fine :)

Thanks to all! Mad Rep for everyone!

Link to comment
Share on other sites

Would it be possible to have a saved list of targets? Because the current KSC target is just off the end of the runway, but if you're landing a pod you probably want to aim for the center of it.

Link to comment
Share on other sites

ModuleManager 2.5.6 is being bundled with the latest release and it is no longer current. MM 2.6.5 is the latest version as of this time of posting. Is it worth repackaging the latest Trajectories release with the latest version of MM?

Good catch, I've updated the packages with the correct version (2.6.3 as it's the one I currently have in my game folder so I know it works with it). For anyone wondering, ModuleManager is a third party plugin needed for Trajectories, and needed by other mods as well, you can put as many versions of the DLL anywhere in your GameData folder, KSP will choose the highest version at startup, so it's just packaged with Trajectories for convenience, but you can also download it separately here

- - - Updated - - -

I haven't downloaded the fixed version yet (something about MM version?), but I'm also halfway to Jool (for the first time actually). If I display Trajectories in the new version, it won't freeze the game but it will also not calculate aerobraking until I enter the SOI correct? I'm trying to tie an aerobrake with maybe a gravity assist to get straight to Pol.

You should have all the time you want to adjust your aerobraking when you are on the edge of Jool SOI (which is really large), at least it works smoothly for me each time I needed it. You can also predict what kind of maneuver you can do with an aerobrake by putting a node at Jool's Pe to simulate a retrograde burn, which is usually the same as an aerobrake, and see if the new orbit can intercept your target. As atomicfury pointed out, because Jool has such a big gravity well, you are likely to go very fast near Jool, so beware the heat... You might want multiple aerobrakes (I think it's reduces the maximum heat, right?), one to be captured in Jool SoI, another to adjust your orbit?

I'm planning to refactor Trajectories code to cleanly separate aerodynamic models (stock and FAR) as well as the cache system, and use the occasion to allow a different cache for each planet at the same time (currently only one cache is available for the current SOI). Until then, it is indeed a limitation of Trajectories that you can only predict atmosphere entry in your current SOI.

- - - Updated - - -

So if i understand the limits correctly, this only predicts the right landing spot if FAR doesn't make your craft fly? I tried landing a reusable Booster (2 orange tanks and then some, fairly long) and the prediction was wildly wrong because my "balanced brick with fins" started flying in the atmosphere, i even "bounced off" around 25km and started ascending for a little while

With FAR, it should predict any situation (the only thing that is not predicted yet is wings with the stock aerodynamic model, but with FAR they are predicted as they should). However you must define your descent profile beforehand (for example you can use the prograde or retrograde preset), and stick to that orientation the whole time. But if the trajectory enters atmosphere, then goes out, then inside again, it should be predicted fine. The more time you spend in atmosphere, the less precise the final landing spot prediction is, because a very small change in orientation will accumulate during the whole trip. But you also get more chances to adjust during your flight (especially if you go back in space, you can make small correction burns).

- - - Updated - - -

Would it be possible to have a saved list of targets? Because the current KSC target is just off the end of the runway, but if you're landing a pod you probably want to aim for the center of it.

When I started the mod, I didn't think it could give such precise results that you might want to move your target a few meters... But I'm wondering, why do you want your pod to land exactly in the middle of the runway ? In the future, I'd like to add the possibility to target a vessel (or a flag), maybe that could be a solution in your case? (though as usual, no ETA).

Link to comment
Share on other sites

Would it be possible to have a saved list of targets? Because the current KSC target is just off the end of the runway, but if you're landing a pod you probably want to aim for the center of it.

When I started the mod, I didn't think it could give such precise results that you might want to move your target a few meters... But I'm wondering, why do you want your pod to land exactly in the middle of the runway ? In the future, I'd like to add the possibility to target a vessel (or a flag), maybe that could be a solution in your case? (though as usual, no ETA).

Give Waypoint Manager a go. It's easy to save a whole mess of places, and combined with Trajectories it's straightforward to land wherever.

Link to comment
Share on other sites

When I started the mod, I didn't think it could give such precise results that you might want to move your target a few meters... But I'm wondering, why do you want your pod to land exactly in the middle of the runway ? In the future, I'd like to add the possibility to target a vessel (or a flag), maybe that could be a solution in your case? (though as usual, no ETA).

I'm usually re-entering from equatorial orbits and can get the lateral error down a few meters, but I tend to undershoot/overshoot a lot more. Aiming for the center of the runway gives me a margin of error in that direction. I like my 100% recovery value.

Link to comment
Share on other sites

I think Trajectories is only available on the toolbar when you are on map mode. Right click on it, and then you'll have 3 sub-menus (descent profile, target and settings). Click on descent profile and check the appropriate box (or play with the AoAs if you're on a space plane).

Well blizzys toolbar dissapears when you go into mapmode. I just installed the latest version of trajectories and I still do not have a menu or a GUI.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...