Jump to content

[1.4] StageRecovery - Recover Funds+ from Dropped Stages - v1.8.0 (March 11, 2018)


magico13

Recommended Posts

2 hours ago, Capt. Hunt said:

I'm not worried about what the spent stage actually does while it's still in physics range (as long as it doesn't explode) I know that SR just runs the math and doesn't actually land your rocket anyway.  @Starwaster has the right idea, it just needs to check if it can do it.  If you want it to actually do a correct boostback, you can use FMRS.

There's no point in discussing my idea here though, it won't get any traction. Eventually when I can take the time I'll implement it for my own use myself.

Link to comment
Share on other sites

3 hours ago, Capt. Hunt said:

I'm not worried about what the spent stage actually does while it's still in physics range (as long as it doesn't explode) I know that SR just runs the math and doesn't actually land your rocket anyway.  @Starwaster has the right idea, it just needs to check if it can do it.  If you want it to actually do a correct boostback, you can use FMRS.

By the time SR gets a look at it it's way too late for a boostback.  If you want anything sane for boostback you need to trigger it when the stage comes off.  (And note that what I was suggesting was simulating the result, not actually flying the booster back.  The game engine can't even handle flying it back other than with one-at-a-time approach like FMRS uses.)

Link to comment
Share on other sites

15 minutes ago, Loren Pechtel said:

By the time SR gets a look at it it's way too late for a boostback.  

That's the same as saying that it's too late for a reentry burn but SR calculates that and determines if there is a point to continue trying to recover the craft anyway.

That's the same as saying it's too late for a landing burn but SR calculates that and determines if there is a point to continue trying to recover the craft anyway.

And it it meets those criteria THEN it goes on to calculate what the distance from the KSC would have been and calculates what the recovery percent is based on the distance.

Performing one more calculation to see if it would have had enough fuel to close that distance is no more or less difficult than all the other calculations that went into making recovery possible even though the vehicle was already deemed destroyed by KSP when it was (going by your logic) way too late for recovery.

Link to comment
Share on other sites

2 hours ago, Starwaster said:

That's the same as saying that it's too late for a reentry burn but SR calculates that and determines if there is a point to continue trying to recover the craft anyway.

That's the same as saying it's too late for a landing burn but SR calculates that and determines if there is a point to continue trying to recover the craft anyway.

And it it meets those criteria THEN it goes on to calculate what the distance from the KSC would have been and calculates what the recovery percent is based on the distance.

Performing one more calculation to see if it would have had enough fuel to close that distance is no more or less difficult than all the other calculations that went into making recovery possible even though the vehicle was already deemed destroyed by KSP when it was (going by your logic) way too late for recovery.

It's not that simple.

There's only a tiny window where Stage Recovery would get control too low for a landing burn.  I'm sure it simply assumes there was enough space (as in reality there would have been, it just would have started before SR got control), the error would be tiny.

Likewise, a retroburn is no problem.  You won't be too far off if you simply figure it at that point.

Also, the touchdown point is no problem--simply extend the orbit until it hits the ground, that's your touchdown.  (I suspect it does it without regard for terrain, the discrepancy would be tiny.)

Boostback is quite another matter, though.  It needs to be performed as soon as possible after the stage comes off.  Stage Recovery does not know where this happened.  When SR gets control it's generally too late for a meaningful boostback burn.

Link to comment
Share on other sites

  • 2 weeks later...

Before the 1.4.4 update.  My stages would be recovered no problem.  When I did a deceleration burn at right time.  It would deorbit ending up near KSC. Recovered in the 90% range for speed and distance.  Perfect.   

Since the 1.4.4 update the same stage deorbiting burns up.  

Has anyone else experienced this issue?

Link to comment
Share on other sites

  • 3 weeks later...
On 6/15/2018 at 7:03 PM, Loren Pechtel said:

It's not that simple.

There's only a tiny window where Stage Recovery would get control too low for a landing burn.  I'm sure it simply assumes there was enough space (as in reality there would have been, it just would have started before SR got control), the error would be tiny.

Likewise, a retroburn is no problem.  You won't be too far off if you simply figure it at that point.

Also, the touchdown point is no problem--simply extend the orbit until it hits the ground, that's your touchdown.  (I suspect it does it without regard for terrain, the discrepancy would be tiny.)

Boostback is quite another matter, though.  It needs to be performed as soon as possible after the stage comes off.  Stage Recovery does not know where this happened.  When SR gets control it's generally too late for a meaningful boostback burn.

SR relies on some big simplifications for retroburn  and touchdown point. For example, if the stage has control and TWR > 1, StageRecovery simply calculates if you have enough fuel, given mass and Isp, to achieve safe landing velocity, basically checking if a totally unconstrained in terms of time/altitude instantaneous suicide burn at the moment the SR code evaluates the stage would be possible. I think @Starwaster is just saying you could extend simplifications all the way to boostback, even as simple as "boostback costs X in delta v", so you just check for that much after the safe landing deltaV. I know there are more accurate simplifications that could be made but that's a simplification off the top of my head. It ignores characteristics of the suborbital flight path entirely by just choosing some common "median" flight path deltaV. Slightly less simple would be plugging the discarded stage's current velocity into some boostback deltaV requirement function (this is exactly what happens with retroburn, albeit a fairly simple function).

Edited by whitespacekilla
Link to comment
Share on other sites

1 hour ago, whitespacekilla said:

SR relies on some big simplifications for retroburn  and touchdown point. For example, if the stage has control and TWR > 1, StageRecovery simply calculates if you have enough fuel, given mass and Isp, to achieve safe landing velocity, basically checking if a totally unconstrained in terms of time/altitude instantaneous suicide burn at the moment the SR code evaluates the stage would be possible. I think @Starwaster is just saying you could extend simplifications all the way to boostback, even as simple as "boostback costs X in delta v", so you just check for that much after the safe landing deltaV. I know there are more accurate simplifications that could be made but that's a simplification off the top of my head. It ignores characteristics of the suborbital flight path entirely by just choosing some common "median" flight path deltaV. Slightly less simple would be plugging the discarded stage's current velocity into some boostback deltaV requirement function (this is exactly what happens with retroburn, albeit a fairly simple function).

I understand what he's after.  Unfortunately, StageRecovery is lacking one very, very critical piece of information to calculate the boostback--the point at which the burn could have been done.  StageRecovery could backplot the orbit the object is on but it has no way of calculating when the booster came off.  (Note:  I have used StageRecovery on stages discarded on the way down.  Equip your final stage for recovery, carry enough fuel to get down to a safe velocity and then jettison.  Trying to guide your rocket down to a flat spot is quite a pain, trying to land a booster on ground that isn't nearly perfectly flat is even harder.  I've even built rockets deliberately built to land on their side and watched them go for great long slides on nearly flat ground.)

If that datum could be obtained I don't think calculating boostbacks would be hard.

Link to comment
Share on other sites

21 minutes ago, whitespacekilla said:

The attributes of the `Vessel` that store that information would probably be the most convenient since SR uses the vessel instance for most other processing.

And why would the game record the location that a vessel is created at?  What use would it have?

Link to comment
Share on other sites

5 hours ago, Loren Pechtel said:

How do you figure out where it came off?

All information required is stored on the newly created vessel on only two fields. Everything else can be extrapolated. Again you're overthinking this as being harder than it is. There's nothing particularly difficult about it but you do have to do some thinking.

Link to comment
Share on other sites

16 hours ago, Loren Pechtel said:

And why would the game record the location that a vessel is created at?  What use would it have?

This very use we're talking about, right now? Also, showing you "Mission Elapsed Time" in the tracking station/flight view?

I don't understand what grounds are driving you to argue with modders about what fields and properties are available on the objects in the game that we code with.

Link to comment
Share on other sites

  • 2 weeks later...

So I haven't seen anything about it supporting this but since people are talking about boost back for stage recovery is there any possibility we could get this compatible with an offshore "droneship" mod. Even if its a full stationary point off shore that would be pretty cool.

Link to comment
Share on other sites

I have this mod downloaded and it has worked extremely well for spent stages. I have been experimenting with a recoverable lifter series. I was testing a lifter designed for 5t to LKO made from 1.875 m parts with an OKTO2 probe core. Both RCS Build Aid and Stage Recovery said the parachutes on board would be sufficient for a safe landing. In orbit, I detached the payload, staged the parachutes, and did my deorbot burn. At this point, I switched over to the tracking station and waited to get the Stage Recovery notification informing me that my craft had been recovered successfully, or at least that it had been destroyed. From the tracking station, I watched as the rocket slammed into Kerbin and disappeared without a destruction notification from Stage Recovery. Could this be because I was watching the craft from the tracking station? Alternatively, could it be because the object was the main craft and not a stafe dropped from it? I am hoping that this will work for me so I don’t have to follow my lifters down to the ground in order to recover them. Thank you for your help. 

Edit: I’m playing in 1.4.1 by the way. 

Edited by HeliosPh0enix
Link to comment
Share on other sites

  • 3 weeks later...
1 hour ago, Jeb's Pirotecnics Guy said:

Stage recovery seems to work for me in sandbox but not in career mode. Is this suppose to happen and will it be unlocked later in my play through.

No, Stage Recovery should always work.  You might want to provide some more relevant information, such as KSP and SR versions, and a link to your output_log file.  For your future reference when posting help requests/bug reporting, I refer you to this post for information that mod authors would generally like to see:

 

Link to comment
Share on other sites

Hello again everyone, as you may have noticed I've been pretty distant from the KSP community and KSP modding for some time. I am sorry to say that I am going to be stepping back from modding entirely. I love KSP, I love the community, and I love making mods that help others enjoy KSP as well, but I haven't actively played KSP for more than a month or so in a few years and I'd like to play other games and work on other projects. I have a game idea I might pursue that is inspired by KSP and Terraria, so if I do end up making progress on that I will let you all know.

I originally started modding just because I wanted to play with a mod (KCT) that needed some work before it was really playable. That evolved into several related mods and served as a great way to learn programming. I have now been a professional .NET developer for over two years as a result of what I learned while modding and I am eternally grateful to this community for helping me bring my mods to life and pushing me to learn more. When I started I just barely understood how to write C# and now I do it professionally.

I do not have specific successors in place for my mods. If you are interested in taking over development of any of my mods, please send me a PM. I will ping some specific people now who might be interested or might know people who are, but this is open to everyone. @Starwaster, @severedsolo, @NathanKell, @linuxgurugamer

Thank you all for your support over the years, you've been great :D Hopefully I'll see you around :) 

Link to comment
Share on other sites

I've only recently started using StageRecovery, and it's already indispensable in my game. I really hope someone picks it up, but I'm very glad you kept it up to date this far even though you weren't playing much yourself. Good luck with your future endeavours, the game idea sounds fascinating. 

So long, and thanks for all the fish!

Link to comment
Share on other sites

3 hours ago, magico13 said:

Hello again everyone, as you may have noticed I've been pretty distant from the KSP community and KSP modding for some time. I am sorry to say that I am going to be stepping back from modding entirely. I love KSP, I love the community, and I love making mods that help others enjoy KSP as well, but I haven't actively played KSP for more than a month or so in a few years and I'd like to play other games and work on other projects. I have a game idea I might pursue that is inspired by KSP and Terraria, so if I do end up making progress on that I will let you all know.

I originally started modding just because I wanted to play with a mod (KCT) that needed some work before it was really playable. That evolved into several related mods and served as a great way to learn programming. I have now been a professional .NET developer for over two years as a result of what I learned while modding and I am eternally grateful to this community for helping me bring my mods to life and pushing me to learn more. When I started I just barely understood how to write C# and now I do it professionally.

On one hand, sorry to hear that this extremely useful mod will lose its principle developer.  On another, great for you in making the decision to move on and pursue what interests you most.  It's nice to see your hobby become your profession.  There's so much more passion in that approach.

Your skills will be missed.  Thanks for what you have contributed to the KSP community and best of luck in your future endeavours.

Link to comment
Share on other sites

  • 2 weeks later...

Hello Everyone,

I have an announcement, but firstly let me thank Magico13 for all his work, it's a great addon.

I have made an enhancement to StageRecovery before Magico13 announced stepping back from modding. I was hoping he'd consider merging my changes but that is unlikely to happen now. So I'm forced to release my enhancement on my own as "StageRecovery RGU".

I have added a new part called Recovery Guidance Unit (RGU) and a new resource called RecoveryValue. When StageRecovery RGU attempts to recover a vessel it now looks for RGU and if there is non-zero Recovery Value entered, it automatically succeeds in recovery and uses the provided value rather than calculating it as usual. The RecoveryValue is supposed to be truthfully entered by the player upon trialing the vessel manually a few times and it is assumed the player is confident that the recovery can be repeated with similar results.

Check out my video to see it in action:

 

StageRecovery RGU can be downloaded here: https://github.com/PaletzTheWise/StageRecoveryRGU/releases

My fork currently includes the fix Magico has provided for https://github.com/magico13/StageRecovery/issues/47 , so if anybody sees anything weird happening with vessels on Kerbin, please tell me.

 

On 6/10/2018 at 8:55 AM, Capt. Hunt said:

I've been doing a lot of Falcon 9 style launches lately, and that raised an interesting question, would it be possible to check if a rocket has enough DeltaV to fly back to the KSC?  I noticed that my recovered stages are coming down about 300 km away from the launch site and only expending enough delta-V for the suicide burn, when I could be getting better recovery percentage if they were capable of flying back like the real Falcon 9.  I know I could take manual control with FMRS, but that takes extra time.

 

On 7/25/2018 at 10:45 PM, Rabbit032 said:

So I haven't seen anything about it supporting this but since people are talking about boost back for stage recovery is there any possibility we could get this compatible with an offshore "droneship" mod. Even if its a full stationary point off shore that would be pretty cool.

If you guys can trial the recovery then you could probably use Recovery Guidance Unit.

 

On 7/31/2018 at 11:28 AM, HeliosPh0enix said:

I have this mod downloaded and it has worked extremely well for spent stages. I have been experimenting with a recoverable lifter series. I was testing a lifter designed for 5t to LKO made from 1.875 m parts with an OKTO2 probe core. Both RCS Build Aid and Stage Recovery said the parachutes on board would be sufficient for a safe landing. In orbit, I detached the payload, staged the parachutes, and did my deorbot burn. At this point, I switched over to the tracking station and waited to get the Stage Recovery notification informing me that my craft had been recovered successfully, or at least that it had been destroyed. From the tracking station, I watched as the rocket slammed into Kerbin and disappeared without a destruction notification from Stage Recovery. Could this be because I was watching the craft from the tracking station? Alternatively, could it be because the object was the main craft and not a stafe dropped from it? I am hoping that this will work for me so I don’t have to follow my lifters down to the ground in order to recover them. Thank you for your help. 

Edit: I’m playing in 1.4.1 by the way. 

This could be also caused by timewarp. If you use timewarp, try lowering factor before impact or try the build with fix provided by Magico himself, see https://github.com/magico13/StageRecovery/issues/47

Link to comment
Share on other sites

Would this mod work for "auto recovery" of a space plane? I want to launch rockets to orbit using a space plane, but I'm really not interested in flying each space plane back to the pad. Is there a way to just "magically" recover the space plane after it has launched it's payload?

Link to comment
Share on other sites

19 hours ago, g00bd0g said:

Would this mod work for "auto recovery" of a space plane? I want to launch rockets to orbit using a space plane, but I'm really not interested in flying each space plane back to the pad. Is there a way to just "magically" recover the space plane after it has launched it's payload?

The standard StageRecovery could work with couple concessions:

  1. Have enough TWR/fuel and parachutes to convince the addon it is enough to land safely.
  2. Recovery efficiency goes down with distance from KSC. Which is weird for space plane, since it should land back on KSC airstrip and only spend small amount of fuel doing so.

My enhancement above can mitigate both as long as you use a proven space plane for each launch.

Link to comment
Share on other sites

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