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 » Thu Dec 31, 2015 8:33 am

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.


JSBSim knows pretty much nothing about your 3d model - the visual reference point is just the point at which JSBSim tells FG to place the origin of the 3d model. Sort of a global <translate> JSBSim side.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: JSBSim Piper J-3 Cub

Postby erik » Thu Dec 31, 2015 9:33 am

Like Thorsten said: JSBSim has it's own coordinate system, FlightGear has it own coordinate system. And the Visual Reference Point (VRP) makes sure they are aligned. Normally you'd set the VRP at centre of gravity or the nose. Or anywhere else completely depending where (0,0,0) is defined for the 3d model.

There is now an updated VRP in git.
Let me know if this meets your expectations.

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: 2245
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby Bomber » Thu Dec 31, 2015 12:05 pm

<function name="aero/function/kCLge">
<function name="aero/function/kClge">

my mistake in that one... it's ok..


Code: Select all
  <function name="aero/function/kCDge">
      <description>Change_in_drag_due_to_ground_effect</description>
      <product>
            <table>
                <independentVar>aero/h_b-mac-ft</independentVar>
                <tableData>
                    0.0000        0.4800
                    0.1000        0.5150
                    0.1500        0.6290
                    0.2000        0.7090
                    0.3000        0.8150
                    0.4000        0.8820
                    0.5000        0.9280
                    0.6000        0.9620
                    0.7000        0.9880
                    0.8000        1.0000
                    0.9000        1.0000
                    1.0000        1.0000
                    1.1000        1.0000
                </tableData>
            </table>
      </product>
  </function>


I would however get an explaination as to the origin of the ground effect on drag.... I believe ground effect on drag effects cdi (induced drag) only... So as you're adding these values into the general drag [as below], you're reducing the drag by too much..

Code: Select all
    <function name="aero/force/Drag_basic">
       <description>Drag at zero lift</description>
       <product>
          <property>aero/qbar-psf</property>
          <property>metrics/Sw-sqft</property>
          <property>aero/function/kCDge</property>
          <table>
            <independentVar lookup="row">aero/alpha-rad</independentVar>
            <independentVar lookup="column">aero/Re</independentVar>
            <tableData>         <!-- USA-35B -->
                      1668183  3707224
             -1.5700   1.4091   1.4091
             -0.3491   0.1898   0.1736
             -0.2443   0.1567   0.0494
             -0.1745   0.0307   0.0290
             -0.0873   0.0216   0.0208
              0.0000   0.0189   0.0187
              0.0873   0.0216   0.0208
              0.1309   0.0289   0.0279
              0.1745   0.0332   0.0315
              0.2182   0.0435   0.0402
              0.2618   0.0757   0.0707
              0.3054   0.1408   0.1125
              0.3491   0.1898   0.1736
              1.5700   1.4091   1.4091
            </tableData>
          </table>
       </product>
    </function>


your code does do induced drag separately..

Code: Select all
    <function name="aero/force/Drag_induced">
       <description>Induced drag</description>
         <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>aero/cl-squared</property>
           <value> 0.0485 </value>
         </product>
    </function>


so I think you'd be better off using this equation (from a bunch of amateurs)

https://www.grc.nasa.gov/www/k-12/airplane/induced.html

and then using this table...

Code: Select all
   <fcs_function name="aero/function/kCDige">   
        <function>
            <description>Change_in_drag_due_to_ground_effect</description>
                  <table>
                      <independentVar>aero/h_b-mac-ft</independentVar>
                      <tableData>
                  0.0      0.15
                  0.1      0.5
                  0.15           0.7
                  0.2      0.805
                  0.3      0.875
                  0.4      0.911
                  0.5      0.938
                  0.6      0.956
                  0.7      0.965
                  0.8      0.974
                  0.9      0.981
                  1.0      0.9845
                  1.1      1
                      </tableData>
                  </table>
        </function>      
   </fcs_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 wlbragg » Thu Dec 31, 2015 1:00 pm

Now I get it. That fills in the blanks, thanks.

Let me know if this meets your expectations.

Yes, that did it.

I am curious though as to the functional difference between using the VRP to align the different worlds or doing what I did to find the current contact points without a VRP?

Also, I tried rotating the front and back of the aircraft to see if my theory still applies and the front gear remained solid to the ground when rotating the tail but the tail gear's X contact point appeared to be left of center.

I have a couple more test measurements to do to verify some things I'm still trying to work out in my mind but have to leave for a bit. I'll try them later and see if I can verify what I am talking about.

What you have now is certainly very close.

Thanks again for the work and explanations.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
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 » Thu Dec 31, 2015 1:03 pm

wlbragg wrote in Thu Dec 31, 2015 1:00 pm:Now I get it. That fills in the blanks, thanks.

Let me know if this meets your expectations.

Yes, that did it.

I am curious though as to the functional difference between using the VRP to align the different worlds or doing what I did to find the current contact points without a VRP?


If you shift the gears but not the centre of gravity you will end up with a poorly (weight) balanced aircraft.
You could change all locations with the same offset in the JSBSim file and get the same results, but this is much easier :)

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: 2245
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby AndersG » Thu Dec 31, 2015 1:09 pm

wlbragg wrote in Thu Dec 31, 2015 1:00 pm:I am curious though as to the functional difference between using the VRP to align the different worlds or doing what I did to find the current contact points without a VRP?


When you move the contact points "randomly" in the FDM to make the unaligned 3d model look like it sits nicely on the ground you change the layout (where the contact points are w.r.t. the CG, engine,wing etc.) of the aircraft - which is probably not what you want.

The first step should always be to align the 3d model coordinate system with the FDM structural coordinate system, then look at any minor adjustments that may be needed to the contact points (mostly in the Z axis as the gear suspension state on 3-view drawings, as well as the spring constants may be unclear). The contact point position is where the bottom of the unloaded gear is.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2524
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: JSBSim Piper J-3 Cub

Postby erik » Thu Dec 31, 2015 1:47 pm

Also note, as I just discovered with the Cub, when JSBSim does support gear compression while the animations do not, it still may look like the gear position is wrong where in reality the animations are wrong or non existent.

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: 2245
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Thu Dec 31, 2015 6:50 pm

How do you calculate or where did you get these numbers?
Code: Select all
<location name="VRP" unit="IN">
     <x>  -110.60 </x>
     <y>     0.00 </y>
     <z>   -17.00 </z>
</location>
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
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 8:08 pm

I adjusted unit 0's X and Z slightly. The X was left of center a slight bit which also was causing the Z to be a bit off.

If you place the aircraft in the FG screen space completely level and record the bottom of unit 0 and unit 1&2's tires, you should be able to get the correct Z positions of those tires. Then using the method I posted earlier, you can verify the correct X position. That is what I did after you corrected the VRP. You already had unit 1&2 tires correct. I then used this method to adjust unit 0's X and Z.
My understanding now is that this all depends on the VRP being calculated correctly and the closer it is to the correct value the closer we should be able to get the X and Z contact numbers in JSBSim to match what Blender reports, is this true?

In an effort to understand the relationship between Blender, JSBSim and FlightGear space I have a couple questions I hope you might be able to answer.

These are the X and Z contacts in the blend file and what we used in JSBSim.
Even though we're pretty close, ideally shouldn't they be the same?
Shouldn't we be able to use what Blender reports as the bottom of each tire as the contact Z and for all that matters the X positions, especially if we account for discrepancies in the VRP?
In other words, why would we be slightly off?

left front
Z
Blender -72.645
JSBSim -77.20
X
Blender 1.169
JSBSim -10.65


tail
Z
Blender -29.917
JSBSim -33.80
X
Blender 202.830
JSBSim 199.90


The cursor is positioned at what you used for the VRP in JSBSim
Image
Why or how do you determine to use this position?

Blender 2.80 m
=
JSBSim -110.60 in

Blender -0.4318 m
=
JSBSim -17.00 in
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
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 » Fri Jan 01, 2016 12:42 pm

This is a cracking example of how one discipline needed to created a plane can make it harder for another discipline also needed to make the plane.


Code: Select all
    <thruster file="CM7445 MCCauley">
     <sense> 1 </sense>
     <location unit="IN">
       <x>   -69.30 </x>
       <y>     0.00 </y>
       <z>   -23.00 </z>
     </location>
     <orient unit="DEG">
       <pitch>     0.00 </pitch>
        <roll>     0.00 </roll>
         <yaw>     0.00 </yaw>
     </orient>
    </thruster>


within blender from the center of the propeller measure 69.3 inches back towards the cockpit and 23 inches downtowards the gear.... THIS POINT IS IMPORTANT, IT'S THE DATUM...

and you guys need to use the same one so as to stop making it harder for yourselves,

If you position blenders 0,0,0 at this point....all will be well.
"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 » Fri Jan 01, 2016 1:30 pm

wlbragg wrote in Thu Dec 31, 2015 6:50 pm:How do you calculate or where did you get these numbers?
Code: Select all
<location name="VRP" unit="IN">
     <x>  -110.60 </x>
     <y>     0.00 </y>
     <z>   -17.00 </z>
</location>


This is the old VRP, the new one is -9.86, 0.0, -0.97

It's the offset needed to put every JSBSim location on top of the same point in the 3d model.

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: 2245
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Fri Jan 01, 2016 6:20 pm

within blender from the center of the propeller measure 69.3 inches back towards the cockpit and 23 inches downtowards the gear.... THIS POINT IS IMPORTANT, IT'S THE DATUM...

Is this an "official aircraft manufacturers datum" or is it "your arbitrary datum point"?



This is the old VRP

I either posted that prior to the change or somehow got the old numbers.

It's the offset needed to put every JSBSim location on top of the same point in the 3d model.

OK, how do you get those numbers, what method or procedure do you use to obtain them?

Also, I read the J3 tail weigh point is not the tail wheel, I believe it was the tail wheel brace. Does this have anything to do with calculating VRP?

Is that maybe why the tail wheel contact point ended up left (or forward) of the wheel?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
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 » Fri Jan 01, 2016 9:27 pm

It's the arbitary datum point that's been used within the fdm (I didn't set).... aligning the 3d model and the fdm models datum points up solves a lot of problems, and the vrp can be set to 0,0,0

the tail wheel contact point ends up forward of the wheel because it's location points are defined within the body co-ord systems X Y Z..... but here's the kicker the plane when it's sits on the ground slopes backwards towards the tail wheel.. making the actual contact point further back... you'll notice the same thing on the front wheels.
"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 » Fri Jan 01, 2016 9:30 pm

the official datum point for that plane of that era would be

X engine fire or mounting point
Y centre of the plane
Z centre of prop.
"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 » Sat Jan 02, 2016 7:00 am

@Eric,

In J3Cub-set.xml can we get rid of the reference to "yasim" in the following code blocks. As far as I know, the Yasim version should be totally isolated from the JSBSim version at this point.

When I say "we", I mean "you", as I am not sure what needs to be done here?

Starting around line 166
Code: Select all
  <!-- Payload -->
  <weight>
   <name type="string">Pilot</name>
   <weight-lb alias="/yasim/Cub/pilot-lb"/>
   <min-lb type="double">0.0</min-lb>
   <max-lb type="double">210.0</max-lb>
  </weight> 
  <weight>
   <name type="string">Passenger</name>
   <weight-lb alias="/yasim/Cub/passenger-lb"/>
   <min-lb type="double">0.0</min-lb>
   <max-lb type="double">210.0</max-lb>
  </weight>
 </sim>

 <yasim>
  <Cub>
   <pilot-lb>180.0</pilot-lb>
   <passenger-lb>0.0</passenger-lb>
  </Cub>
 </yasim>



I also added a Model/J3Cub.xml separate from Model/Cub.xml to further isolate the two versions because I am going to upgrade only the JSBSim version.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
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 18 guests