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 jaxsin » Wed Dec 30, 2015 1:41 pm

Just wanted to hop in here and say, keep it up. I like these little older smaller planes (bush planes) a lot. The game is sorely missing these beginner planes, I want to fly not program a computer. I appreciate your work and maybe one day hop in and tackle some myself. Watching on with some excitement
jaxsin
 
Posts: 395
Joined: Mon Dec 28, 2015 4:54 pm

Re: JSBSim Piper J-3 Cub

Postby erik » Wed Dec 30, 2015 2:24 pm

wlbragg wrote in Wed Dec 30, 2015 6:59 am:Eric, when you get a chance try the contact point changes and the commented out spring and damping coeff. The coeff are similar to the c172p. I was trying to get some stability but don't really know if it was more or less stable.

I agree the contact points spring/damper needed a bit of work but anything I tried so far did not really work. If you've come up with something better that works: great!

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby erik » Wed Dec 30, 2015 3:08 pm

I've pushed another update for ground handling.
What you provided also did not work too well under certain circumstances.
This time I've borrowed a bit from the p51d setup (and adjusted it for the Cub).

Update: I've pushed another update.
Somehow the main gear was located way too far forward.
I'm quite confident about this one.

Update2: I've now moved the locations around such that the aerodynamic centre is 0,0,0
Along with moving engine, thruster pilot and fuel tank to the proper location.
The balance should be a lot better now.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby Bomber » Wed Dec 30, 2015 8:35 pm

watch out for this

Code: Select all
  <function name="aero/function/kCLge">
      <description>Change_in_lift_due_to_ground_effect</description>
      <product>
            <table>
                <independentVar>aero/h_b-mac-ft</independentVar>
                <tableData>
                    0.0000        1.2030
                    0.1000        1.1270
                    0.1500        1.0900
                    0.2000        1.0730
                    0.3000        1.0460
                    0.4000        1.0550
                    0.5000        1.0190
                    0.6000        1.0130
                    0.7000        1.0080
                    0.8000        1.0060
                    0.9000        1.0030
                    1.0000        1.0020
                    1.1000        1.0000
                </tableData>
            </table>
      </product>
  </function>

  <function name="aero/function/kClge">
      <description>Change_in_drag_due_to_ground_effect</description>
      <product>
            <table>
                <independentVar>aero/h_b-mac-ft</independentVar>
                <tableData>
                    0.0000        0.0480
                    0.1000        0.0480
                    0.1500        0.0480
                    0.2000        0.0480
                    0.3000        0.0615
                    0.4000        0.1229
                    0.5000        0.2709
                    0.6000        0.3815
                    0.7000        0.5882
                    0.8000        0.7928
                    0.9000        0.9620
                    1.0000        0.9880
                    1.1000        1.0000
                </tableData>
            </table>
      </product>
  </function>



also and I'm guessing you've borrowed this from somwhere else....but do you realy want to mix your units ? you're a factor of 32 out here

Code: Select all
  <function name="aero/function/qbar-induced-psf">
    <description> q bar including the propulsion induced velocity.</description>
    <product>
      <property>aero/function/velocity-induced-fps</property>
      <property>aero/function/velocity-induced-fps</property>
      <property>atmosphere/rho-slugs_ft3</property>
      <value>0.5</value>
    </product>
  </function>


and whilst we're here.. why 2 prop induced velocities ?

Code: Select all
  <function name="aero/function/velocity-induced-fps">
    <description> velocity including the propulsion induced velocity.</description>
    <sum>
      <property>velocities/u-aero-fps</property>
      <property>propulsion/engine/prop-induced-velocity_fps</property>
      <property>propulsion/engine/prop-induced-velocity_fps</property>
    </sum>
  </function>


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 erik » Wed Dec 30, 2015 9:02 pm

Bomber wrote in Wed Dec 30, 2015 8:35 pm:watch out for this (removed ground effects)

Why?
also and I'm guessing you've borrowed this from somwhere else....but do you realy want to mix your units ? you're a factor of 32 out here
Code: Select all
  <function name="aero/function/qbar-induced-psf">
    <description> q bar including the propulsion induced velocity.</description>
    <product>
      <property>aero/function/velocity-induced-fps</property>
      <property>aero/function/velocity-induced-fps</property>
      <property>atmosphere/rho-slugs_ft3</property>
      <value>0.5</value>
    </product>
  </function>

Can you elaborate? I don't see it.
and whilst we're here.. why 2 prop induced velocities ?
Code: Select all
  <function name="aero/function/velocity-induced-fps">
    <description> velocity including the propulsion induced velocity.</description>
    <sum>
      <property>velocities/u-aero-fps</property>
      <property>propulsion/engine/prop-induced-velocity_fps</property>
      <property>propulsion/engine/prop-induced-velocity_fps</property>
    </sum>
  </function>


Yes: qbar = 0.5* rho*v*v

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Wed Dec 30, 2015 9:09 pm

Eric,

On first glance it seems better, but one thing I was trying to correct for prior was when you rotate the tail wheel off the ground then the front wheels sink below ground (that part was corrected with my contact point adjustments, right or wrong). The sinking on rotate I assumed is because the x-pos of the front wheels are too far back (+) to eliminate the sinking on rotate the contact point has to be moved forward (-). That issue is back as it was before.

I wonder if it wouldn't be easier to location unit="M" instead of location unit="IN" so we don't have to keep converting?

Also, I personally like the wheels to sink just enough on the pavement so as to imitate weight on the wheels (I'm talking about a very slight amount).
I should be able to slightly adjust z-pos without if influencing or affecting any of the FDM elements, true?

I am going to play with the contact x (front gear only) and a slight z (all three) to get,
1) the rotation to all for the front tires to stay on the pavement and not sink.
2) the tires one the ground at startup.

I'll adjust the x slowly, only enough to get the contact below the wheel to where rotation is correct.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
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 Bomber » Wed Dec 30, 2015 9:24 pm

1) Check the function names...
2) 1 slug ft3 = 32 lbs ft3
3) the equation uses a sum not product.
"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 » Wed Dec 30, 2015 9:28 pm

I wonder if it wouldn't be easier to location unit="M" instead of location unit="IN" so we don't have to keep converting?


I guess that depends on where or when you want to do the conversion. I forgot that the debug uses inches. It's easier to debug in inches I guess.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
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 wlbragg » Wed Dec 30, 2015 10:12 pm

Let me start by saying I read somewhere that these contact points cannot be measured. They almost always require trial and error.
I have found that to be very true.

What i have discovered in calculating them is this.

In the case of this Cub. If we position the tail wheel just touching the ground at the correct z-pos and raise the front wheel contact points then the tail wheel if positioned properly should remain touching the ground and just rotate. In our case it does not, it raise off of the ground. Meaning it is too far back. Once I position the back wheel so raising the front have no effect other than rotation, i reverse the process to get the same effect on the front wheels when I change the back wheels z-pos.

I think this is the only way to get the correct x and z-pos. I suppose you could use some dummy bogeys to get the y-pos in the same manner.

Make sense?

That is what I am doing at the moment. It requires many iterations of debugging steps.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
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 wlbragg » Wed Dec 30, 2015 10:18 pm

Something else I just noticed, debug in FG reports the tail wheel being -188, opposite the blender reporting of +188. I guess that is correct? I don't think I realized that before.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
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 erik » Wed Dec 30, 2015 10:28 pm

wlbragg wrote in Wed Dec 30, 2015 9:09 pm:Eric,

On first glance it seems better, but one thing I was trying to correct for prior was when you rotate the tail wheel off the ground then the front wheels sink below ground (that part was corrected with my contact point adjustments, right or wrong). The sinking on rotate I assumed is because the x-pos of the front wheels are too far back (+) to eliminate the sinking on rotate the contact point has to be moved forward (-). That issue is back as it was before

That's probably the visual reference point being wrong, so I wouldn't worry about the contact points right now.
Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby erik » Wed Dec 30, 2015 10:44 pm

Bomber wrote in Wed Dec 30, 2015 9:24 pm:1) Check the function names...

Ahh yes, the first is for Lift the second for rolling moment. Looks strange but is actually correct.
2) 1 slug ft3 = 32 lbs ft3

Hmm, good point, I don't know from the top of my head which one should be used.
But if slugs is wrong then the c172p also got it wrong.
3) the equation uses a sum not product.

I'm not exactly sure why this is begin used for the c172p, but for now I'll thrust it.
But I will look it up.

Update: I think it is to account for the slipstream cone:
Image

Erik
Last edited by erik on Wed Dec 30, 2015 10:52 pm, edited 1 time in total.
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby erik » Wed Dec 30, 2015 10:45 pm

wlbragg wrote in Wed Dec 30, 2015 10:18 pm:Something else I just noticed, debug in FG reports the tail wheel being -188, opposite the blender reporting of +188. I guess that is correct? I don't think I realized that before.

yes, JSBSim is negative forward for the X-axis.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Thu Dec 31, 2015 5:53 am

I'm looking at the aircraft in the external view, I don't understand what " visual reference point" could have to do with the wheels sinking below the ground? But then again I am not sure what you are referring to when you say "visual reference point"?

So I would really like to understand this if you can explain it easy enough.

EDIT:
so I wouldn't worry about the contact points right now.

When and where in this workflow would the "visual reference point" get corrected then? I don't feel comfortable doing any of the additional gear configurations (ski, float, bush) until I know the starting point of the standard gear is correct.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
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 wlbragg » Thu Dec 31, 2015 7:56 am

I am pretty confident this procedure gives you the correct and proper x-pos and z-pos contact points.

You can simply plug in the final numbers and test this yourself. I won't push until you explain what the "visual reference point being wrong" means in case I am missing a BIG piece of this puzzle.

At any rate, this procedure gives me what I think are the correct contacts (except y-pos is still off, I can tell by rocking the aircraft). I still need to do the procedure on the y-pos. But x and z as far as I am concerned are correct (barring an explanation on your part of other factors that I am unaware of).

step 1
Position all z's to the same z-pos to eliminate x factor, adjusting z to fix unit 0 to touch ground at correct point (plane level).
Code: Select all
 <location unit="IN">
  <z> -72.8 </z>
 </location>

So x is taken out of the equation and tail unit 0 is touching ground at correct z pos.

step 2
Move tail unit 0 x-pos until elevating unit 1 and 2 either - or + has no z effect on tail.
That required tail x-pos at 112.50.

unit 1 and 2 z = 102.8 tail is still touching correctly
unit 1 and 2 z = 72.8 tail is still touching correctly
unit 1 and 2 z = 42.8 tail is still touching correctly

Tail unit 0 x-pos and z-pos are correct.


Now do the same for front gear unit 1 and 2


step 1
Position all z's to the same z-pos to eliminate x factor, adjusting z to fix unit 1 and 2 to touch ground at correct point (plane level).
Code: Select all
  <location unit="IN">
  <z> -92.50 </z>
 </location>

So x is taken out of the equation and front unit l and unit 2 is touching ground at correct z pos.

step 2
Rotate tail unit 0 and see what happens to front unit 1 and unit 2, if correct they should remain fixed at z and just rotate.
Rotating tail unit z caused unit 1 and unit 2 to elevate meaning x is to far right of center.

step 3
Negative elevation of tail unit 0 caused unit 1 and unit 2 to elevate meaning x is too far right of center.
If it caused it to lower then it would be left of center.
Now adjust unit 1 and unit 2 x to the left until wheel touches again.
That required unit 1 and unit 2 x-pos to be at -120.65.

unit 0 z = 112.5 unit 1 and 2 is still touching correctly
unit 0 z = 72.8 unit 1 and 2 is still touching correctly (all wheels touching correctly)
unit 0 z = 52.5 unit 1 and 2 is still touching correctly

Unit 1 and 2 x-pos and z-pos are correct.

final numbers =

x = unit 1 and 2 = -120.65, unit 0 = 112.50

z = unit 1 and 2 = -92.5, unit 0 = 72.8

I even took pictures along the way to visually show what is going on. If I get a consensus that this procedure works, I can add it to the wiki.
Again, barring configurations that I might totally be unaware of, I think this is a sound procedure and produced the correct x an z contact points.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 17 guests