Board index FlightGear Development Aircraft

P-51D JSBSim model developement (Now in FG GIT)

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

P-51D JSBSim model developement (Now in FG GIT)

Postby hvengel » Sun Mar 28, 2010 9:17 pm

This has been mentioned on a few other threads but I think it should have it's own thread so as not to clutter up other threads and to make it easy to find. I will use the first post of this thread to keep a link to the latest version of the model.

Please see the end of this post for a download link.

The tarball is a complete replacement for the existing p51d directory. It includes the current YASim model as well as the new JSBSim model. The YASim model is unmodified.

The current P-51D is modeled after a ship named GunFighter. This aircraft is a survivor that was originally delivered to the US Army Air Corps in March 1945. It was assigned to the 8th Airforce's 55th Fighter Group but apparently did not get used in actual combat. The YASim model represents the modern version of GunFighter as it exists today IE. sans guns and armor. The JSBSim model is GunFighter as it could/would have been in 1945. The only real speculation is the paint scheme. The modern GunFighter is painted in the scheme of the 394th squadron and this represents a plausible paint scheme. But there is no evidence that GunFighter was actually assigned to a specific squadron when it reached Europe in 1945 so no one has any idea what paint scheme it had or even if it had any squadron colors.

The JSBSim model has the following new features compared to the YASim model.

1. The FDM makes extensive use of NACA wind tunnel and flight test data for the P-51 series. These NACA reports total over 600 pages on this aircraft. These were written between 1942 and 1955. Unlike many other JSBSim models for FlightGear this is NOT a generic JSBSim FDM that was generated by the Aero-Matic tool.

2. The cockpit has extensive enhancements with many added switches, knobs and other devices. Many of these are functional.

3. The number of hot spots has more than doubled.

4. The aircraft now has a nearly full complement of weapons including guns, rockets and 500lb bombs. The controls for these are in place, function correctly and have supporting hot spots. In addition there is a working gun sight.

The rockets and bombs require a second trigger button to function correctly. For those wanting realism this should the button under your thumb on the stick and the joystick config needs something like this added:

Code: Select all
 <button n="1">
  <desc>Fire Rockets or Release Bombs</desc>
  <repeatable>false</repeatable>
   <binding>
       <command>nasal</command>
       <script>setprop("/controls/armament/trigger2", 1)</script>
   </binding>
   <mod-up>
    <binding>
       <command>nasal</command>
       <script>setprop("/controls/armament/trigger2", 0)</script>
     </binding>
   </mod-up>
 </button>


Change <button n="1"> to have the correct number for the button you want to map to this function. This mapping could also be to a key on the keyboard.

5. There is a new menu that allows the pilot to control external stores (IE. load bombs, rockets and/or drop tanks) and to load/unload the guns. Right now this is somewhat unrealistic since the pilot can change the configuration of these systems at any time even when in the air. At some point logic needs to be added to the scripts that only allows this to happen when the wheels are down and speed is zero.

5a. There is now a menu to change the amount of fuel in the three internal gas tanks.

6, Aircraft weight and balance are affected by the external stores and the ammo load.

7. There are stall buffet and compressibility affects.

8. The engine control systems are complete and function as described in various pilots manuals for the P-51D with automatic mixture, automatic manifold pressure and automatic boost speed systems. It is also possible to over ride the auto boost speed control system. To really get a feel for these controls you need a throttle quadrant.

9. The tarball contains the USAF 1952 manual for the F-51D/H in the p51d/Docs directory. So far this is the most complete pilots manual I have found. Removed as of 03-31-2010 a download link for the manual is:

http://rapidshare.com/files/370389650/F ... 5_1952.pdf

10. The aircraft stalls and spins in a realistic manner. Spin recovery uses standard techniques and happens fairly quickly if the spin was not entered from an accelerated stall.

11. The aircraft has had the bombable stuff added and it should report damage over the net in MP but this has not been tested.

12. The JSBSim model has been developed and tested on V 2.0 of FGFS. There are reports that it does not work with V 1.9.1 but I have not tested this.

08-03-2010

The JSBSim P-51D has been merged into fgdata GIT and it will be part of the next FG release. This includes a few new additions in addition to what is listed for prior tarballs:

* Animated mic button

* Slightly improved propeller config.

* More realistic engine start procedure. This includes a functioning primer and battery-disconnect switch along with new hot spots and animations. This allows pilots to use the startup procedure from the pilots manual (USAF 1952 manual recommended).

* Improved more detailed aircraft help.

* Improved drop tank support code.

07-28-2010

I am now working in a clone of fgdata from GIT. This now has some enhancements that include things like:

* All fuel tanks including drop tanks are now functional. But this has had minimal testing.

* The fuel tank selector, fuel cut off value and fuel boost pump and switch are fully functional. The fuel boost pump switch now has hot spots.

* The tail wheel can now be castered or locked to the rudder controls by moving the stick forward to unlock and back to lock it as per the real thing.

* The engine coolant and engine cluster gages now have plausible readings under most operating circumstances.

* Fixed regressions in the YASim model.

This version requires FG GIT/next to be fully functional since FG GIT/next has an updated version of JSBSim and the model now uses some of the new JSBSim features.

To get a copy of the fgdata clone if you are not using GIT for your fgdata do this in a directory where you have space and write access:

git clone git://gitorious.org/~hvengel/fg/hvengel ... jsbsim.git master

Then just copy the AIrcraft/p51d directory from the fgdata clone to your $FGDATA/Aircraft/p51d directory.

On the other hand if you are using a GIT clone of fgdata for your local copy then just do:

git fetch git://gitorious.org/~hvengel/fg/hvengel ... jsbsim.git master:hvengel/p51d-jsbsim
git merge hvengel/p51d-jsbsim

and you will get the changes.

04-26-2010

3D model improvements by Guillaume. Now has rudder pedals with animation, improved landing gear and other 3d model changes. Also landing gear spring rate and damping should give more realistic results.

http://rapidshare.com/files/380452171/p ... 26.tar.bz2

04-05-2010

Added structural contact points so this should no longer sink into the ground when it crashes or when ground looped.

Added crash/failure code. The sim will halt or systems will fail if certain conditions occur.

Code cleanup in Systems/electrical.xml and Systems/propulsion.xml

04-02-2010

Fixed issue with parking brake.

03-31-2010 version 2

Added hot spots for mixture, RPM and flaps controls.

Added menu item and dialog to allow the pilot to control fuel levels in the three internal tanks. Because of a JSBSim bug in FGFS only the left internal wing tank is functional.

03-31-2010

Pulled pilots manual to make download smaller. It can be downloaded here:

http://rapidshare.com/files/370389650/F ... 5_1952.pdf

This version has 40% less sensitive brakes so it is easier to avoid ground looping but it will still ground loop if brakes are fully applied at low speeds. It also has a small adjustment to the RPM range of the propeller.

03-28-2010

This version has a new propeller configuration with much improved take off performance. It has a shorter take off run and easier handling during the take off than earlier versions did. Speeds and rate of climb at various altitude and power setting should be close to published data. Currently the glide is a little flatter than published data. This is a preliminary version with the new propeller configuration. It has had some tuning and testing but likely has some things that are not totally correct.
Last edited by hvengel on Tue Aug 03, 2010 3:08 pm, edited 10 times in total.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: P-51D JSBSim model developement

Postby simbabeat » Mon Mar 29, 2010 1:19 am

Sounds very promising and very well researched! Will test later.
User avatar
simbabeat
 
Posts: 3408
Joined: Sat Sep 12, 2009 12:19 am

Re: P-51D JSBSim model developement

Postby Canseco » Mon Mar 29, 2010 11:53 am

Any chance that you split file in two, one with aircraft and another with manual?
System specs:
AMD Ahtlon 64 X2 Dual Core 2.2 GHz, ASUS M2N4-SLI,3 GB DDR2 800 MHz
Nvidia GT240 1GB 1440x900, 25-30 fps
Canseco
 
Posts: 194
Joined: Wed Jan 06, 2010 12:53 pm
Callsign: Canseco
Version: Git
OS: GNU/Linux

Re: P-51D JSBSim model developement

Postby simbabeat » Mon Mar 29, 2010 12:21 pm

Ya it is a bit large.
User avatar
simbabeat
 
Posts: 3408
Joined: Sat Sep 12, 2009 12:19 am

Re: P-51D JSBSim model developement

Postby someguy » Mon Mar 29, 2010 2:44 pm

Impressive! Yes, it crashes 1.9.1 on load. It crashed 2.0 a few times after several minutes of flight, then settled down and ran reliably through several takeoff/landing cycles without respawning.

This is NOT an arcade plane, kiddies. Its realistic torque reaction is comparable to the F4U or Dave Culp's prop models, requiring trim adjustments in all 3 axes with every throttle or speed change. On landing, the brakes can only be applied in very short taps--tail lift is unavoidable at any speed.

Congrats on a model that's challenging but rewarding to fly. Consider making the brakes a bit less effective, though.
User avatar
someguy
 
Posts: 1650
Joined: Tue Nov 25, 2008 5:54 am
Location: USA
Version: 2019.1.1
OS: Mac OS X 10.11.6

Re: P-51D JSBSim model developement

Postby hvengel » Mon Mar 29, 2010 5:33 pm

Canseco wrote:Any chance that you split file in two, one with aircraft and another with manual?


I have so much documentation for this aircraft that it is almost overwhelming. It was very hard to find some of it and all of it required some amount of digging. There are really three different types of documentation that I have. These are:

1. Flight test and wind tunnel data -most of it from NACA but I do have a British flight test doc as well. Almost all of the NACA docs can be found on the NASA documents server but not all of them. RM-L625 (rudder tests) being one of the ones missing from the NASA server.

2. Pilots manuals and systems manuals for pilots (I have a 4 page manual for the K14 gun sight for example). These generally are harder to find than most of the materials in #1. I have 5 pilots manuals from 3 countries.

3. Maintenance and assembly documentation. This stuff is the hardest to find of all of this info.

There are also blue prints available on-line for a fee. I don't have these because I can't afford them but these would be very helpful if I had them. I don't think these could be made available if I had them.

I would like to make all of it that I have available in one location but even compressed it is very large. For example the pilots manual adds about 28 meg to the tarball. For reference the size of the model has grown to about 18 Meg compressed without any docs and is likely to get bigger as more stuff is added. All of the docs together in a compressed tarball are over 400meg. I am a little reluctant to split out the manual since I think it is the minimum requirement for pilot documentation. As systems get more realistic it will become difficult for new pilots to fly with out documentation and I think a pilots manual belongs in the Docs directory so that pilots can look things up if they don't understand how something works.

On the other hand for this development phase having a smaller tarball might make sense. RapidShare has a 200 meg limit for how much I can put up for downloading. So I clearly can not make everything available there but I can split out the manual at least for now.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: P-51D JSBSim model developement

Postby hvengel » Mon Mar 29, 2010 5:48 pm

someguy wrote:Impressive! Yes, it crashes 1.9.1 on load. It crashed 2.0 a few times after several minutes of flight, then settled down and ran reliably through several takeoff/landing cycles without respawning.

This is NOT an arcade plane, kiddies. Its realistic torque reaction is comparable to the F4U or Dave Culp's prop models, requiring trim adjustments in all 3 axes with every throttle or speed change. On landing, the brakes can only be applied in very short taps--tail lift is unavoidable at any speed.

Congrats on a model that's challenging but rewarding to fly. Consider making the brakes a bit less effective, though.


I will look into the brakes to see what I can do. I have not been able to find any JSBSim model that scales the brake inputs so I will have to dig into it a little. My first attempt resulted in the brakes being jittery. (Edit) I figured it out and the next tarball will have less sensitive brakes. It will still be possible to cause a nose over but only with full application of the brakes. I reduced the braking effectiveness by 40%.

The brakes even in the current tarball are sensitive but can be controlled at least with rudder pedals. They might be very difficult to deal with if you don't have a joystick axis (or two) for the brakes however.
Last edited by hvengel on Mon Mar 29, 2010 11:21 pm, edited 1 time in total.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: P-51D JSBSim model developement

Postby ethan3391 » Mon Mar 29, 2010 6:19 pm

As long as you are talking about real documents for the real aircraft, you may be able to submit this information to the creators of http://www.avialogs.com.
What one fool can do, another can. (simian proverb published in the book, Calculus Made Easy by, Silvanus P. Thompson)
ethan3391
 
Posts: 183
Joined: Fri Jul 04, 2008 11:21 pm
Location: Ga, USA

Re: P-51D JSBSim model developement

Postby simbabeat » Mon Mar 29, 2010 10:56 pm

Impressive! Yes, it crashes 1.9.1 on load. It crashed 2.0 a few times after several minutes of flight, then settled down and ran reliably through several takeoff/landing cycles without respawning.


What did the log say in 1.9.1 when it crashed.
User avatar
simbabeat
 
Posts: 3408
Joined: Sat Sep 12, 2009 12:19 am

Re: P-51D JSBSim model developement

Postby hvengel » Mon Mar 29, 2010 11:18 pm

ethan3391 wrote:As long as you are talking about real documents for the real aircraft, you may be able to submit this information to the creators of http://www.avialogs.com.


Interesting site. They have three of the docs that I have and I would be willing to upload the others that I have if I could figure out how to do it. I have 22 historic P-51 documents at this point.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: P-51D JSBSim model developement

Postby ethan3391 » Mon Mar 29, 2010 11:35 pm

From what I can tell you have to go through Benoit. Just go to the about avialogs page, and there is an email button.
What one fool can do, another can. (simian proverb published in the book, Calculus Made Easy by, Silvanus P. Thompson)
ethan3391
 
Posts: 183
Joined: Fri Jul 04, 2008 11:21 pm
Location: Ga, USA

Re: P-51D JSBSim model developement

Postby Vodoun da Vinci » Tue Mar 30, 2010 2:00 am

Awesome aircraft for us taildragger freaks, Hal. Thank you so much for taking the time to research and work on this model.

"VooDoo" da Vinci
FGFS version 2.4.0 on Windows 7
Primarily Flying Warbirds, Jet and Prop - Visit: http://www.fguk.eu
VooDoo's FGFS/FGUK Movies!: http://www.youtube.com/user/VooDoodaVinci?feature=mhee
"Imagination is more important than knowledge"
A. Einstein
User avatar
Vodoun da Vinci
Retired
 
Posts: 405
Joined: Thu Mar 25, 2010 3:29 pm

Re: P-51D JSBSim model developement

Postby hvengel » Wed Mar 31, 2010 4:17 pm

Bump - new tarball available. See first post for link.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: P-51D JSBSim model developement

Postby Vodoun da Vinci » Wed Mar 31, 2010 9:13 pm

Flew last night from KORD to Kansas City cruising at about 23000. Can't say enough good things about this model. Still some minor bugs but overall probably one of (if not *the*) most accurate FDM's in Taildragger Warbirds in FGFS.

I had an issue with the engine running out of power and stalling (the engine stopped but I could restart it!!) at 7500 feet...remember to set mixture at .7 (use the properties) or so as the default value of 1 seems to make an issue for now. I assume Hal will fix this as work progresses. It happened the other day and I couldn't figure out why I would get to about 8000' and run out of juice.

Awesome work.

"VooDoo" da Vinci
FGFS version 2.4.0 on Windows 7
Primarily Flying Warbirds, Jet and Prop - Visit: http://www.fguk.eu
VooDoo's FGFS/FGUK Movies!: http://www.youtube.com/user/VooDoodaVinci?feature=mhee
"Imagination is more important than knowledge"
A. Einstein
User avatar
Vodoun da Vinci
Retired
 
Posts: 405
Joined: Thu Mar 25, 2010 3:29 pm

Re: P-51D JSBSim model developement

Postby hvengel » Wed Mar 31, 2010 10:20 pm

Vodoun da Vinci wrote:Flew last night from KORD to Kansas City cruising at about 23000. Can't say enough good things about this model. Still some minor bugs but overall probably one of (if not *the*) most accurate FDM's in Taildragger Warbirds in FGFS.

I had an issue with the engine running out of power and stalling (the engine stopped but I could restart it!!) at 7500 feet...remember to set mixture at .7 (use the properties) or so as the default value of 1 seems to make an issue for now. I assume Hal will fix this as work progresses. It happened the other day and I couldn't figure out why I would get to about 8000' and run out of juice.

Awesome work.

"VooDoo" da Vinci


It is working as it should. This is one of those RTFM things since the pilots manual has an entire section about this. Setting the mixture to 1 is setting this in the Emergency Full Rich position. This will cause the engine to run too rich above sea level and as you found out the engine dies because of the rich mixture up around 7500 feet.

The mixture control has three positions:

Idle Cut Off <= 0.1.
Run between 0.1 and 0.9
Emergency Full Rich >= 0.9

The only time you should use Emergency Full Rich is when the automatic mixture system fails which will not happen with the current model. This is clearly documented in the Pilots Manual and this is one of the reasons that I included it in the tarball.

The only "fixes" this needs at this point is to add hotspots and keyboard mapping for the mixture control and also the RPM lever. And perhaps setting the start up default mixture to something other than Emergency Full Rich.

One other comment about this. All US WWII fighters used this same basic "injector carburetor" from Bendix with variations for aircraft and engine type. Today we would call this a mechanical throttle body fuel injection system. Under normal running conditions these units are fully automatic. I think this is the only FDM for FGFS that has this fully and correctly modeled. In addition only Packard built Merlins had this system so Spitfires and Hurricanes did not work this way since they has a conventional up draft carb. Canadian built Mosquitos had the Packard engines and also had this feature. This is why Spitfires would stop running when inverted or experiencing negative G but P-51's would keep running although they were limited to 10 seconds inverted because of the lack of a dry sump oil system.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Next

Return to Aircraft

Who is online

Users browsing this forum: colin_geniet, pjc and 1 guest