Board index FlightGear Development Aircraft

JSBSim Piper J-3 Cub  Topic is solved

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

Re: JSBSim Piper J-3 Cub

Postby Thorsten » Sun Aug 13, 2017 4:52 pm

Like a couple of other things it seems, yes - please simply read back, the virtue of a forum thread is that it's all preserved.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: JSBSim Piper J-3 Cub

Postby Bomber » Sun Aug 13, 2017 5:18 pm


I would like to know where the -1.2004 comes from. I assume the -1.8 is taken from multiple current FG aircraft implementations?

Not really. That was my guess by trial and possibly error (shame :oops: ) or rather an estimated adjustment, although not blindly.
I see -1.12 (C172P), -1.16 (Seneca II), -1.8 (DR400), -2 (Tecnam P92 echo). I'm wondering if the C172P would not have the same problem (Cmalpha = -1.8 while it is at -0.65 for Cessna 182


Was it this ?

Not one person, even yourself commented upon...

I'm not against the guessing and it's best if doing so to use other planes values as guidance..

But I do worry that if we ask the authors of these reference planes where they got their values from their answers would refer to another 4 planes. And the authors of these planes another 4 and so on..

Where are the reference planes who values are 100% fact that we can go too and say this is a trusted stake in the ground.

Simon.
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1933
Joined: Fri Dec 14, 2007 8:06 pm
OS: Windows XP and 10

Re: JSBSim Piper J-3 Cub

Postby dany93 » Sun Aug 13, 2017 5:59 pm

It seems that you have not well understood the response.
Not really

The response was '-1.8 was not taken from multiple current FG aircraft implementations'.
The scattering for this 'guidance' was between -1.12 and -2, which couldn't help since the initial value (-1.2004) was inside but already failing to reach the stall AoA.
The final choice at -1.8 was the minimum value which enabled the stall AoA to be reached, and a 3-point touchdown.
If I had found -0.2 or -6, I would have been worried. In fact, I did find -6 in a first step. This message. But it was too high compared with the usual values (the 'guidance'),
although not blindly

I searched for another error: the elevator angular amplitude was too low.

But this way is not really satisfactory, the -1.8 value might be a wrong value resulting from another wrong value elsewhere. With -1.8, the elevator is rather brutal. Hence this discussion.
The best is to have a set of reliable values from the literature as input which result in a good behavior. But we are still waiting for that. For a long time to come, I think.
dany93
 
Posts: 861
Joined: Mon Sep 07, 2009 4:43 pm
Location: France (Paris region)
Version: 2020.4.0
OS: Linux Mint 20.3

Re: JSBSim Piper J-3 Cub

Postby Bomber » Sun Aug 13, 2017 6:58 pm

It's very simple Thorsten....

If I do an elevator deflection test I get these results from the existing code which uses values YOU support or have no issues with.

Lift_elevator = -50.84lbs
Pitch_elevator = 1466.5lbsft

So elevator armature from these two values is 1466.5/50.84 = 28.84ft

<htailarm unit="FT" > 13.20 </htailarm>

Now if you can say this is correct and it's all down to perturbation or elves on the wings then go for it...

Me, I say it's wrong.

Simon
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1933
Joined: Fri Dec 14, 2007 8:06 pm
OS: Windows XP and 10

Re: JSBSim Piper J-3 Cub

Postby Thorsten » Sun Aug 13, 2017 7:34 pm

Sorry, what is the issue that's currently bugging you? Do you want to know the relation between moments and forces? I thought you know that.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: JSBSim Piper J-3 Cub

Postby Bomber » Sun Aug 13, 2017 7:48 pm

Thorsten wrote in Sun Aug 13, 2017 7:34 pm:Sorry, what is the issue that's currently bugging you?


Your failure to add anything to this present conversation about the elevator authority but instead ridicule everything I say.

Thorsten wrote in Sun Aug 13, 2017 7:34 pm: Do you want to know the relation between moments and forces? I thought you know that.


I take it you can't follow my maths ?

Simon
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1933
Joined: Fri Dec 14, 2007 8:06 pm
OS: Windows XP and 10

Re: JSBSim Piper J-3 Cub

Postby Octal450 » Sun Aug 13, 2017 10:25 pm

wkitty42 wrote in Sat Aug 12, 2017 10:00 pm:F10->File->Quit is a good and proper exit as is using ESC to get to the exit dialog and selecting the [OK] button... i, and i'm guessing others, understood your using the 'X' comment to mean the 'X' in the top right corner where the maximize and minimize buttons are when running in non-fullscreen mode...

you should try it... it is beautiful without those frames and their decorations... easy to do via SHIFT-F10 IIRC... it toggles fullscreen mode on and off... i use ALT-TAB to switch to other tasks on the same desktop and can also switch to one of eight other desktops but that's something my OS provides as long as CTRL-F1-8 aren't eaten by something else ;)


True -- but that takes so long and I am extremely impatient :D

Then why doesn't FG do something like MSWord has where when you close, he asks for confirm, and shutdown properly in this way...??


Ehh. Full screen Flight Sim never appealed to me. I quite like this thing at the bottom of my screen:
Image

And the nice transparent Aero glass at the top, maximized has no frames on the sides.... So I'll stick to windows :-)

Kind Regards,
Josh
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: 5565
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: JSBSim Piper J-3 Cub

Postby wkitty42 » Sun Aug 13, 2017 10:39 pm

it0uchpods wrote in Sun Aug 13, 2017 10:25 pm:True -- but that takes so long and I am extremely impatient :D

hahaha... that's why i smack the ESC key several times until the Exit dialog comes up where i can smack the [Enter] key and exit...

it0uchpods wrote in Sun Aug 13, 2017 10:25 pm:Then why doesn't FG do something like MSWord has where when you close, he asks for confirm, and shutdown properly in this way...??

i dunno...

it0uchpods wrote in Sun Aug 13, 2017 10:25 pm:Ehh. Full screen Flight Sim never appealed to me. I quite like this thing at the bottom of my screen:

i used to have one like that but with as much as i get going, i had to expand it to twice the height so the task buttons are stacked two high... it also gave me more room for the stuff on the right to be double or triple stacked in that area... i go fullscreen when i'm in the sim so i'm not distracted by all the other mess... i want as much immersion in the sim or game as i can get... since i'm on an old 19inch CRT and not one of those fancy new LCD or LED monitors, that may come into play... i'm looking to get a new LED monitor soon(ish) but don't know what i want other than something with a fast refresh rate so there's no ghosting and smearing of images as the graphics are moving so fast... that's the main reason i've stayed away from LED/LCD monitors...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: JSBSim Piper J-3 Cub

Postby Octal450 » Mon Aug 14, 2017 4:40 pm

I love CRTs!!! (And retro hardware)

But I use FG on a 22 inch 16:9 Dell monitor, SL that explains me don't care.

I haven't noticed any smearing or such...

[/offtopic] :D

Kind Regards,
Josh
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: 5565
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: JSBSim Piper J-3 Cub

Postby dany93 » Mon Aug 14, 2017 5:54 pm

I've done a very simplistic calculation of the Cmalpha (pitch moment due to alpha) and Cmde (due to elevator deflection) linear aerodynamic coefficients.

Assumptions:
- linear domain (angle dependency),
- Aeronautics (and JSBSim) conventions for the coefficients: using a very limited set of basic aircraft parameters for all coefficients.
Reminder: using this convention does not mean any approximation or a lack in accuracy. If the coefficients have been calculated based on measurements or possibly sophisticated computer calculations, using these coefficients for simulation with the conventional aircraft parameters (the same as for the initial parameter calculation) will give the initial measurements or computer-calculated values.

Assuming a linear variation with alpha of the force exerted on the S0 Area surface (elevator, or horizontal stabilizer: hstab):

Force = qbarpsf x S0 x dCL/dalpha x alpha

with, in JSBSim:
Force in lbs,
qbarpsf dynamic pressure in lb/Sq.Ft,
S0 in Sq.Ft,
dCL/dalpha = CL derivative (slope) with respect to alpha AoA or elevator deflection.

The pitch moment due to this force with arm0 lever-arm is (eq.1):

moment = qbarpsf x S0 x dCL/dalpha x alpha x arm0

moment is in lb.ft.

Conventionally, Sw (total wing area) and cbarw (wing chord) are used among the set of basic parameters for the aircraft.

(eq.1) can be rewritten as:
moment = [qbarpsf x Sw x cbarw] x [S0/Sw] x dCL/dalpha x alpha x [arm0/cbarw]

in the previous expression,
qbarpsf x Sw x cbarw x alpha
is the common set of quantities for the FDM calculation,
alpha is either the AoA or the elevator deflection.

In the FDM it takes the form:

moment = [qbarpsf x Sw x cbarw] x alpha x factor


Hence, the factor to be included in the FDM to calculate the moment vs alpha is:

factor = [S0/Sw] x [arm0/cbarw] x dCL/dalpha

________________________________________________________________

Calculation of the 'factor':

Input Data:
(approximative, the areas more or less depend on the source and I've measured the arms by scaling on a drawing)
J3Cub
arm: distance measured from the wing 1/4 chord (wing aerodynamic center)

hstab area: 15 Sq.Ft
hstab arm: 13.5 ft

Elevator area: 11 Sq.Ft
Elevator arm: 15.3 ft

dCL/dalpha : ~ 0.11/deg ~ 6/rd (NACA 0012 airfoil, Re = 1E6 or 3E6, up to 12 or 15 deg)

Which gives:
for the hstab,
(15/178.5) x (13.5/5.25) x 6 = 1.30
for the elevator,
(11/178.5) x (15.3/5.25) x 6 = 1.08

In the FDM:

Code: Select all
    <function name="aero/moment/Pitch_alpha">
       <description>Pitch moment due to alpha</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>metrics/cbarw-ft</property>
           <property>aero/alpha-rad</property>
            <!-- possible comments -->
           <value>-1.30</value> <!-- dany, quick calculation -->
       </product>
    </function>


Code: Select all
    <function name="aero/moment/Pitch_elevator">
       <description>Pitch moment due to elevator</description>
       <product>
          <property>aero/function/qbar-induced-psf</property>
          <property>metrics/Sw-sqft</property>
          <property>metrics/cbarw-ft</property>
          <property>fcs/elevator-pos-rad</property>
          <!-- possible comment-->
          <value>-1.08</value> <!-- dany, quick calculation -->
       </product>
    </function>


Obviously, I don't claim that these values are better than can replace those which can come from other more reliable sources (wind tunnel, CFD, DATCOM, ...). The interest here is that this calculation is transparent, easily understandable by anyone, that anyone can change the values to do evaluation tests, even to get a quick idea for an other aircraft.
In the hope that it can help comprehension for some of us who are curious but not familiarized and believe that it is often difficult.

Please fix me me if I have mixed or messed something. Thank you.
Last edited by dany93 on Mon Aug 14, 2017 10:07 pm, edited 2 times in total.
dany93
 
Posts: 861
Joined: Mon Sep 07, 2009 4:43 pm
Location: France (Paris region)
Version: 2020.4.0
OS: Linux Mint 20.3

Re: JSBSim Piper J-3 Cub

Postby Bomber » Mon Aug 14, 2017 7:07 pm

EDIT

I think the pitch moment due to alpha isn't a simply the h-stab pitch due to alpha but instead the wings, fuselage and h-stab including elevator at zero deflection pitch due to alpha.

I also miss how you factor the elevator deflection

<property>fcs/elevator-pos-rad</property>

Simon

p.s. I think you're onto something, so don't give up....
Last edited by Bomber on Tue Aug 15, 2017 10:03 am, edited 1 time in total.
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1933
Joined: Fri Dec 14, 2007 8:06 pm
OS: Windows XP and 10

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Mon Aug 14, 2017 11:08 pm

Simon took the time to prepare a glide test for the J3Cub with some of his ideas.

Instruction from Simon
The flight model uses dummy engines and prop so as to add no forces and as such this is purely a glide and aerodynamics test...

So you’ll need to start at 10000ft and 50kts and you’ll see that without touching any of the controls the plane is really quite stable. It doesn’t go off into a spiral dive.... so far so good.

After a while it’ll settle down and you can see the LIFT2DRAG value of 14.7 in the /fdm/jsbsim/aero/forces directory of the properties.

At this point you’re using the original elevator deflection code... and you can see the force and moment values in the relevant properties folders.

If you change the property /fdm/jsbsim/aero/elevator_test to a value of 1... you will be using my elevator deflection code..

You will see no difference with no elevator deflection.

Lift_elevator_test
Pitch_elevator_test

Are the values that are now being used and you can compare these with the originals

Lift_elevator
Pitch_elevator


Here are the files for that test.
Please feel free to analyze the work and comment on.

I tried it and have a layman opinion which really won't be helpful to the discussion.

However as a comparison to the current FDM it is interesting and might be useful to you.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7574
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby dany93 » Wed Aug 16, 2017 6:40 pm

Hi Wayne, Simon.

I did Simon's tests.

Your display of calculated values in the properties are very convenient.

My tests were made with the J3Cub 65 hp, Gross weight 1133 lbs, CG 18.39 ins (default)

At the glide test (same with elevator-test = 0 or 1), the aircraft very slowly started to yaw to the right (original = test) to stabilize close to 12 - 13 deg roll angle. Slow and weak, not an issue.

I found results close to Simon's (Lift / Drag 13.8 - 13.9 stabilized at 55 - 58 kts. Close to what I had already measured some days ago.

If I understand well, the simulator uses:
- with elevator-test = 0, lift-elevator pitch-moment vs deflection with our factor -1.8 in J3Cub.xml,
- with elevator-test = 1, lift-elevator is calculated by your table in elevator-test.xml, then pitch-elevator is calculated by lift-elevator x htailarm.
- for both, pitch-alpha with the factor -2.0327 or -1.3432 depending on Re number (as usual).

Improvement: the pitch-elevator moment is automatically consistent with the lift-elevator. OK. (although I don't know if this flaw was noticeable for the pilot, but this is formally better and it was to be done, now or later)

I cannot have an opinion on the h-stab/Cl lift table vs alpha and deflection in elevator-test.xml (rather complicated) but I guess it should be better than the calculations made with decoupling the moment due to elevator deflection from alpha. At least in principle, it is. The best from now will be to test and observe the behavior.

A few remarks (maybe useless, at least as a reminder):
1 - The elevator angular deflections depend on the version (J3Cub, PA-18), they are not good in Conventional-controls.xml.
The (hstab and?) elevator area(s) also slightly depend(s) on the version (wlbragg knows for PA-18, +5.88% for the elevator). Not as sensitive IMO as the angular deflections.
2 - The elevator efficiency (elevator-test = 1) seems a bit weak. I can only reach a 13 deg AoA, not stall. Instead of about 20 deg AoA with my -1.8 factor (instead of Du Y's -1.2) for the pitch moment due to elevator. For this, Wayne is the judge to tell if he can do what he is willing to do with it. When the elevator angular amplitudes are made correct for the J3Cub and PA-18, of course.
3 - @wlbragg: I see that the active Lift_alpha curve in FGAddon is Du Y's one. Is it your choice? It is more comfortable but I'm afraid that it is not realistic. The USA-35B curve should be more appropriate (in the hope that it is correct, several sources agree well enough on it).

A question:
By looking in the J3Cub.xml and elevator-test.xml files, I can't make out how the correct 'aero/moment/Pitch_elevator' value is transmitted to JSBSim's dynamics for the flight. If aero/elevator_test EQ 1, it is set firstly in J3Cub.xml, secondly in elevator-test.xml. Who wins? (I guess, elevator-test.xml but I don't understand why).
Last edited by dany93 on Fri Aug 18, 2017 3:57 pm, edited 2 times in total.
dany93
 
Posts: 861
Joined: Mon Sep 07, 2009 4:43 pm
Location: France (Paris region)
Version: 2020.4.0
OS: Linux Mint 20.3

Re: JSBSim Piper J-3 Cub

Postby Bomber » Wed Aug 16, 2017 7:37 pm

Thank you for taking the time to look at my suggested code...

To answer you last question... it wins out because of the switch I've added in the system file

Code: Select all
   <switch>
      <default value="aero/moment/Pitch_elevator"/>
      <test value="aero/h-stab/moment-lbsft">
         aero/elevator_test EQ 1
      </test>
      <output>aero/moment/Pitch_elevator_test</output>
   </switch>


You can see it defaults to the Pitch_elevator value.... however if you make elevator_test equal 1 then the results are moment-lbsft.... this value being output of aero/moment/Pitch_elevator_test

and it's this that is added within the moments..

Code: Select all
   <function name="aero/moment/PITCH">
      <sum>
         <property>aero/moment/Pitch_propwash</property>
         <property>aero/moment/Pitch_alpha</property>
         <property>aero/moment/Pitch_elevator_test</property>
         <property>aero/moment/Pitch_damp</property>
         <property>aero/moment/Pitch_alphadot</property>
         <property>aero/moment/Cmdf</property>         
      </sum>
   </function>
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1933
Joined: Fri Dec 14, 2007 8:06 pm
OS: Windows XP and 10

Re: JSBSim Piper J-3 Cub

Postby Bomber » Wed Aug 16, 2017 7:40 pm

dany93 wrote in Wed Aug 16, 2017 6:40 pm:Hi Wayne, Simon.

I did Simon's tests.

Your display of calculated values in the properties are very convenient.



It has always made me wonder why flight models aren't set up to make testing easier by having easily to read values..... all mine are because I want people to see the results and question the validity,
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1933
Joined: Fri Dec 14, 2007 8:06 pm
OS: Windows XP and 10

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 6 guests