Jump to content

High Fidelity Flight Dynamics and Tech/Academic Initial Demonstration


CptSmiley

Recommended Posts

There's some cleanup of the units used in calculations: there was plenty of conversion back and forth in different places, I think those are now all gone. Check if you spot something that seems "off" somehow.

 

Trailing edge flaps now follow landing gear up/down lever so that when gears are set down flaps will be coming down as well. Since flaps are normally used as ailerons it can be weird sometimes how they are.

 

Edit: Also, looks like as a result of clearing the units in calculations, elevators don't have that huge flutter any more in supersonic speeds.

 

Edit 2: another thing for testing: position of lift moves as function of speed, meaning that:

* in sub-sonic speeds lift is in front of center -> tendency to pitch up

* in supersonic speed lift after center (towards tail) -> stable flight

This does not have proper calculation yet, it is just moved frontmost to aftmost position for now. There's plenty more to do in that regard anyway..


Edited by kazereal

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Looks like old code does not consider all combinations of commands to flight surfaces.

It does take some input but does not go to same lengths in using those surfaces as should be.

 

I'm looking into that now to combine inputs.

 

For example, when flaps are commanded down, they still have some roll authority.

At least that is my understanding, but I'll need to look at more information on that and other surfaces to get full use of them into simulation.

 

Edit: and that brings a problem in the 3D model draw arguments: I think the draw argument for flaps needs to be disabled (removed)

so that DCS is not conflicted on what values to use for drawing their position.

Since the way the API works, we need to give some value there but we can't tell "don't use this value for drawing".

 

Edit2: after I've done flight control changes, I need to go back to aerodynamics code and calculate values both sides

that might have different deflection instead of just using same value for both sides..

That old aero-code does not handle those kinds of situations.


Edited by kazereal

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

Another update.

 

I was looking at trailing edge flaperon conditions at how they behave and made some modifications to the code.

 

Please give feedback if you have better source of information (surprisingly hard to find accurate information on this..).

 

Anyway, they way it works now:

* when landing gears are out, flaperon are adjusted to lower position

* position depends on dynamic pressure (or airspeed)

* below 370 kts the angle gradually changes

* below 240 kts they are at full deflection

* on take-off they are full up when at 370 kts

 

The thing that is troubling me, if landing gear is up, but speed is below 370 kts, is it still supposed to give some deflection of the flaps? Comment this if you have better information.

 

When landing gear is up the flaperons behave as normal ailerons so that is not a problem.

Additionally, when flaperons are at full deflection, there's bit more to their movement but that's one thing I'm looking at (they can adjust some then).

 

There's other things after this regarding stabilizers and so on but I wanted to get this out of the way before those.

I assume there's some amount of flaps in transonic speeds but that is still bit too far to think about that..

 

Edit: and please, make sure information source is something useful, there's too much guessing around..


Edited by kazereal

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

Please give feedback if you have better source of information (surprisingly hard to find accurate information on this..).

 

Yes, it is. I used a combination of FLCS diagrams, operators manual descriptions, photos, videos, and some educated guesses to write the trailing edge flap logic.

 

The thing that is troubling me, if landing gear is up, but speed is below 370 kts, is it still supposed to give some deflection of the flaps? Comment this if you have better information.

 

No, the trailing edge flaps only change for 3 reasons.

* Gear down and speed below 370 kts.

* Alt Flaps switch activated and speed below 370 kts.

* Transonic speeds actually make flaps go up (max 2 degrees)

 

Technically, the digital backup mode has different logic, but you can get into that if you ever model it. (I did)

 

You should also probably switch to using dynamic pressure ratio instead of knots, as the FLCS on the real aircraft does. qc_ps = qc_psf / Ps_psf; Where qc_psf is the dynamic pressure in psf, and Ps_psf is the atmospheric pressure in psf.

 

Note: With STANDBY GAINS activated, Ps_psf is set to sea level pressure (2116.217 psf). Also, with STANDBY GAINS activated, qc_psf is set to 200 psf when gear handle is down, ALT FLAPS is activated, or the refueling door is open, but it is 1400 psf any other time with STANDBY GAINS activated.

 

When landing gear is up the flaperons behave as normal ailerons so that is not a problem.

Additionally, when flaperons are at full deflection, there's bit more to their movement but that's one thing I'm looking at (they can adjust some then).

 

So, the FLCS diagrams actually give some insight into the mixing between trailing edge flap deflection and aileron deflection to give a final flaperon deflection command to the actuators. The targeted trailing edge command is identical for both flaps, and is scheduled with an integrator. That integrated output for each flap is sent to mixing with aileron roll commands that are different for each side (one is plus, the other minus). However, after the initial adding/subtracting of each aileron command, one side may be more than +21.5 or less than -21.5 degrees, but only the overshoot of the limits in the positive regime (+21.5) is then sent back and subtracted from the opposite side (this is called a breakout), so that the difference between the two flaperons is closer to the actual aileron command. Since this is a discrete simulation, that subtraction only shows in the next simulation frame, so the outputs still need to be limited from -21.5 to +21.5. The outputs of the limited values are then sent through the integrated servoactuator dynamics filter and then the mechanical bias (-1.5 deg) is added to each side. Finally, the final limits are applied for each flaperon (+20, -23).

 

What this actually looks like when the flaps are down (gear down, speed at 240 kts) and a full deflection roll is initiated, is that one side's flaperon will not change and will stay fully down, while the other will go all the way back to neutral so that the difference between the flaperons is 21.5 degrees. A normal aileron command will have a difference of 43.0 degrees (21.5 deg up on one side and 21.5 deg down on the other side).

 

The way I modeled this in the aerodynamics was by taking the average of the position of both flaperons to determine how much extra lift is added by the trailing edge flaps. Also, I took the difference between each flaperon and divided by two to use for the roll moment calculation.


Edited by SilentEagle
Link to comment
Share on other sites

Please give feedback if you have better source of information (surprisingly hard to find accurate information on this..).

 

This is what I got on the flaperons subsystem, I don't know if the information is useful at all.

Integrated Servo Actuator (ISA) movement positions the flaperons in response to commands from the DFLCC. Roll rate signals from the roll rate gyro and the side stick controller are input to the DFLCC additional inputs from the landing gear handle, AIR REFUEL switch, ALT FLAPS switch, and ROLL TRIM control are also used to generate flaperon position commands.

 

Aircraft roll rate is controlled by inputs from the roll rate gyro assembly. This assembly is mounted to allow the internal gyro spin motors to sense the rate of movement about their axes. These motors generate four discrete and redundant roll rate signals to the DFLCC through their respective pickoff transformers.

 

Another aspect of roll control involves gun firing compensation which is automatically performed by the DFLCC. During gun firing, the gun produces a yawing moment due to the off-center location of the gun. Within the DFLCC, the gun fire signal is processed along with airspeed, altitude, and air pressure signals. This data is then combined with yaw and roll rate signals to produce the required compensating deflection commands. These commands are output by the DFLCC to the flaperon and rudder ISA’s to initiate the control surface corrections.

 

Positioning the landing gear handle to DN with the ALT FLAPS switch in NORM provides a signal to the DFLCC. This signal commands the flaperons down a maximum of 20 degrees (depending on airspeed) to increase lift.

 

If the flaperons do no lower automatically (with landing gear handle in DN position), a backup method is used. Positioning the ALT FLAPS switch to EXTEND sends a signal to the DFLCC lowering the flaperons.

 

The DFLCC electronically commands differential operation of the flaperons for roll assists while the flaperons are down. Roll trim is commanded by moving the TRIM switch on the side stick controller left or right. The ROLL TRIM thumbwheel on the MANUAL TRIM pane may also be used. The ROLL TRIM thumbwheel is oriented in the panel to correspond to right wing down or left wing down trim. A semicircular position indicator adjacent to the thumbwheel provides a visual trim reference. When the TRIM switch is used for trimming, the thumbwheel is motor driven in the direction of commanded trim.

 

Roll commands are summed electronically in the DFLCC. These commands are applied to the coils of servo valves SV1, SV2, and SV3 in each ISA. Under normal conditions, servo valves SV1 and SV2 are active and SV3 is in standby. Active servos will port hydraulic fluid to position the main control valve. This control valve then ports hydraulic power to drive the ram in the desired direction. A mechanical feedback nulls the main control valve and servo valves when the ram has reached the commanded position. Each servo valve coil contains two separate input windings.

 

Normal operation of the servos is possible with either the primary or secondary winding. Outputs from the DFLCC servoamplifiers are monitored by other DFLCC circuitry. A malfunction will switch operation to the standby amplifier and the secondary winding for that servo valve. A hydromechanical monitoring and voting system within the ISA monitors the outputs of the three servo valves. Any detected failure in SV1 or SV2 will vote out the malfunctioning servo valve and transfer control to SV3. Any failure will light the MASTER CAUTION light and the FLCS FAULT caution light. A fault message will also appear on the pilot fault list display. Failure detection/correction is latched in after a malfunction. Reset is possible by placing the FLCS RESET switch to RESET and releasing. Reset cannot be accomplished if the malfunction still exists. If a servo malfunction is indicated (flaperon PFL), a single FLCS reset will reset the appropriate ISA. A recurring fail (same pressure switch) will duplicate the PFL.

 

The ISA’s will continue to operate with one hydraulic system failed. If pressure for both hydraulic systems drops below 720 psi, a spring will position the ISA’s to neutral.

To whom it may concern,

I am an idiot, unfortunately for the world, I have a internet connection and a fondness for beer....apologies for that.

Thank you for you patience.

 

 

Many people don't want the truth, they want constant reassurance that whatever misconception/fallacies they believe in are true..

Link to comment
Share on other sites

Yes, it is. I used a combination of FLCS diagrams, operators manual descriptions, photos, videos, and some educated guesses to write the trailing edge flap logic.

 

No, the trailing edge flaps only change for 3 reasons.

* Gear down and speed below 370 kts.

* Alt Flaps switch activated and speed below 370 kts.

* Transonic speeds actually make flaps go up (max 2 degrees)

 

Technically, the digital backup mode has different logic, but you can get into that if you ever model it. (I did)

 

Thanks for information :)

That is what I though as well but it is better to check assumptions.

 

There's still plenty of ways to go so we'll see how far I'll progress..

 

You should also probably switch to using dynamic pressure ratio instead of knots, as the FLCS on the real aircraft does. qc_ps = qc_psf / Ps_psf; Where qc_psf is the dynamic pressure in psf, and Ps_psf is the atmospheric pressure in psf.

 

Yep, that is in plans but like many things might have to wait a bit, there's always so much to do..

 

 

Yes, I've been looking at that pretty much lately :)

Thanks for that :)

 

I do like to work off from information than direct source code. Maybe slower progress but anyway..

I like the coding, learning and figuring out stuff, so without that there would be no point at all in doing this..

 

What this actually looks like when the flaps are down (gear down, speed at 240 kts) and a full deflection roll is initiated, is that one side's flaperon will not change and will stay fully down, while the other will go all the way back to neutral so that the difference between the flaperons is 21.5 degrees. A normal aileron command will have a difference of 43.0 degrees (21.5 deg up on one side and 21.5 deg down on the other side).

 

Yep, I've found that information too but haven't gotten to implementing it yet.

 

I've been looking at mixing flaperon and elevon (stabilizer) control for roll command: since the stabilizer can work both symmetrically (elevator) and differentially (aileron) mixing that for both flaperons and elevons can be tricky.

 

It is essential to have but means changes to both flight control and aerodynamics: old aero code assumes always symmetrical deflection for flaperons and elevators and does not calculate separate lift and drag for different sides of aircraft.


Edited by kazereal

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

I've been looking at mixing flaperon and elevon (stabilizer) control for roll command: since the stabilizer can work both symmetrically (elevator) and differentially (aileron) mixing that for both flaperons and elevons can be tricky.

 

It is essential to have but means changes to both flight control and aerodynamics: old aero code assumes always symmetrical deflection for flaperons and elevators and does not calculate separate lift and drag for different sides of aircraft.

 

Yes, the NASA aerodynamic data does not account for differential elevon in the rolling moments, so I also don't have that affect in my model. However, I do visually animate the elevon mixing and do use their differential positions for affecting pitching moments and drag.

Link to comment
Share on other sites

Yes, the NASA aerodynamic data does not account for differential elevon in the rolling moments, so I also don't have that affect in my model. However, I do visually animate the elevon mixing and do use their differential positions for affecting pitching moments and drag.

 

Either way, that is something that needs to be handled at some point to make it fly correctly..

 

I'm not at that point yet but I'm reading more about it when I have a chance.

Before then I'm making other changes in splitting fcs command logic from actuator code and aero code so the mixer (blending) of commands can be easier to add.

 

Likely changes to aero code need changes into equations of motion too since they are no longer symmetric effects around center of gravity. I'll need to look into that too at some point.

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

Either way, that is something that needs to be handled at some point to make it fly correctly..

 

Actually, I found that the aircraft rolling speeds are dead on with the real aircraft without adding differential elevon affects. There is no PID in the roll axis, so you won't get any instability by adding additional rolling power, but I don't think it is really necessary. I'm thinking the NASA data just accounted for the affect in the aileron rolling moments, but did so with the current flaperon to elevon ratio at the subsonic speed they chose. Anyway, the thing already has such a quick roll rate acceleration and deceleration that it almost always looks horrible over multiplayer. When viewing the aircraft from external view (not over multiplayer), it looks very crisp like the real thing.

 

Before then I'm making other changes in splitting fcs command logic from actuator code and aero code so the mixer (blending) of commands can be easier to add.

 

Yes, this would be a good step in organization.

Link to comment
Share on other sites

Actually, I found that the aircraft rolling speeds are dead on with the real aircraft without adding differential elevon affects. There is no PID in the roll axis, so you won't get any instability by adding additional rolling power, but I don't think it is really necessary. I'm thinking the NASA data just accounted for the affect in the aileron rolling moments, but did so with the current flaperon to elevon ratio at the subsonic speed they chose. Anyway, the thing already has such a quick roll rate acceleration and deceleration that it almost always looks horrible over multiplayer. When viewing the aircraft from external view (not over multiplayer), it looks very crisp like the real thing.

 

I don't know about roll rate, that might be accounted for in the data already like you said.

 

I'm thinking mainly of things like near-stall or other rare cases where it might make a difference. I don't know how much of effect that might be in things like recovering from some situations. But we'll see..

 

There's part of the changes uploaded now, of course I'll need to revisit the changes and recheck everything afterwards but it is in progress.

 

Anyway, good to know that it compares well so there's way to check effects :)

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

Some changes to leading edge flaps schedule (and more to do).

 

Should handle cases where they are locked in place (not in automatic mode), weight on wheels, transonic speed adjustment (needs improvement still).

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

Simple oxygen pressure added so pilot stays alive in high altitudes.

 

No big changes now, looking at documents and planning for next set of changes.

 

I was testing some flight conditions, cases where it is near stall and close to losing control can be managed by use of airbrakes and flaps (with the alternate flaps switch). The documents mention this to be helpful so I thought of checking that.

 

Interesting to see what it will be like when planned changes to code are complete..

 

Edit: fixed a bug in LEF handling on takeoff, should give smooth transition from takeoff position now. 3D model animation does not handle -2(deg) upwards angle for both sides so that is a known thing..

 

Also found a forum post saying that TEF come down below some speed even if wheels are up.

Need to find another source to verify that and more details about speed and if there's other conditions (is it really automatic or just manual with the alternate flaps switch?).


Edited by kazereal

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

Center of lift is now calculated as function of mach number.

 

Unlike traditional aircraft designs, F-16 has "relaxed static stability" which mean center of lift is a bit forward from aircraft reference center. Also the lift position moves backward as speed increases. This gives better agility but has downsides as more complexity in flight control system.

 

Reference point is 0.35 percent from mean chord length and actual position can change from 0.30 to 0.39 (0.35 at mach 1).

 

The change in lift position must be counteracted by trimming or by flight control system automatically (working on changes there still..)

 

Try it out. Other changes still in progress as mentioned before..

 

Edit: old code had a constant difference there which was for low speeds (max. front) and did not change it for higher speeds.


Edited by kazereal
  • Like 1

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

For what is worth, thank you for all your hard work

To whom it may concern,

I am an idiot, unfortunately for the world, I have a internet connection and a fondness for beer....apologies for that.

Thank you for you patience.

 

 

Many people don't want the truth, they want constant reassurance that whatever misconception/fallacies they believe in are true..

Link to comment
Share on other sites

Guys this is really amazing...but I have to ask...what's it good for? Since nobody will confirm or deny a Falcon in the works and from what I've gotten from others, the only falcon currently in the wild is a private build for the virtual thunderbirds...what's the purpose of this.

 

Sierra

[sIGPIC][/sIGPIC]

Primary Computer

ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5.

 

-={TAC}=-DCS Server

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.

Link to comment
Share on other sites

Guys this is really amazing...but I have to ask...what's it good for? Since nobody will confirm or deny a Falcon in the works and from what I've gotten from others, the only falcon currently in the wild is a private build for the virtual thunderbirds...what's the purpose of this.

 

As said before a couple of times:

1) demonstration of how to implement external flight model in DCS

2) to learn how to make simulations

 

So the "demonstrator" part has been there quite some time, personally I'm interested in the second part now.

 

If it is useful for someone else too, all the better.

 

There is also: 3) share ideas and information, but that is not too large part.

 

One thing is that this is based on public information and so there is no problem in sharing the source code or the implementation.

 

Edit: as such, this is more oriented towards people who are interested in making a simulation module of some kind

 

Edit2: if you do enjoy flying some other mod more, go ahead. Approach might be different, results may vary and so on.

I am mostly trying to keep with A model information, that is actually easier to find and less guess-work about certain things.

If the more modern/advanced models are more interesting then some other mod might be more suitable.


Edited by kazereal

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

Time for a short update..

 

I'm looking at implementing aircraft skin friction effect to the flight model.

That would need either friction coefficient (Cf) at various parts in the surface, or Reynolds number (Re): Cf = Re*M*a (where M is mach number and a alpha).

 

There seems to be way to calculate Reynolds number for various parts of surface according to airfoil shape, but that seems quite complicated and I'm not sure I can do that. For one reason, I don't have that detailed measurements of the aircraft body and airfoil shape.

 

So good sources of reliable public information is welcome as usual.

 

Edit: never mind, I think I've figure out (most of) the equations needed..

 

I'll be adding some code to test soon.


Edited by kazereal

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

It is in the usual place for download:

https://github.com/ipr/F-16Demo/

 

Download that as-is to DCS mods/aircraft/ and should have it working with no extra steps needed.

 

Note that there are bugs and things that are in progress of being fixed, can't say timetable..

 

You can get older version(s) from the version control too if there's a reason to.


Edited by kazereal

"I would have written a shorter post, but I did not have the time."

Link to comment
Share on other sites

I will be going back to the original source file and re-doing the external model to Current Standards (Lighting, Animation and Materials wise) later this year / beginning of next,

 

I have other projects that take priority.

 

Current model is from 2013, so Things have changed since then.


Edited by SkateZilla

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...