Jump to content

[Plugin][0.90] (Semi-)Saturatable Reaction Wheels v1.8 (Apr 9)


Crzyrndm

Recommended Posts

Finally it seems to work , but the recovery of Torgue is much too strong. 1/4 would be enough

How can I modify the RW.cfg to achieve this?


@MODULE[ModuleReactionWheel]
{
@name = RWSaturatable
saturationScale = 10
bleedRate
{
key = 0 0.05 0 0
key = 1 0.05 0 0
}

torqueCurve
{
key = 0 1 -1 -1
key = 1 0 -1 -1
}
}

specifically how can I tune it?

Edited by FreeThinker
Link to comment
Share on other sites

All current numbers are fairly arbitrary. Any feedback on what reasonable "middle of the road" values are is much appreciated though ;)

E:

For reference, saturation limit (1000%) and recovery rate (constant 5%) in the release make for 200 seconds to completely recover from full saturation

Edited by Crzyrndm
Link to comment
Share on other sites

How can I modify the RW.cfg to achieve this?


@MODULE[ModuleReactionWheel]
{
@name = RWSaturatable
saturationScale = 10
bleedRate
{
key = 0 0.05 0 0
key = 1 0.05 0 0
}

torqueCurve
{
key = 0 1 -1 -1
key = 1 0 -1 -1
}
}

specifically how can I tune it?

The second number in the bleed rate keys is the % of average torque (for now. I intend to get it based on the axis torque and alignment shortly. Average was a simplification to help get the foundations done) recovered per second (the first number is the % saturation)

this would be 1/4 of the current rate


bleedRate
{
key = 0 0.0125 0 0
key = 1 0.0125 0 0
}

EDIT

And while digging round to find the source of a nullref, I have realised that there is a massive oversight in how available torque is being calculated (it's not reducing enough) because I forgot to keep the torques in balance (because direction). Gigantic *doh* moment right there...

Edited by Crzyrndm
Link to comment
Share on other sites

Nada, had a quick go at it last night when I found it, but I'd already been trying to work out why it was over-saturating for about 2 hours at that point and the solution doesn't strike me as a simple one.

I think I know *how* to solve it in theory (project available torque vectors and requested torque unit vector onto worldspace axes, find ratio of available torque to requested torque unit vector for all axes, scale torque unit vector by the smallest ratio, and then project back onto vessel axes) but the math just didn't want to behave.

Link to comment
Share on other sites

Ok, so v1.3 is up.

The only change is in how available torque is calculated, it keeps the vector direction and scales it properly, which stops it oversaturating and wreaking havoc when I try and add things.

There are a few "odd" things you may notice about this

1) Delay in torque decay

If you aren't perfectly aligned with the reference axis, there will be a period where torque will not decrease.

cw3xXH2.png*excuse my terrible paint drawing*

Blue line is the torque you are requesting of the x axis, vertical red line is the torque that the x axis could provide at it's current saturation. The remainder is the torque available to the other two axes that is currently unutilised (or will be once I get to that)

2) Multi-axis torque decay

If you partially saturate an axis and aren't perfectly aligned with it, the other axes may have to reduce their output to retain the torque direction you wanted depending on your alignment

Link to comment
Share on other sites

Alright gave it a few launches to get a feel of how it compared to previous builds. I would get up to around 50-60km and I would be unable to maintain pitch stability from sheer oversaturation of the direction.

My acent profile was 85* till 15-20km up, 80* till ap of 30km, then 70 till ap of 45km, then 60 till ap of 55, then 45 till apop of 65km, and finally pitch of to 0 40s out burn to orbit. I had 5Kn from my pod and 3kn from an asas 1.25m ring. The payload weight was 5359kg wet and 3259kg dry.

I think recover maybe too slow? I dont really know what to tell you to fix or if it really is need to be. Is that realistic I honestly have no idea just wanted to give feedback. Really enjoying the testing though.

EDIT: I now noticed you had lowed the bleed rate float curve so I am going to try with thee original figures.

Edited by Svm420
Link to comment
Share on other sites

To be fair, that's exactly the kind of impact the change was designed to have (Reaction wheels aren't intended to be used to apply a constant torque in one direction, but for small corrections in orientation).

There are a few ways to keep RW's from saturating early:

  • Disabling torque when in the lower atmosphere. The impact is minor compared to the authority you get from gimballing and control surfaces on most rockets
  • Roll 180 degrees and desaturate for the same action (somewhat, your change in direction will mean it won't eliminate everything)
  • Let gravity do the turning for you (ie. gravity turn rather than forcing it through)
  • For providing a constant torque regardless of flight situation, RCS

Edited by Crzyrndm
Link to comment
Share on other sites

Okay that what I needed to know I am happy to learn proper use. I know FAR was a great learning lesson this can be as well. I will keep using it to get a better feel for it. Thanks!

One other thing in game the bleed rate now reads FloatCurve% is that intended?

Edited by Svm420
Link to comment
Share on other sites

It takes a bit to unlearn the "I can always rely on RW's for torque" and treat them as having a fuel of sorts (albeit one that is massless and slowly recharges over time...). If the recharge rate was too high it would spoil the effect.

One other thing in game the bleed rate now reads FloatCurve% is that intended?

*sigh*

...I fixed that. Then I broke things and had to revert. Now I need to fix it again...

*/sigh*

Link to comment
Share on other sites

  • 2 weeks later...

v1.4

  • Average torque is no longer used to calculate momentum decay rates. RW's with asymetric torque now decay and recover in a much more sensible manner
  • Fixed bleedrate info in the editor. Will display a single number if constant, or the min/max if it changes with saturation
  • Module manager cloned (just fyi, no additional memory usage) in two additional 1.25m reaction wheels, a heavyweight and lightweight variant. The lightweight variant has an improved momentum decay, reduced momentum capacity, and an interesting torque curve. The heavyweight variant has increased torque and momentum capacity, but the momentum decay is reduced and it uses EC at a much higher rate than normal.
  • Logging is now disabled by default with a config to enable.

The extra parts are experimental and I make no pretension of the 1.25m variants being at all balanced. Input and ideas here are much appreciated.

Edited by Crzyrndm
Link to comment
Share on other sites

Awesome been hoping you'd get back to this mod. I have been loving it so far though hopefully more mod makers will pick this up and diversify our RW selection process.

Link to comment
Share on other sites

I have not yet downloaded the latest version but I just wanted to say that the wheels work great. If I put an undersized wheel on a large craft or try to abuse the 'free energy' of reaction wheels there are definite (non game breaking) limits to function.

Thank you.

Downloading latest version now.

Link to comment
Share on other sites

Yes thanks for the work you've done. I love this mod. The new RWs you added are really nice, so far the LWRW is great for probes.

EDIT

I seem to have run into an issue I am is orbit around kerbin and my RW are stuck at 0 no amount of time passing out of warp or in phys warp is restoring them. It seems to have started after some phantom force threw my capsule in a spin that took so effort to finally stop. Now I have 0 torque and 0 regen. I can enable logging if you tell me how otherwise I didn't see anything in the logs to indicate a cause.

EDIT 2

Not sure how but it fixed i put mechjeb to execute a maneuver node and activated rcs after the node was done I checked torque some had come back about 6Kn of 30 and regen kicked in. Maybe a timewarp issue? I had used it a bit while piloting this craft.

Edited by Svm420
Link to comment
Share on other sites

Yes thanks for the work you've done. I love this mod. The new RWs you added are really nice, so far the LWRW is great for probes.

EDIT

I seem to have run into an issue I am is orbit around kerbin and my RW are stuck at 0 no amount of time passing out of warp or in phys warp is restoring them. It seems to have started after some phantom force threw my capsule in a spin that took so effort to finally stop. Now I have 0 torque and 0 regen. I can enable logging if you tell me how otherwise I didn't see anything in the logs to indicate a cause.

EDIT 2

Not sure how but it fixed i put mechjeb to execute a maneuver node and activated rcs after the node was done I checked torque some had come back about 6Kn of 30 and regen kicked in. Maybe a timewarp issue? I had used it a bit while piloting this craft.

I`ve had the same issue. Wheels reading 0 no matter how much time passes and having no control at all. Sometimes spinning the craft gets things going again.

One thing that I would find very handy is some form of constantly displayed readout letting me know the total torque available on my craft.

Link to comment
Share on other sites

I was just thinking a small window that the read outs for the RW on the craft. Bonus if you can toggle torque from there. Also glad to here it is not just me and that it may be an issue that can be fixed.

Link to comment
Share on other sites

Logging is enabled from a config file in the mod directory. Change the "LogDump" value to a 1 before switchng to the vessel.

I have been able to reproduce the issue locally however, so don't worry about it (E2: and fixed)

Edited by Crzyrndm
Link to comment
Share on other sites

v1.5

  • Fixed: Recovery rate depending on available torque, not maximum torque
  • Added a window from which you can view the state of all Reaction wheels in physics range. Parts on the active vessel are highlighted in green. Torque can be toggled on any nearby reaction wheel.

Edited by Crzyrndm
Link to comment
Share on other sites

  • 3 weeks later...

What's left for the scope of the mod to be feature complete? I know you want to have various RWs with different values than just mass and torque though I wondered how much you wanted to do yourself. I really want to recommend this for SETI as it really help balance RWs and that may put more eyes and hands on it to expand the idea. Just some thoughts really love the mods you've made!

- - - Updated - - -

Ps thank you for the update!

Link to comment
Share on other sites

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