Jump to content

[1.8.1 - 1.10.1] BoostGuidance v1.0.1


oyster_catcher

Recommended Posts

  • 3 weeks later...
On 12/16/2020 at 10:40 PM, oyster_catcher said:

This may not be new but here's my mod which aims to autonomously guide a Booster to land on a drone ship or the launch site (or anywhere else) using a combination of Boostback, Re-entry Burn, Aerodynamic Descent and Landing Burn, i.e. SpaceX Falcon 9 style. Select your landing point either by clicking on it, typing the latitude+longitude+altitude or selecting a target (e.g. drone ship). Its aimed to be reliable and fairly easy to use. I've also made it work in Realism Overhaul where limited throttle able engines and limited ignitions mean you can't play fast and lose with your engines. With suitable engines and using the right number active you can achieve this is Realism Overhaul which gives a real feeling of satisfaction.

The mod relies on accurately simulating the entire trajectory to landing including burns later in the flight which means guidance should be accurate without the need for any heroic manoeuvres as the impact of say the reentry burn is properly factored in. BoosterGuidance will continuously monitor the target error and aim to reduce it in boostback, re-entry burn, aerodynamic descent and in the landing burn steering either via engines or via grid-fins depending on the phase of flight. You can set the steering gains during the flight to give the grid fins more/less to do, and configure the reentry burn via altitude and target velocity. Some more advanced settings allow you to set safety margins, speed of final descent, at what height to give up steering and more. You can also log the whole flight and plot it to examine in detail what happened and how closely you could copy SpaceX.

Released under GLP v3.

Here's some videos showing it working with a single stage Falcon 9 booster

In Realism Overhaul with a 2-stage Falcon 9 rocket where I make a half-hearted attempt to get the 2nd-stage to orbit.

This mod is very usable and lots of fun now but has a few limitations I'm working on.

- Clicking the target only works  close to the terrain or there are physical structure (some KSP/Unity Raycast limitation I don't understand)

- In Realism Overhaul you may need to manually reduce the gain close to landing to avoid large oscillations

- Landing legs deployment is unreliable

- Guiding more than one booster simultaneously should be possible but is currently unreliable. My goal is a Falcon Heavy two booster landing. That will be awesome!

- It should work on other planets too though the trajectory should be sub-orbital to impact the ground within about 10 minutes as simulation time is limited for CPU reasons

Get the mod via GitHub here: https://github.com/oyster-catcher/BoosterGuidance/releases

or on SpaceDock here: https://spacedock.info/mod/2587/BoosterGuidance

Released under GPL v3

hey man! Your mod is great for stock  KSP. I  have the problem that when I am in RSS/RO my booster ignites when it should in stock, which means that it forgets about my boosters ignition time and then it cant slow down in time. Is there any way to fix this?

 

Link to comment
Share on other sites

  • 2 weeks later...

Would you mind adding a preset feature where a player could set a configuration and save it as a preset, so we don't have to set the aero descent altitude, gear deploy altitude, target landing velocity, amount of engines for the landing burn, permitted target error, etc.? Thanks!

Link to comment
Share on other sites

@oyster_catcher So I thought I'd give this a not-very-serious try in a sandbox game. :P
Probably not game/mod breaking, but I have MADLAD installed, and its logging that Booster Guidance cant load FAR as a dependency (I dont have FAR installed)...

I assume its just the way you have it referenced in the project file? vOv

I know it probably *should* be installed with this... but i have other mods installed that dont play nice with FAR

full log message from MADLAD:

[2021-04-06 09:06:59]: [BoosterGuidance] Checking for FAR - failed(System.IO.FileNotFoundException: 
Could not load file or assembly 
'FerramAerospaceResearch, Version=0.16.0.1, Culture=neutral, PublicKeyToken=null' 
or one of its dependencies.
File name: 'FerramAerospaceResearch, Version=0.16.0.1, Culture=neutral, PublicKeyToken=null'
  at Trajectories.AerodynamicModelFactory.HasFAR () [0x00000] in <d396cdd742264b81900c4c21c28438cc>:0 )

 

Link to comment
Share on other sites

Also, anyone else seeing a HUGE drop in FPS as soon as you hit the "Enable Guidance" button?
I'm assuming no, since I dont see any posts about it...

I get 30-40 FPS, but as soon as I hit that button, my game falls bac to being a slide show, and my FPS literally becomes SPF :rofl

Link to comment
Share on other sites

So I tried this mod again, boostback and re-entry works really fine, but when I get near the ground it'll turn, locking it in prograde instead of retrograde. How will I fix this? I tried locking in retrograde myself but it doesn't seem to work. :(
Help me please so I can get realistic burns and soft landings

Link to comment
Share on other sites

  • 2 weeks later...
On 4/6/2021 at 2:30 PM, Stone Blue said:

@oyster_catcher So I thought I'd give this a not-very-serious try in a sandbox game. :P
Probably not game/mod breaking, but I have MADLAD installed, and its logging that Booster Guidance cant load FAR as a dependency (I dont have FAR installed)...

I assume its just the way you have it referenced in the project file? vOv

I know it probably *should* be installed with this... but i have other mods installed that dont play nice with FAR

full log message from MADLAD:


[2021-04-06 09:06:59]: [BoosterGuidance] Checking for FAR - failed(System.IO.FileNotFoundException: 
Could not load file or assembly 
'FerramAerospaceResearch, Version=0.16.0.1, Culture=neutral, PublicKeyToken=null' 
or one of its dependencies.
File name: 'FerramAerospaceResearch, Version=0.16.0.1, Culture=neutral, PublicKeyToken=null'
  at Trajectories.AerodynamicModelFactory.HasFAR () [0x00000] in <d396cdd742264b81900c4c21c28438cc>:0 )

 

It designed to work with FAR if its present or else use stock physics, and I thought I'd tested this well enough. So the error shouldn't mean that BoosterGuidance failed all together. So you can ignore the error. FAR is not required. Does BG still appear to be working or not?

On 4/10/2021 at 6:04 AM, Kerbal Productions said:

So I tried this mod again, boostback and re-entry works really fine, but when I get near the ground it'll turn, locking it in prograde instead of retrograde. How will I fix this? I tried locking in retrograde myself but it doesn't seem to work. :(
Help me please so I can get realistic burns and soft landings

Thats odd. A video would help, but anyway the thing to work out is, is BG trying to do the right thing but the craft is aerodynamically unstable?  Select Debug in the advanced tab and you will see green line showing what direction BG is trying to steer the craft too. If this isn't achieved them probably BG is trying to do the right thing but the craft is not stable enough to achieve that.

Link to comment
Share on other sites

On 4/19/2021 at 5:44 PM, SirBlob said:

Thank you for this amazing mod, sometimes drone ship landings are off by like 10-100m but otherwise it works like a charm

 

Thanks so much for the kind words and beautiful video. What was that Kerbal thinking? I think 10-100m error is about the best I can achieve right now. The biggest issue is when aero-forces and rocket thrust just about equal each other, one pushing one direction and other pushing the other. At this point you have no control authority, and the mod is quite conservative and applies a big safe zone around this when it will not steer as steering the wrong way is quite a possibility as sometimes the forces aren't predicted accurately enough. It does use the built in physics get these forces but still it doesn't always work out quite right.

On 4/7/2021 at 4:47 PM, Stone Blue said:

Also, anyone else seeing a HUGE drop in FPS as soon as you hit the "Enable Guidance" button?
I'm assuming no, since I dont see any posts about it...

I get 30-40 FPS, but as soon as I hit that button, my game falls bac to being a slide show, and my FPS literally becomes SPF :rofl

I've struggled with this sometimes and have tried to optimise as much as I can but retain accuracy. Usually the drop in FPS should be manageable, sounds like something is going very badly wrong. Switch on Debug in the advanced tab as I think it may show the XXms to do the simulation. it should be 4-60ms and it does this out 10 times/second I think so its quite significant and worse case takes 50% CPU time. Please let me know what that says. The mod does a lot of work and predicts the flight path all the way to the ground. It will be slower the more time it'll take to land, though it takes much bigger steps when far out. It possible your craft would never land for some reason, say if minimum thrust was too high, or too far away,  in which case the simulation would run until it hit a maximum time of 600 secs, which would be quite slow.

Link to comment
Share on other sites

On 4/5/2021 at 7:10 PM, ninthninja05 said:

Would you mind adding a preset feature where a player could set a configuration and save it as a preset, so we don't have to set the aero descent altitude, gear deploy altitude, target landing velocity, amount of engines for the landing burn, permitted target error, etc.? Thanks!

If you can arrange to save the game the BG settings will also be saved with that game as they get saved with the command module that BG is attached too. That doesn't cover all situations but may be it'll help you.

Link to comment
Share on other sites

19 minutes ago, oyster_catcher said:

Thats odd. A video would help, but anyway the thing to work out is, is BG trying to do the right thing but the craft is aerodynamically unstable?  Select Debug in the advanced tab and you will see green line showing what direction BG is trying to steer the craft too. If this isn't achieved them probably BG is trying to do the right thing but the craft is not stable enough to achieve that.

don't worry! i can land boosters now! well, with a difference though, or maybe too much difference...
wNk90JM.png

so boostback, entry, and landing burns are ok, but i just land a tad bit off-target. Here's my settings
Entry burn - default, 1 degree
(what comes after that) - 30 degrees
Entry Burn - 30 degrees
No steer - 1km
Touchdown margin - default
Touchdown speed - 5 m/s

Link to comment
Share on other sites

16 hours ago, Kerbal Productions said:

don't worry! i can land boosters now! well, with a difference though, or maybe too much difference...
wNk90JM.png

so boostback, entry, and landing burns are ok, but i just land a tad bit off-target. Here's my settings
Entry burn - default, 1 degree
(what comes after that) - 30 degrees
Entry Burn - 30 degrees
No steer - 1km
Touchdown margin - default
Touchdown speed - 5 m/s

I'd try setting the no steer altitude to 250m.

Link to comment
Share on other sites

So this is a really brilliantly coded mod. The ability to have a single mod take most craft from a suborbital trajectory back to a site near the launchpad is just, astounding.

I do have a question though @oyster_catcher how will this mod work with Flight Manager for Reusable Staging? I have looked all over the thread and it says nothing and I thought it best to ask you. Will the revert to an earlier point break the landing point or is this a way to land all of a replica Falcon Heavy boosters with only a few clicks of a button?

Link to comment
Share on other sites

This looks great! Could you add a dropdown you can click showing all of the Kerbal Konstructs pads, and then when you click on one it sets that pad to your target coordinates? 

Edited by NPT156
Link to comment
Share on other sites

1 hour ago, Kerbal Productions said:

i think you should make the landing burn steer to 30 degrees

My settings for Boost Guidence already take into account the 30 degree steering angle. This booster has no problems landing on a landing pad at KSC.
However, the droneship is very far out, so the suborbital trajectory of the booster is very flat and the speed of the booster is much higher. Boost Guidence seems to have the most difficulties with this. I'll find a solution for that yet though.

Link to comment
Share on other sites

Made an account just to comment on this. This mod is SO good! Mechjeb2 Landing has sucked so bad, landing me so far away from my target. I played around with this last night and constantly got within 10-20m of target. Tweaked the RCS thrusters on my booster(s) and as I'm coming in to land I just do a bit of manual adjustment with I,J,K,L and boom, hitting dead on target every single time. Is there a feature to make it use RCS more to pinpoint the target on approach?

Thank you much for this! Definitely in my fave mods now :D

Edit: Decided to make a little video for it :) - https://drive.google.com/file/d/1GkfV_wdpvSp3iTElVZTBN3mqrFVKNlfE/view?usp=sharing

Edited by Sonicboomish
Added link to the video
Link to comment
Share on other sites

Hi - if you're still updating the mod, can you consider adding a preferences which are saved to a cfg file. I think you can find an example of code in the GravityTurn mod by linuxgurugamer's code https://github.com/linuxgurugamer/GravityTurn. It would be nice to be able to hit a save after doing a successful sim test using KRASH and then just have those settings load on the 'real flight' 

Link to comment
Share on other sites

  • 3 weeks later...

so been trying this out over mech jeb. Works very nicely on my falcon 9 sized landings once settings dialed in always within 15m err. But my super heavy seems to always end up in an oscillation after re-entry burn which ends up flipping it. got no idea whats causing this. any ideas? 

 

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