HHS81 / c182s

Cessna C182S (1996 model) for FlightGear
GNU General Public License v2.0
26 stars 9 forks source link

Issue 517 ysop2 #591

Open hbeni opened 5 months ago

hbeni commented 5 months ago

Consolidates Ysops recent PRs/separate commits for better discussion and integration testing:

Possibly fix #517 May be also helping with #520?


Open ToDos:

hbeni commented 5 months ago

:heavy_check_mark: Tailwind issue is fixed by this!

Currently test flying, but generic handling is good in my view. I do extensive testing against the performance charts right now. Firs results (still from my belly) indicating that climb numbers are closer to the POH.


POH 5-19 Max performance climb (Again, using Joshs generic autopilot for wings level and speed control; and with "complex engine procedures" turned OFF)

ALT IAS FPM expected (POH) difference
500 81.1 990 925 +65 / +7%
2000 78.95 786 835 -49 / -6%
4000 78.50 735 750 -15 / -2%
6000 77.02 625 660 -35 / -6%
8000 74.96 486 565 -79 / -16%
10000 73.98 417 470 -53 / -13%
12000 73.27 318 375 -57 / -18%
14000 72.01 215 285 -70 / -33%

The traveled distance and needed time was matching the POH 5-19 quite good! To reach 14000ft I needed 31 minutes (expected 26, but the biggest difference occurred in the last 4000ft or so); and travelled 38.9 Nm (38 expected, so spot on, but before that I had some minor variation of a mile or so).

At 16000ft i was able to get a climb rate of 176 by getting somewhat leaner mixture and with a faster speed of 74 knots; so the FDM is capable of climbing there.

The service ceiling where I reached +100fpm was at about 17000ft and I was able to creep up to about 17700 with 70 knots, where further climbing was not possible anymore (service ceiling should be at 18100ft, where +100fpm should be still available to fly 30° bank courves; thats about 6% difference). engine was pretty cold there, so I had the idea to close the cowl flaps - and promptly I had some 50ft again, but only a short period of time; could not climb more. Mixture was rich at 9.5 GPH and any other setting resulted in a descend.

HHS81 commented 5 months ago

✔️ Tailwind issue is fixed by this!

Currently test flying, but generic handling is good in my view. I do extensive testing against the performance charts right now. Firs results (still from my belly) indicating that climb numbers are closer to the POH.

POH 5-19 Max performance climb (Again, using Joshs generic autopilot for wings level and speed control; and with "complex engine procedures" turned OFF)

ALT IAS FPM expected (POH) difference 500 81.1 990 925 +65 / +7% 2000 78.95 786 835 -49 / -6% 4000 78.50 735 750 -15 / -2% 6000 77.02 625 660 -35 / -6% 8000 74.96 486 565 -79 / -16% 10000 73.98 417 470 -53 / -13% 12000 73.27 318 375 -57 / -18% 14000 72.01 215 285 -70 / -33% The traveled distance and needed time was matching the POH 5-19 quite good! To reach 14000ft I needed 31 minutes (expected 26, but the biggest difference occurred in the last 4000ft or so); and travelled 38.9 Nm (38 expected, so spot on, but before that I had some minor variation of a mile or so).

At 16000ft i was able to get a climb rate of 176 by getting somewhat leaner mixture and with a faster speed of 74 knots; so the FDM is capable of climbing there.

The service ceiling where I reached +100fpm was at about 17000ft and I was able to creep up to about 17700 with 70 knots, where further climbing was not possible anymore (service ceiling should be at 18100ft, where +100fpm should be still available to fly 30° bank courves; thats about 6% difference). engine was pretty cold there, so I had the idea to close the cowl flaps - and promptly I had some 50ft again, but only a short period of time; could not climb more. Mixture was rich at 9.5 GPH and any other setting resulted in a descend.

Again: the climb speed issue has NOTHING !! to do with this- it is and was a wrong tuning of the engine power vs fuel/ altitude table. I will give a link to the wiki-entry with description how to tune engine power. Regards from my holidays in Lisboa.

HHS81 commented 5 months ago

https://wiki.flightgear.org/JSBSim_Engines

hbeni commented 5 months ago

Thanks, I was just wondering why the performance looks closer than in current master and thus wanted to check. Also, to verify the FDM is not getting drastically off because of the fixes done in this PR.

hbeni commented 5 months ago

Otherwise - what is your comment on Ysops fix?

HHS81 commented 5 months ago

Otherwise - what is your comment on Ysops fix?

My comment is, that I can't saying anything about further about- I'm in holidays, computer is back where it belongs: cold, snowy germany.

hbeni commented 5 months ago

And indeed - it is cold and snowy here :cold_face: Enjoy your days! :sun_with_face:

TheFGFSEagle commented 5 months ago

We had some ice rain and half-molten snow falling from the sky at 2 °C here !

ysopflying commented 5 months ago

@HHS81 Sorry for fiddling around in your FDM. Just wanted to look at the small tailwind issue. And then things escalated a bit.

The changes only affect attitude of the plane (except a bit of change to trim drag). And climb rate at maximum climb (not cruise climb).

Reference is NASA CR-1975 and VSPaero calculations. Lift curve was not correct, as only 2D and not 3D. X-axis (=alpha-axis) is assumed to be along fuselage, so alpha_wing=alpha-1.5°(incidence). Alpha used in all tables. Confidence interval for lift is very high in linear part. In stall region it is a bit of guesswork. Hysteresis was too pronounced. Attitude looks more realistic now, so confirming the calculations. What is missing is testing near stall to reproduce POH numbers. CLmax might go down to theoretical value of 1.19 and curve more rounded.

Cmm is now without the cm0-values for cruise, climb, approach. If this reflects alpha, then it would be doubled by cm_alpha. Values from CR-1975 work excellent with minimal elevator deflection. Knowing the exact position of the AeroRP relative to main wing would be nice. Cm-Alpha from VSPAero is a bit larger than literature value. This could be a better phugoid preriod.

So a bit work on progress. Maybe I can finalize next weekend.

Screenshot from 2024-04-22 12-09-44

Enjoy your holidays!

And don't freeze in, guys!

TheFGFSEagle commented 5 months ago

I guess for the graph above, X=alpha(rad) and Y=CL ?

ysopflying commented 5 months ago

I guess for the graph above, X=alpha(rad) and Y=CL ?

True.

Curves will receive a bit of refinement. I need a windtunnel at home!

TheFGFSEagle commented 5 months ago

Me too ! XD

ysopflying commented 5 months ago

No good news, as correcting one thing has often larger implications.

For those inclined to test (can I edit in the pull request? Or pull it back and we make everything in my fork until done?):

            <function name="aero/coefficient/CLwbh">
                <description>Lift_due_to_alpha</description>
                <product>
                    <property>aero/qbar-psf</property>
                    <property>metrics/Sw-sqft</property>
                    <property>aero/function/kCLge</property>
                    <table>
                        <independentVar lookup="row">aero/alpha-rad</independentVar>
                        <independentVar lookup="column">aero/stall-hyst-norm</independentVar>
                        <tableData>
    0   1
-0.09   -0.4429 -0.4429
0   0.0179  0.0179
0.09    0.4787  0.4787
0.1 0.5299  0.5299
0.12    0.6323  0.6323
0.14    0.7347  0.7347
0.16    0.8371  0.8371
0.17    0.8883  0.87
0.19    0.9907  0.95
0.21    1.0931  1.05
0.24    1.26    1.11
0.26    1.29    1.03
0.28    1.33    1.04
0.3 1.35    1.06
0.32    1.3 1.08
0.34    1.21    1.09
0.36    1   1
0.52    1.1 1.1
0.7 1.3 1.3
0.87    1.25    1.25
1.05    1.05    1.05
1.57    0.01    0.01

                          </tableData>
                    </table>
        </product>
            </function>

and

        <function name="aero/coefficient/Cmalpha">
            <description>Pitch_moment_due_to_alpha</description>
            <product>
                <property>aero/qbar-psf</property>
                <property>metrics/Sw-sqft</property>
                <property>metrics/cbarw-ft</property>
                <table>
                    <independentVar lookup="row">aero/alpha-deg</independentVar>
                    <tableData>

-180.0 -0.24 -175.5 0 -171.3 0.23 -90.0 0.85 -20.0 0.31 0.0 0.00 15.0 -0.23 20.0 -0.36 25.0 -0.46 30.0 -0.55 90.0 -0.85 174.7 -0.43 176.6 -0.39 180.0 -0.24

                    </tableData>
                </table>
            </product>
        </function>

Screenshot from 2024-04-28 12-21-44

Sorry for opening the Pandora's box here. Original intend was only correcting one small thing... And yes, the instrument panel will now be in the way a lot, but this seems to be in the way as well. There is still the choice to live with the current version.

To be continued.

TheFGFSEagle commented 5 months ago

I think putting it on your fork would be easiest ! :) I'd love to give it a try !

ysopflying commented 5 months ago

Thanks @TheFGFSEagle ! It makes very much sense to reengineer CD_alpha into CDi=CL²/(pi AR e)+CD(alpha), because then it is (almost) de-coupled from the CL curve and we don't have to change too much.