Jump to content

[1.2] TweakableEverything 1.16-beta - For all your part tweaking needs


toadicus

Recommended Posts

@ Toadicus:

I would like to see a "tweakable" with aerodynamic control surfaces. Though plenty of settings from the stock KSP version, there is one feature with control surfaces I sorely miss: to choose which way they move when used as flaps or spoilers. It seems like KSP has a way to choose which way they should move, but often that goes contrary to what I would and results in asymmetrical forces being applied.

Could you consider the feasibility of the above?

Link to comment
Share on other sites

I'll look in to adding an in-flight tweakable for thrust limiting in EVA. I'll check on the control swapping for command pods, but I'm not sure I'm completely understanding your issue.

Consider the example of the humble ship in the following images. In the first the Mk1 pod is on the front of a rocket. I consider the parachute to be the front and the engine to be the rear. The entry hatch is on the top. If I want to pitch the craft down I press the W key. If I want to Yaw the nose to the right I push the D key and if I want to roll the ship to the right I push the E key. Just like flying planes in the game and quite intuitive. You want to go in a direction, you push the button on that side.

BB09670DCC37D21A907378540F07A6B107DC992B

In the second Image I've detached the final stage to use as a lander. At this point I'm thinking of the parachute as the top, the engine as the bottom and the door as being on the back. If I want to pitch forward for more speed I push W. If I want to roll right to strafe sideways I push the D. Still pretty intuitive. However, if I want to rotate along the vertical axis to yaw right, I push the button on the left. and pushing the button on the right makes me yaw left. It seems backwards. So I end up pushing the wrong button most times and going, "oh yeah, that's backwards when I'm doing this"

25225E820DA34ABF38F9CCF5BEFD6595C71DB998

Now I realize that none of the controls have changed. Only my perception of what I'm using them for and where I put the camera. Pitch stays the same, yaw becomes roll, and roll becomes backwards yaw. Flying from IVA in a craft based on one of the lander cans makes it even more noticable since you have to use yaw more to see your surroundings.

If the capsule were tweakable to reverse the roll axis then flying in lander mode would feel more natural and you could put it back once you get back into orbit and want to to fly like a rocket again.

Link to comment
Share on other sites

@ Toadicus:

I would like to see a "tweakable" with aerodynamic control surfaces. Though plenty of settings from the stock KSP version, there is one feature with control surfaces I sorely miss: to choose which way they move when used as flaps or spoilers. It seems like KSP has a way to choose which way they should move, but often that goes contrary to what I would and results in asymmetrical forces being applied.

Could you consider the feasibility of the above?

Can you elaborate on that a little more? I haven't flown a plane without FAR in a super long time, so I want to be sure that when I go to look at things I'm duplicating the behavior you describe as closely as possible.

Link to comment
Share on other sites

Can you elaborate on that a little more? I haven't flown a plane without FAR in a super long time, so I want to be sure that when I go to look at things I'm duplicating the behavior you describe as closely as possible.

Certainly. But I must say, I always use FAR, too. Though, I don't think FAR changes anything in the way control surfaces move.

Actually, my need to tweak control surfaces is tied to spaceships, rather than planes. The control surfaces behaviour is mostly similar for both, but while right/left simmetry is enough for planes, then is often not the case for spaceships: up/down simmetry is required as well.

To show what I mean, please look at the winged spaceship on the pad. I have set the spoilers to max deflection (75°) to better show. All control surfaces move in the same direction, both on wings and tail. The only exception, the upside-down winglets below the wings. But, both winglets on the "up" side of the wings have turned left (on both the right and left wing). The winglets on the "down" side have turned opposite, instead (that is more in line with what I would).

Qj9xAQn.png

Uaxy83W.png

The issue is (far more with FAR then in stock KSP) that using spoilers that way will generate asymetric forces. So, I want to be able to choose (as KSP can't do so correctly) the direction each control surface will move as a spoiler, and so doing keep aerodynamic forces balanced

Link to comment
Share on other sites

I'm not at home and can't test right now, but from the looks of things BahamutD's shielded port does not use the same set of logic as the stock shielded ports. In fact, he appears to be avoiding it intentionally. I'll try to look in to it this weekend, but it may not be something I can fix.

Had any luck with this toadicus...?

Link to comment
Share on other sites

What he's saying is if you have control surfaces on the front of the craft (I THINK it's if they're ahead of the center of mass), then they move backwards to how you would expect them to.

Link to comment
Share on other sites

Certainly. But I must say, I always use FAR, too. Though, I don't think FAR changes anything in the way control surfaces move.

Actually, my need to tweak control surfaces is tied to spaceships, rather than planes. The control surfaces behaviour is mostly similar for both, but while right/left simmetry is enough for planes, then is often not the case for spaceships: up/down simmetry is required as well.

To show what I mean, please look at the winged spaceship on the pad. I have set the spoilers to max deflection (75°) to better show. All control surfaces move in the same direction, both on wings and tail. The only exception, the upside-down winglets below the wings. But, both winglets on the "up" side of the wings have turned left (on both the right and left wing). The winglets on the "down" side have turned opposite, instead (that is more in line with what I would).

The issue is (far more with FAR then in stock KSP) that using spoilers that way will generate asymetric forces. So, I want to be able to choose (as KSP can't do so correctly) the direction each control surface will move as a spoiler, and so doing keep aerodynamic forces balanced

Correct me if I'm wrong, but just to be clear the behavior you're questioning is these two:

weird_spoiler_emphasis.png

Also, correct this if I'm wrong: you are currently only toggling the "spoiler" control; you are not yawing, rolling, pitching, or flapping.

Consider this:

weird_spoiler_axes.png

I don't think that's a control issue with FAR or something to be tweaked. The issue here is that those winglets are a single-axis control surface (like all/most of the control surfaces in the game), with a rotational axis pointing mostly along the yaw axis, or "up" and slightly "back" relative to the base of the part, as I've indicated. The spoiler control commands surfaces to rotate in around the "pitch" axis, with is nearly orthogonal to the control axis of the part. In KSP, control surfaces will rotate if they think they are capable of affecting the axis being commanded (and are allowed to rotate based on the current action). But, to determine that, they do some trigonometry based on their local transform vector and the commanded rotation vector and the center of inertia of the part, to decide if they can help and if so, which direction they should move to do so. So, because the rotation vector in question is pitch, and because they are both on the same side of the center of inertia relative to the pitch axis ("forward" of it, probably), they both decide to turn the same way. What's strangest to me is that on the other side of the wing, they've chosen opposite directions. This might be a 2nd/4th quadrant ambiguity or something like that.

Finally, I would question whether or not you actually want "spoiler" behavior on those winglets. If looks like you're building a VTO spaceplane and those are your vertical stabilizers: you probably do not want them to actuate when you are trying to spoil your aerodynamics. Those are primarily for yaw stability, and I don't think you will get the behavior you want by commanding them on the spoiler controls.

So, all of this to say: I could make a tweakable that, in theory, would reverse the direction of a part when commanded as a flap or a spoiler. But, that would not work well with your configuration above because the winglet that is "correctly" turning opposite its mate on the "bottom" of the craft would also reverse (thanks to symmetry).

I'm going to cross-post this over to the FAR thread to see if ferram (or someone else who knows more about the aero code than I do) can comment as well.

Had any luck with this toadicus...?

I was sick this weekend, and got no testing or coding done. :( Sorry! It's still on the to-do list.

Edited by toadicus
Link to comment
Share on other sites

@ toadicus: thanks for all that information about how control surfaces work. Interesting, though that just confirms there is something wrong (with the transforms?). Anyway, about your questions:

- in the pictures posted above the only command given was to the spoilers ("brake");

- that ship is just an example to show what I mean, I am not trying to make it fly (it handles very bad, actually). No worry if those winglets would not provide axial control in any coherent way, they were placed just to show what happens while using spoilers. But, they actually reproduce correctly what I observed with other ships, and with those I need some control surfaces to double as spoilers;

- the behaviour of the two winglets on opposite wings both turned left, to me really show the problem. The fact that both choose left because they are both forward of the center of mass "thinking they should act on their pitch axis", shows a gross misconception in the control algorithm. There was no command to act on any axis, so no torque to be generated, therefore those surfaces should not try to act on pitch. Doing do they actually generate torque, and that is exactly what I don't want to have while using spoilers;

- also, the control surfaces aligned with the wings (ailerons) are all deflected to the same side (up). I put 4 of these surfaces, instead of 2, just to show that in KSP there is no method to balance the forces generated by spoilers. If there was any, the ailerons on the same wing would have deflected to opposite sides, to cancel most of the torque. And that is one of the tweaks I want to use, so to make spoilers close to each other to act on opposite sides.

Just in case: all those control surfaces were placed using simmetry. But I would not care, if need be to balance spoilers, to place them one by one, so to choose which one to reverse of a "pair".

Link to comment
Share on other sites

- the behaviour of the two winglets on opposite wings both turned left, to me really show the problem. The fact that both choose left because they are both forward of the center of mass "thinking they should act on their pitch axis", shows a gross misconception in the control algorithm. There was no command to act on any axis, so no torque to be generated, therefore those surfaces should not try to act on pitch. Doing do they actually generate torque, and that is exactly what I don't want to have while using spoilers;

I agree, it looks like there's something wrong in the control logic that is causing the odd rotation on that surface. I'd argue, personally, that toggling surfaces vastly out of alignment with the pitch axis for spoilers is probably a poor choice regardless, which is probably why it's being overlooked, but yes, there's probably a 2nd/4th quadrant trig ambiguity or similar that should be resolved.

That said, fixing the control logic is well outside the scope of this mod. ;)

- also, the control surfaces aligned with the wings (ailerons) are all deflected to the same side (up). I put 4 of these surfaces, instead of 2, just to show that in KSP there is no method to balance the forces generated by spoilers. If there was any, the ailerons on the same wing would have deflected to opposite sides, to cancel most of the torque. And that is one of the tweaks I want to use, so to make spoilers close to each other to act on opposite sides.

Just in case: all those control surfaces were placed using simmetry. But I would not care, if need be to balance spoilers, to place them one by one, so to choose which one to reverse of a "pair".

I'm pretty sure they are all pointing the same way on purpose, and that the desire of spoilers is not merely to increase drag, but to apply a net downward force on the craft to reduce lift (where flaps do the opposite; applying a net upward force on the craft to increase lift). The intent is not to balance torque or increase drag, but specifically to push the whole thing "down".

That said (again), I will look at the a tweakable for inverting inputs to control surfaces. It should be doable. :)

Link to comment
Share on other sites

I'm pretty sure they are all pointing the same way on purpose, and that the desire of spoilers is not merely to increase drag, but to apply a net downward force on the craft to reduce lift (where flaps do the opposite; applying a net upward force on the craft to increase lift). The intent is not to balance torque or increase drag, but specifically to push the whole thing "down".

ferram confirmed this much for me, at least:

@toadicus: What's really happening there is that spoilers are intended to reduce lift, wherever they're placed. Apparently the vertical ones create a very tiny downwards force by deflecting to that side, so they'll deflect to that side. The spoiler assignment algorithm isn't designed for purely-vertical parts.
Link to comment
Share on other sites

ferram confirmed this much for me, at least:

Thanks for getting and propagating this info. Useful, as always.

"Spoilers are intended to reduce lift" is perfectly right, and works correctly with surfaces that can act on the craft pitch axis.

Then, my issue is because KSP assigns the spoilers function to the "brake" button. What it means, "brake" with a plane? That is why I am using "spoilers" as aerobrakes, and my intent is to have them produce high drag, rather than reduce lift (placing aerobrakes on the vertical plane works just as fine, and the vertical winglets have, if any, a very tiny lift component if paired on both up and down sides of a wing, that is intended in my design).

Thinking of that, maybe control surfaces should be given one further action: besides pitch/roll/yaw axis, flaps and spoilers, also aerobrakes? While looking at that tweakable, could that be a feasible and better solution?

Link to comment
Share on other sites

Thanks for getting and propagating this info. Useful, as always.

"Spoilers are intended to reduce lift" is perfectly right, and works correctly with surfaces that can act on the craft pitch axis.

Then, my issue is because KSP assigns the spoilers function to the "brake" button. What it means, "brake" with a plane? That is why I am using "spoilers" as aerobrakes, and my intent is to have them produce high drag, rather than reduce lift (placing aerobrakes on the vertical plane works just as fine, and the vertical winglets have, if any, a very tiny lift component if paired on both up and down sides of a wing, that is intended in my design).

Thinking of that, maybe control surfaces should be given one further action: besides pitch/roll/yaw axis, flaps and spoilers, also aerobrakes? While looking at that tweakable, could that be a feasible and better solution?

At this point, the conversation is moving outside my realm of expertise. I do know that air brakes serve a different purpose from spoilers, increasing drag without significantly altering lift, but a meaningful "right way" to accomplish this with the stock parts seems well outside the scope of this mod and beyond my current knowledge. I can -- probably -- make a tweakable to invert the control response of aerodynamic control surfaces, but IMO that will not function well to correct the behavior you're seeing into the behavior you're trying to produce (it would invert the normal status of the surface when used as a yaw stabilizer, so you'd need to make sure the invert tweak was getting turned on and off with the brake control). But, I can envision a couple of other limited scenarios where it might be useful, so I'll go ahead and put it on my to do list.

That said, if you're genuinely interested in a "right way" to solve air braking using stock parts, I'd take this discussion to the FAR thread or make a new addon suggestion thread and invite ferram4 and the other FAR-thread regulars to comment. They're likely to have a lot more useful insight than I do. :)

Link to comment
Share on other sites

Quick question, has there been any movement in the background about you guys with all these tweakables mods getting together and publishing as one pack to make it a little easier on the masses? (I'm referring to the new Tweakable brakes mostly)

Thanks, and Great mod!

Link to comment
Share on other sites

So, I do believe I found a decoupler bug.

Here's what you do:

Place a decoupler. Tweak it to the highest settings. Launch the craft. Revert to VAB. Copy that decoupler (Alt + Click) and place it. Go to tweak it, and it's now sitting at the middle with the "highest" settings, allowing you to tweak it even higher. Repeat as wanted. You get some funky interactions with things sometimes where it'll reset to proper sometimes or round other times, but I've got it up to over 90,00,000,000 separating power from a decoupler that standard only has 300...

Link to comment
Share on other sites

Quick question, has there been any movement in the background about you guys with all these tweakables mods getting together and publishing as one pack to make it a little easier on the masses? (I'm referring to the new Tweakable brakes mostly)

Thanks, and Great mod!

I haven't had a chance to approach any of the other "Tweakable<Stuff>" authors about collaboration or packaging. I don't have the time to maintain a mod pack right now, but if you (or anyone else) wanted to do so, I'd happily allow TweakableEverything to be included, and help integrate it as necessary.

So, I do believe I found a decoupler bug.

Here's what you do:

Place a decoupler. Tweak it to the highest settings. Launch the craft. Revert to VAB. Copy that decoupler (Alt + Click) and place it. Go to tweak it, and it's now sitting at the middle with the "highest" settings, allowing you to tweak it even higher. Repeat as wanted. You get some funky interactions with things sometimes where it'll reset to proper sometimes or round other times, but I've got it up to over 90,00,000,000 separating power from a decoupler that standard only has 300...

Hah! Yeah... it probably shouldn't do that. I'll see if I can't tackle that in the next week. For now, enjoy launching to the Mun on your decoupler. ;)

Link to comment
Share on other sites

  • 2 weeks later...
Can you make the tweakable gimbal distance go up to 5 degrees?

In my next pass, I'm hoping to make a lot of the basis numbers I use more configurable. Right now the tweakable number ranges are bracketed from 0 to 2×n, where n is Squad's number, which I think is appropriate in terms of balance. That said, I would like to make that "2" a configurable value, so if you want to make a specific part range from 0 to 5×n you'd have the facility to do so with a minor cfg addition.

Link to comment
Share on other sites

In my next pass, I'm hoping to make a lot of the basis numbers I use more configurable. Right now the tweakable number ranges are bracketed from 0 to 2×n, where n is Squad's number, which I think is appropriate in terms of balance. That said, I would like to make that "2" a configurable value, so if you want to make a specific part range from 0 to 5×n you'd have the facility to do so with a minor cfg addition.

Is there (or will there be) a simple way to make the multiplier different for all parts at once? I'd personally like that "2" to be "1" in my game.

Link to comment
Share on other sites

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