Board index FlightGear Development Aircraft

Cirrus SR22T

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Cirrus SR22T

Postby barta » Sun Jun 28, 2020 3:51 pm

Last year I've started fiddling with the SR22 to see if I can improve it,. Added some instruments and started porting the fdm from yasim to jsb.

Yesterday, by pure luck, noticed a new SR22T in FGAddon. Looks great! and have a much better 3D model and FDM.

I want to help (already fixed the FDM for the rudder and some other annoyances), but I dont want to start fixing something and discover that another person is working on the same...

I'm currently implementing the MFD using FG1000 with a custom XML for the display, the keyboard, and the GMC305

Does it have his own repo for development or just FGaddon?

Cheers,
Barta
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
- Leonardo da Vinci
barta
 
Posts: 36
Joined: Thu Mar 05, 2009 1:24 am
Location: On the air, preferrably

Re: Cirrus SR22T

Postby D-ECHO » Sun Jun 28, 2020 4:44 pm

Good day Barta,

nice to see someone interested in the SR22T. I am currently not doing any active development on it. So any fixes, improvements and additions are, provided they are GPL, very welcome! The displays currently use the G3X instrument, which is obviously wrong, so any improvements in this field are especially welcome.

The aircraft is solely developed on FGAddon, avoids duplicates and drastically reduces my workload in terms of keeping everything up to date ;)

Once you consider them ready, you can send me your improvements and I'll add them.

Have a good day
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Cirrus SR22T

Postby barta » Sun Jun 28, 2020 5:17 pm

Alright, I'll send you the diffs.

Again, beautiful work. The 3d model is awesome!

Anybody out there wants to help with the FDM? I'm no JSBSim guru...
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
- Leonardo da Vinci
barta
 
Posts: 36
Joined: Thu Mar 05, 2009 1:24 am
Location: On the air, preferrably

Re: Cirrus SR22T

Postby D-ECHO » Sun Jun 28, 2020 5:32 pm

Nobody is a guru at it when they start ;) but you can learn along your way! Best is to start by identifying which exactly you think need work, then try and find out how it is in real life (e.g. performance data). If you tell us those, we can point you to where in the FDM this is defined
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Cirrus SR22T

Postby barta » Mon Jun 29, 2020 4:45 pm

Quick update:
Garmin Perspective implemented using FG1000. Both displays are fully functional and the engine information (EIS) half ported to look like the real one. Most of the buttons and knobs on the panel below are also functional.
Image

Regarding the FDM:

I've fixed the steering on ground by modifying the ground reactions of the nose bogey:
Code: Select all
<contact type="BOGEY" name="NOSE">
                        <location unit="M">
                                <x> -3.0 </x>
                                <y>   0.00 </y>
                                <z> -1.36 </z>
                        </location>
                        <static_friction>  0.80 </static_friction>
                        <dynamic_friction> 0.50 </dynamic_friction>
                        <rolling_friction> 0.02 </rolling_friction>
-                       <spring_coeff unit="LBS/FT">       6080.23 </spring_coeff>
-                       <damping_coeff unit="LBS/FT/SEC">   540.11 </damping_coeff>
-                       <max_steer unit="DEG"> 360.00 </max_steer>
+                       <spring_coeff unit="LBS/FT">       3600 </spring_coeff>
+                       <damping_coeff unit="LBS/FT/SEC">   1200</damping_coeff>
+                      <max_steer unit="DEG"> 180 </max_steer>
                        <brake_group>NONE</brake_group>
                        <retractable>0</retractable>
                </contact>

Values are shamesly copied from the c172..
It's not perfect, but at least it will let you taxi to the runway...

It's flyable. After lots of bumpy take-offs (and some crashes..), Ive found the best configuration to be: Elevator trim up between 13 and 15, rudder trim right between 8 and 13 (take wind dir into account). full power, rotate gently at 70, initial climb at 90/100 kts, 1000/1500 ft/s, at 500ft flaps up and reduce some power.

Decent approachs and landings are almost impossible yet...

I'll clean up the code and upload a tgz. Or do you prefer a patch?
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
- Leonardo da Vinci
barta
 
Posts: 36
Joined: Thu Mar 05, 2009 1:24 am
Location: On the air, preferrably

Re: Cirrus SR22T

Postby D-ECHO » Mon Jun 29, 2020 5:32 pm

A diff/patch is best

max_steer needs to stay at 360 iirc because wheel is castering, will reply more detailed later
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Cirrus SR22T

Postby D-ECHO » Mon Jun 29, 2020 5:33 pm

Also very good work on FG1000!
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Cirrus SR22T

Postby barta » Mon Jun 29, 2020 7:39 pm

Here's the patch with what I have done so far:
http://scenery.bartatech.net/data/sr22t.patch.bz2

Also very good work on FG1000!

Thanks, it's just a start! I could do much better, lol.
Almost got the keyboard working. Next step is to integrate the autopilot and the comm panel.

Regarding the FDM, I have some questions.

The throttle is very flaky. By that I mean that when you make small adjustments with the throttle, the mainfold pressure (and the propeller RPM) fluctuates a lot. I've never flown this puppy IRL, but in most videos of the SR22 throttling up/down seems much more steady.

Also, throttling down, even a little, pulls the nose up
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
- Leonardo da Vinci
barta
 
Posts: 36
Joined: Thu Mar 05, 2009 1:24 am
Location: On the air, preferrably

Re: Cirrus SR22T

Postby barta » Wed Jul 01, 2020 12:52 am

Here's a new patch to what was originally in FGAddon. If you have already patched it with the previous patch, let me know and I'll make a patch between those versions.
http://scenery.bartatech.net/data/sr22t ... .patch.bz2

Cheers,
Barta
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
- Leonardo da Vinci
barta
 
Posts: 36
Joined: Thu Mar 05, 2009 1:24 am
Location: On the air, preferrably

Re: Cirrus SR22T

Postby barta » Wed Jul 01, 2020 1:49 am

Regarding the FDM and the TSIO550K:
The engine has 2 turbos that helps to mantain high mainfold pressure when climbing. Acording to some tech documents that I've read, "The upper deck manifold pressure will be regulated to maintain 36.5” up to about 18,000ft (critical altitude)"
That is consistent with what I've seen in some videos.
But I don't really know how to code that in JSBSim.
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
- Leonardo da Vinci
barta
 
Posts: 36
Joined: Thu Mar 05, 2009 1:24 am
Location: On the air, preferrably

Re: Cirrus SR22T

Postby barta » Wed Jul 01, 2020 7:31 am

Added a ratedboost to the engine file, trying to emulate the turbos. Now the mainfold pressure doesn't drop, but it stills need finer adjustments.

Imiplemented the autopilot using the GNC700 from FG1000, and mapped the buttons on the middle panel.
It's working, but some of the functions fail...

@D-ECHO:
Instead of making a patch every time, I've setup a github repo to replicate my local copy. The master branch is synced with the svn trunk of fgaddon, and the "barta" branch it's my local copy.
You can take the changes from there, test them, or I can male a patch when you think it's ready.
The repo is here: https://github.com/bartacruz/SR22T

Cheers,
Barta
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
- Leonardo da Vinci
barta
 
Posts: 36
Joined: Thu Mar 05, 2009 1:24 am
Location: On the air, preferrably

Re: Cirrus SR22T

Postby D-ECHO » Thu Jul 02, 2020 2:31 pm

Hi barta,

I finally got the chance to look over your work as on github. It looks really good, also solidly done as far as I can tell for now.

Are you aware of what the GNU General Public License (GPL) is, what it means and what its requirements are?

Some small remarks only ;) :
* in case you haven't found this yet, you can access the manuals from Cirrus Design's website at https://cirrusaircraft.com/technical-pu ... odel=sr22t (POH) and https://cirrusaircraft.com/technical-pu ... odel=sr22t (AMM), these are very helpful in implementing features realistically and contain very detailed information
* as noted before, the SR22T has a castoring nosewheel (POH p.7-24). To allow for the wheel to castor, max_steer needs to be set to 360.0 (see http://wiki.flightgear.org/JSBSim_Groun ... Properties ). Note that the POH states that while the wheel castors, it is limited to +-85 degrees. For such a "partially-castoring" wheel, the recent discussion on the J3 Cub's thread might be interesting to you. ( viewtopic.php?f=4&t=28303&start=1110#p367285 and onwards). Either way setting max_steer to 180 is wrong because it implies steering which is not existent in the real aircraft
* I welcome a more realistic engine simulation for the SR22T (https://github.com/bartacruz/SR22T/comm ... d16c364aca), but a minor thing: As http://wiki.flightgear.org/JSBSim_Engin ... efinitions defines max_mp as
http://wiki.flightgear.org/JSBSim_Engines#Parameter_definitions wrote:this value is the nomial maximum manifold pressure at sea-level without boost. Along with maxrpm it determines the resistance of the aircraft's intake system. See air-intake-impedance-factor

I think that max_mp should not take boost into account (it should be set as if there is no turbo)
Also, ratesboost[1,2,3] is the rated boost pressure in psi, which I think 3 isn't the correct value for ;)

Despite these small things, please keep the great work up! I neglected the SR a bit in the past and it's cool to have someone working on it again!
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Cirrus SR22T

Postby barta » Thu Jul 02, 2020 6:17 pm

Hi Benedikt,

Yes, I'm aware of what the GPL is. You can take a look at my others repos in github and note that all are covered by the GPL. Been working wit FOSS since the late 90's. I even organized a FOSS conference in Buenos Aires where we got Stallman and Mad Dog Hall as speakers... 8)

Thanks for the links, I'll read the post of the Cub and modify the nosewheel accordingly.

JSBSim documentation is really sparse. I'm currently fiddling with the engine definitions in an attempt to understand how it works, and maybe (by pure luck! ) get to make it right.

Also, the autopilot has some problems in the vertical mode. The LVL and ALT buttons makes the AP trim up & down like crazy...
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
- Leonardo da Vinci
barta
 
Posts: 36
Joined: Thu Mar 05, 2009 1:24 am
Location: On the air, preferrably

Re: Cirrus SR22T

Postby D-ECHO » Fri Jul 03, 2020 2:06 pm

Hi barta,

very good, just wanted to make sure that we don't end up with any violating code/content in FGAddon - but that sounds perfect!

About JSBSim documentation, you might want to have a look (if you hadn't already)
* at the wiki (http://wiki.flightgear.org/Category:JSBSim)
* at the JSBSim Reference manual (http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf)
* at the individual source files, they usually have a quite detailed description of the values and what they mean at their top. For piston engines, see e.g. https://sourceforge.net/p/flightgear/fl ... FGPiston.h and https://sourceforge.net/p/flightgear/fl ... Piston.cpp

If the autopilot's problem isn't due to the FDM (which probably still isn't that good in terms of moments), I'd guess talking to its maintainer (iirc Stuart who does the whole FG1000) would be best here.
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Cirrus SR22T

Postby Octal450 » Fri Jul 03, 2020 4:35 pm

Instead of the reference manual, I recommend: http://jsbsim.sourceforge.net/JSBSim/

See Classes/Class List/JSBsim
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5583
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Next

Return to Aircraft

Who is online

Users browsing this forum: EC-ISR and 19 guests