So I want to make a plane that has the CoL slightly in front of the CoM to make it maneuverable, and as far as I can tell I need FbFT to do so. However, as of right now my best FT codes can only level the plane, and nobody really flies straight in a dogfight, so how can I build a plane that uses funky trees to keep it stable while being maneuverable?
You don't really need to make airplane unstable to make it maneuverable.
High AoA won't increase maximum GForce (in general situation with dumb AI it will rather decrease it) and won't help you to evade gunfire, it can only help you to point your guns faster (to some extent, and with aerodynamic control only it will rather be dash than continuous increase in turnrate) at the cost of speed (which is life) and glide ratio (which is what wing built for).
So if you need to increase GForce i recommend to increase wing area and then move CoM so that angle of attack during turn will be just a bit below stall (13deg for symmetric wing, 16deg for semi-symmetric, 28deg for flat-bottom).
@Whatamievendoing you can do a fictionnal one
@mlksback Thanks. I guess im going to switch my current project from a f35 styled plane to a j20 styled one
on a school laptop
replying to you at school lmao
@Whatamievendoing Basiclaly,
clamp01
"clamps" a value between 0 and 1, the clamp functions are basically setting up boundaries for the output.For example, the clamp makes sure that you don't get 2 of pitch output, which will overrotate the rotators.
the numbers in the function being the boundaries, the min and max.
Let's take
clamp(Pitch -1,1)
.-1 is the lowest possible value, and 1 the max.
clamp01
does the same thing but you don't put the min and max values at the end of the function, they are already at the front,0
being the min and1
the max.You gotta implement AoA-limiting codes and your freshly-fitted canards, and your elevators, you just can't make a supermaneuvrable plane, without canards, at least in our skillset.
@mlksback thanks
Btw, what does clamp and clamp01 do?
This isnt the smoothest code, but it may do the job.
The plane i written this code for not only uses 3 kinds of "surface" to roll and pitch, but, these three surfaces are also used to limit the AoA.
The surfaces are main elevators, canards, and tvc.
@Whatamievendoing i recommend you experiment with different CoM positions relative to the CoL.
Have you installed canards ? If not, do so.
Your code seems to be made for stabilizing purposes, limiting the pitch angle and not the AngleOfAttack. I am at this moment learning more and tinkering with PIDs so i can't help you with that, but try this code. I am going to give you, a code, but most of the time, FBW codes can't just be slapped on a plane, they gotta be purpose-made.
Your main problem is that you need an angle of attack limiter, not a pitch one.
As your aircraft is aerodynamically unstable, it will pitch up most of the time for no reason, reaching inappropriate AoAs. You need to limit that, not the capacity of your plane to pitch or not. The AoA limiter will, per extension, limit the pitch.
clamp(Pitch, -1, 1) - clamp(AngleOfAttack/32, -1, 1) * clamp01(GS > 3) + clamp(Roll, -1, 1)
@mlksback ((IAS<175) & ! Activate8) ? (clamp(PID(0,-PitchAngle,P,I,D), -0.8, 0.8) + Pitch) : Pitch
The actual controlling code is the stuff between the ? and the :, Values for P and I are 0.25 while D is 0.5. This code is input into the elevators and it keeps the plane horizontal for landing assistance.
what are your best codes ?