Jump to content

[1.11.+] Pitch Perfect 0.8


Booots

Recommended Posts

With apologies to the great movies starring Anna Kendricks.

Ever get frustrated that your propeller aircraft don't seem to gain speed? Annoyed that mapping blade deploy angle to throttle can result in less thrust with more throttle? Wish you could just use the throttle to control the force of your propeller without finicking around?

Well now you can! This mod will handle all of the details while you just fly.

How to use:

  1. Add blades to any rotor. Make sure that they are aligned in the disc plane in their undeployed state and that increasing the deployment angle makes them take a bigger 'bite' of the air.
  2. Set them deployed.
  3. On the rotor hub, select which mode you want:
    • Thrust: Keeps the blade at its maximum thrust angle. Throttle the motor's RPM or torque to control your thrust.
    • Throttle: Makes the blade produce thrust proportional to the throttle setting. Set your motor to the desired RPM and a torque setting that will enable that. This is the default and probably easiest to fly with.
    • Efficiency: Keeps the blade at its most efficient (Thrust/Torque) angle. Throttle the motor's torque to control your thrust. This mode is likely the least useful unless you're trying to build a maximum range craft and even then...
  4. Fly.

For you extra 'Kerbal' types, the math is there to try to optimize weird, non-radial or conic propellers but I don't guarantee it will be able to optimize anything. The steps above are well tested but I can't predict everything you'll try. If something doesn't work, please let me know and send me the craft file.

Also, a caveat on my promises of optimization: this optimizes the thrust of the propeller blade, not thrust-drag of the propeller blade. At high forward speeds, it might be a few fractions of a degree away from absolute perfection. I'm working on that.

Reverse thrust is also roughly implemented, but isn't perfect yet. I'm still actively developing this but it's good enough to start.

Downloads:
GitHub: https://github.com/DBooots/Pitch-Perfect/releases
SpaceDock: https://spacedock.info/mod/2616/Pitch Perfect

License: MIT

Dependency: Breaking Ground

Edited by Booots
Link to comment
Share on other sites

Congrats!

Well right away I see with one of my record attempt planes (EM-64s motors and loads of R-12 blades) the controller pushes the blade angle way too far.  I always found peak speed with this craft at 62 degrees, but only after a long slow ramp up to that speed with a lot of time spent in the high 50s.  In Thrust mode, the controller jumped right to 66 almost right off the ground.  Then after a few maneuvers it seemed to get stuck at 53 degrees and never went above it again.  Reverting to runway, twice in a row it tried to launch with negative pitch (and tipped over and exploded).  Then back to the initial behavior.  I could not get it to repeat the speed record in that screenshot until disabling and manually using the settings illustrated.

Repeated with my Mk3 heavy speed plane - similar, blades go to a too-high setting too quickly (15° too high)

Try using physical time warp - typically I see the blades stretch out from the hub and start doing a bizarre dance, speed drops drastically, craft loses control.  Cancel physwarp and control is slowly regained - but the controller has become confused and seems to get stuck in a slower/lower pitch valley.  Not sure this is in scope through?  (BTW if you enable "rigid attach" on blades and hub attachments it seems to be able to tolerate 2x physwarp, but not higher - and this seems to come with a speed penalty)

Auto-feather on throttle cut is nice

Stall recovery, and dynamically tracking during maneuvering is very nice

Ah, maybe the reversing on launch has to do with brake being set on launch?  Is there a default braking routine bound to brake key?

What's the best way to help debug with details? Share craft, share logs, screenshots, ??

Edited by fourfa
Link to comment
Share on other sites

59 minutes ago, fourfa said:

Congrats!

Well right away I see with one of my record attempt planes (EM-64s motors and loads of R-12 blades) the controller pushes the blade angle way too far.  I always found peak speed with this craft at 62 degrees, but only after a long slow ramp up to that speed with a lot of time spent in the high 50s.  In Thrust mode, the controller jumped right to 66 almost right off the ground.  Then after a few maneuvers it seemed to get stuck at 53 degrees and never went above it again.  Reverting to runway, twice in a row it tried to launch with negative pitch (and tipped over and exploded).  Then back to the initial behavior.  I could not get it to repeat the speed record in that screenshot until disabling and manually using the settings illustrated.

Repeated with my Mk3 heavy speed plane - similar, blades go to a too-high setting too quickly (15° too high)

Try using physical time warp - typically I see the blades stretch out from the hub and start doing a bizarre dance, speed drops drastically, craft loses control.  Cancel physwarp and control is slowly regained - but the controller has become confused and seems to get stuck in a slower/lower pitch valley.  Not sure this is in scope through?  (BTW if you enable "rigid attach" on blades and hub attachments it seems to be able to tolerate 2x physwarp, but not higher - and this seems to come with a speed penalty)

Auto-feather on throttle cut is nice

Stall recovery, and dynamically tracking during maneuvering is very nice

Ah, maybe the reversing on launch has to do with brake being set on launch?  Is there a default braking routine bound to brake key?

What's the best way to help debug with details? Share craft, share logs, screenshots, ??

Craft files are easiest (at least if they're stock) so I can recreate issues at will. It doesn't use the debug log for much since I don't want to spam at every frame but screenshots could help.

It's interesting that you're seeing blades jump to too high of an angle. Are the blades 'regular' (do they emanate from the rotation axis and form a disc with zero deploy angle being flat in the disc)? The 'stuck' behaviour you describe could be what it does if it can't solve an equation - it will just leave the prop at the angle it was. It could also be that it's decided that that angle is optimal for high speed, which may not be the case for very high speeds since it doesn't account for blade drag in its decisions.

And yes, I seem to have auto-mapped reverse thrust to brakes in the released version. That can be changed in the Actions menu in the SPH. And feathering overrules reverse thrust so you can feather the props until you're ready to takeoff.

The blades stretching is out of scope for this mod. I have been considering another mod that will make propeller blades physics-less at high RPM and collect their thrust at the center but I want this mod to be a simple stock patch so people doing challenges can still use it.

Edited by Booots
Link to comment
Share on other sites

  • 1 month later...

Sounds cool.

Could you also have a toggle to add an auto-counter-torque option for single main blade helicopters?
In a single blade helicopter setup this would adjust the tail stabilizer torque based on the torque applied by the main rotor.
 

Link to comment
Share on other sites

Hi @Booots

I've been having a bit of trouble getting this mod to work.

My main issue is i'm not sure how to align the propellers properly.:confused:

Is there any chance you could make a short guide with pictures,

to show a smooth-brain like myself how to make this thing work right?:)

Link to comment
Share on other sites

7 hours ago, Spaceman.Spiff said:

Hi @Booots

I've been having a bit of trouble getting this mod to work.

My main issue is i'm not sure how to align the propellers properly.:confused:

Is there any chance you could make a short guide with pictures,

to show a smooth-brain like myself how to make this thing work right?:)

I found the blades are usually rotated 90 degs (if you were looking down the blade from one end to the other and the edges are pointing at 12 and 6 o’clock, you need to turn the blade so the edges are at 3 and 9 o’clock. One of the rotation buttons does it with one press but can't remember which. I think it was Q and E in the SPH but easy to test of course.

Link to comment
Share on other sites

  • 9 months later...

Hi,

the mod doesn't seem to "activate" for me and I want to make sure it's not user error on my part; the dll is shown as loaded in the KSP.log but whatever I do i don't see any automatic pitch changes or even the option to change the mod's behaviour ("throttle","thrust","efficiency"). I am testing on a working plane design that fulfills all the reqs mentioned and i have since done a clean install of KSP and the Addons. I have also tried different rotor hubs.  I will now try an entirely new save and then I'm out of ideas. What else can I do?

My Versions: Main game: 1.11.1.3066, Making History: 1.11.1, Breaking ground 1.6.1

Mods:  [x] Science, Kerbal Engineer, Mechjeb 2, Procedural Parts, Science relay

 

Link to comment
Share on other sites

  • 2 months later...

I found this mod functioning well in aircrafts, but not in other "weird crafts" such as a tunnel which contains ten rotors installed with fanblades (so it looks like a turbofan engine).

The mod seems to "not realize this craft needs the mod's smart control of blade pitch", even when I already made sure that all setting are on position. I set the rotor to have "throttle mode", but during flight test the pitch control do nothing, and I have to manually change the blades pitch. 

Then I've tried other mode like "thrust" and "efficiency", they don't work either.

But with the same setting, as long as I build a "regular aircraft", which means a root main part like "MK1 aircraft cockpit" and make a regular aircraft with it, then this mod works perfectly fine, the "throttle mode" helps a lot for both  fanblade and propeller blade.

And then I built a  not regular aircraft with one rotor facing ahead in front of the cockpit, and another rotor facing backward at the tail of the fuselage, during the flight I found that only the front one is being controlled by the smart pitch adjust mod, but the backward rotor's blades simply just stay a fixed pitch number. So I realize that there must be something that would make this mod to "not realize that this rotor and blades need its control".

So I wonder it's there a solution to make sure that this mod can always take over the control of all rotor and blades, not matter it's an aircraft or not? (For example, the hollowed tunnel with then rotors in its center axis, which looks like a turbofan engine.)

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...
On 12/14/2023 at 3:35 AM, Redacted said:

Any chance of an update to this mod?

Maybe eventually. It was something of a proof-of-concept and I ran into an issue getting the blade angle optimization to run at speed. I'm in the middle of a really intensive year of work-sponsored school, so I probably won't work on this until next fall at the earliest.

Link to comment
Share on other sites

On 12/18/2023 at 10:54 AM, Redacted said:

@Boots Thank you for replying mate. All too often authors don't reply.

Anyways, if you were to provide what was needed for 1.12 + "compatibility", that would what is needed. After that Its possible that someone else can make the needed changed to perfect the system.

Cheers!

Redacted

Wait, does it not work in 1.12? I didn't realize some breaking change had happened - can you confirm? That's something I could maybe look into some weekend with free time.

Link to comment
Share on other sites

11 hours ago, Booots said:

Wait, does it not work in 1.12? I didn't realize some breaking change had happened - can you confirm? That's something I could maybe look into some weekend with free time.

It seemed to work fine for me in 1.12.5. Had to allow installing mis-matched version mods in CKAN first, though.

Link to comment
Share on other sites

  • 3 weeks later...

 

 

I've had the mod installed and semi-functional all the way up to the point that I'd expect the blade pitch to change, yet I'm not seeing it after a whole day of experimentation.  While sure its possible that I'm at fault by not understanding how it supposed to work, but somehow I don't think so.

Side Note: Would be helpful to have a video showing its use in detail to compare with, so I can verify on my end.

Edited by Redacted
Link to comment
Share on other sites

  • 4 weeks later...

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