• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Elevator Trim/Elevator Trim Indicator Problem

That could work, but why not just recode the stabs to work based on a direct value derived by the stick position and AOA state?

(Stick Position, percent * 0.1 ) + (standard AOA (8.1)) (gt;L: New AOA, number)
Every 10% increase in pull should increase the held AOA from the standard 8.1 by 1 degree. So pulling back on the stick 10% would allow you to maintain 9.1 AOA. Releasing the stick will cause the jet to go back to holding the default 8.1 AOA

(New AOA, number / Actual AOA, number) (gt; L: AOA Set, number)
Compares the actual AOA with the commanded AOA

(AOA Set, number) < or > 1
If the result of the division is greater than 1, the value is taken, fed into an algorithm that provides an elevator position output, and is then fed directly into the elevator, providing up elevator to correct.
If the result is less than 1, the value of the same equation, but reversed is used (Actual AOA, number/New AOA, number), multiplied by -1 to give it a negative value and fed back into the algorithm to provide an elevator down value.

Ideally, using a PID algorithm would be best in order to make smooth, timely corrections in order to reach and maintain the commanded AOA.

But first, I would need to make sure that I can separate the values given by the stick input and the elevator input.
 
mgh,
Suppose these files were changed to make the elevator ineffective and the trim effectiveness the same as the original elevator effectiveness. Stick movement would then have no direct effect on the flight dynamics, which would instead be controlled by the trim setting.

The FS flight dynamics are based on coefficients and the pitching moment coefficient (CM) is the sum of the steady state CM plus additional CM values due to AOA, horizontal tail incidence, elevator deflection, flap CM and spoiler CM. These are air file parameters. The CM due to trim does not seem to be a direct part of that equation, but it affects steady state CM.

You could put the elevator range to zero in the config file, which would make it ineffective and fly using trim. That is what you would have to do with a real airplane if the elevators were jammed for some reason.

It would be like flying using the keyboard rather than a stick to command a pitch movement.

Roy
 
It would be like flying using the keyboard rather than a stick to command a pitch movement.

I think you misunderstand. My proposal is that stick movement should control trim according to the two basic equations I gave.

Also setting elevator_effectiveness=0 and increasing elevator_trim_effectiveness in the .cfg file should be sufficient changes.
 
I must have misunderstood what you said. Could you elaborate in more detail on what you meant and how it would be implemented, so that I have a better chance of understanding?

In any fly by wire system, out of autopilot mode, stick movements are required. The FCS interprets them and moves the control surfaces according to the unstable nature of the airplane to achieve the pilots intentions through stick inputs.

If you put the elevator effectiveness to zero, how does the pilot take off, fly around and land the thing? Beats me. What control does he use? The only thing left is the trim. You can fly on the trim alone, but it is not natural and quite difficult, since you are using a secondary aerodynamic effect. It is also nothing like normal flight which is what we should simulate. It could work in an emergency situation with jammed elevator, but how do you simulate that?

FYI, the F/A-18 version Jimi is working on is the Legacy A-D. This has a different NATOPS than the latest E/F. Systems implemation is similar though not identical. Similarly, procedures are not identical. Part of this is due to the aerodynamic difference between the A-D and E-F versions.

Nevertheless, your input is of value to me even though I do not understand how it would work.

I look forward to your more detailed comments and explanation. Perhaps then I'll understand what you mean. It would help, in the F/A-18 Elevator Trim context, the subject of this thread, if you could be specific on which of the F/A-18 CAS modes you are talking about. If not specific to F/A-18 CAS trim gauge code we should probably get it transferred to the Flight Dynamics forum.
Roy
 
My basic equations were:

Code:
AoA_Commanded = S1 * Stick_Displacement + T1 * Trim_Displacement;

Trim_Setting = Trim_setting + A1 * (AoA_Commanded – AoA_Actual);

So with the stick "disconnected" from the elevator the aircraft is flown by changes to the trim made in response to Stick_displacement. Combining the equations gives:

Code:
[B]Trim_Setting[/B] = Trim_setting + A1 * (S1 * [B]Stick_Displacement[/B] + T1 * Trim_Displacement– AoA_Actual);

I'll try to write some code later to implement this as a test.
 
I've got round to writing an FSUIPC funstion to provide AoA control. It needs to be called whenever a timer ticks at an appriate rate. it looks a little different from "raw" FSUIPC because I converted the code from the SDK into a class (TFSUIPC) and made a component for Borland C++ Builder.

Code:
void AoA_Control(void)
{
// Read aircraft state
// AoA (radians)
FSUIPC->Read(0x2ED0, 8, &AoA_ActualR);

// Commanded elevator (+-16382)
FSUIPC->Read(0x3328, 2, &Elevator_Commanded);

// Actual elevator (+-16383)
FSUIPC->Read(0x0BB2, 2, &Elevator_Actual);

// Commanded trim (+-16382)
FSUIPC->Read(0x3338, 2, &Elevator_Trim_Commanded);

// Actual trim (+-16383)
FSUIPC->Read(0x0BC0, 2, &Elevator_Trim_Actual);

// Get aircraft state    
FSUIPC->Process();

// Get disconnection state flags
FSUIPC->Read(0x310A , 1, &Disconnect);
FSUIPC->Process();

// Disconnect elevator and trim (Bit 0 and Bit 5)
Disconnect = Disconnect | Bit0;
Disconnect = Disconnect | Bit5;   
FSUIPC->Write(0x310A , 1, &Disconnect);
FSUIPC->Process(); 

// Calculate commanded AoA
// 10 deg = full stick
// Neutral stick =  + deg (0.05 rad)
// Trim arbitrary 
AoA_CommandedR = (Elevator_Commanded + 0.5 * Elevator_Trim_Actual) * 0.00001 + 0.06981317;

// Calculate proportional, integral, and differential errors
P_Error = AoA_CommandedR - AoA_ActualR;
I_Error = I_Error + (P_Error + Last_Error) / 2.0;
D_Error = (P_Error - Last_Error);

// Set elevator
T_Error = (P_Error * P_Const) + (I_Error * I_Const) + (D_Error * D_Const);
Elevator_Error = (short)(Gain * T_Error);   
Elevator = Elevator + Elevator_Error;     

// Set aircraft elevator deflection (+-16383)
FSUIPC->Write(0x0BB2, 2, &Elevator);
FSUIPC->Process();

// Save last error
Last_Error = P_Error;
}
 
It basically disconnects the user stick and trim inputs from FSX but uses them to determine the commanded AOA. It adjust the elevator setting to achieve that AoA.

AoA varies directly with stick deflection at a constant trim setting as shown in the attached figure althoigh the PID constanstsay need further tweaking:
 

Attachments

  • AoA.JPG
    AoA.JPG
    36.1 KB · Views: 536
Last edited:
i'm not sure it will be because it will need tailoring to individual aircraft in terms of the conditions for switching to it and the PID constants.

I intended it to demonstrate the concept, but I'll look into the possibilities.
 
Back
Top