Board index FlightGear Development Aircraft

F-16 upgraded to 'production' status

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

Re: F-16 upgraded to 'production' status

Postby erik » Sat Feb 25, 2012 11:04 pm

Yes that would explain a lot, but I was under the impression there was a scaled down version of the F-16 for AI purposes. It looks like a good idea to create one 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: 2245
Joined: Thu Nov 01, 2007 2:41 pm

Re: F-16 upgraded to 'production' status

Postby Oby » Sat Feb 25, 2012 11:07 pm

Just a quick reminder: I posted a bug report about a page back concerning the wrong paths to instruments in the panel. Did you see that message?
Oby
 
Posts: 28
Joined: Mon Jun 14, 2010 9:39 pm

Re: F-16 upgraded to 'production' status

Postby gooneybird » Sun Feb 26, 2012 12:27 am

erik wrote in Sat Feb 25, 2012 11:04 pm:I was under the impression there was a scaled down version of the F-16 for AI purposes.


There are several files in the AI folder but from what I can understand they still load the cockpit and sub models.
My Github repository (mostly AI stuff) https://github.com/gooneybird47
User avatar
gooneybird
 
Posts: 3046
Joined: Sat May 31, 2008 2:57 pm

Re: F-16 upgraded to 'production' status

Postby Ernest1984 » Sat Mar 24, 2012 6:08 pm

Hello.
I think the fdm is a little bad, i know the real aircraft's approach speed is something like 160-175kts, final with some 140kts, but in FG F-16, below the 175kts the nose is going too high so it's hard to control the direction (you can't see the runway while approaching). Can someone tell me if there's a possibility to change this thing (and where exactly, which lines in which xml file?), so the nose will stay a little lower? I'm using the speedbrakes of course.
EPWA-hub: ERJ-195 clsgn: ERNIE
-----------------------------------
Around The World with B1900D!
callsign: AROUNDw - currently suspended till the FG will have a proper look on different locations
User avatar
Ernest1984
 
Posts: 438
Joined: Wed Dec 01, 2010 4:47 pm
Location: Poland / Canada
Callsign: ERNIE
Version: 2.10
OS: Mac OS X 10.8.2

Re: F-16 upgraded to 'production' status

Postby redneck » Tue Mar 27, 2012 12:15 am

I'm pretty sure you only use the speedbrakes in the air when you need to slow down quickly. It's been a while since I've flown the F-16. From what I remember, it seems the speedbrakes did produce lift... a heck of a lot of lift. I typically would approach the runway at 250 KIAS. It's the only way I've been able to approach straight-in with the runway in sight. If I were to cut the power as I get over the runway, and then engage the speedbrakes, I'd glide over (usually) the whole runway! I kinda don't think this is supposed to happen either.

As for how to tweak it, this aircraft's FDM is JSBSim, so it will help if you have unusually extensive knowledge of aerodynamics. If you don't you're not necessarily out of luck, but it's gonna take a lot of (possibly frustrating) trial and error. Basically, you need to lower the stall speed for flight with a g-load of 1. However, there is no property in the JSBSim file that determines this value directly. It uses formulas to determine lift and drag coefficients, pitch, yaw, and roll moments, etc. So, you'll need to play around a little (and by a little, I mean A LOT).

The main things that determine when a plane has stalled are lift and drag. So, the plane seems fine at high speeds, but not at low speeds. In that case, I would leave all values relating to the wing and elevons alone. You'll want to look for the effects of flaps. Just open up FGROOT/Aircraft/f16/f16.xml with a text editor, and do a search for the word "flap". You will want to back it up in case you are unable to undo any changes you make for some reason. I'd play with the lift first, before the drag. You're going to find a table near most instances of the word "flap". Make sure, before you edit, that you are only changing lift or drag, and not something else, like pitch moment or something. Only the lift and drag will help. You'll want to increase the lift. There's a very quick and easy way to do this. Look underneath the table for a number between value tags. If there isn't one there, simply add one, making sure to insert it inside the product tags. This value will multiply all the values in the table by the value you specify. It will be easiest if you just change one value at a time so you can easily observe its effects. After you edit a value, save the file, launch FG, and do a test flight. I've been told there's a way to edit these values at runtime, but I was never told exactly how that's done. Note that there's a limit to how much you can increase the lift before the plane starts behaving very strangely, like bouncing on the runway like a monster truck. If this happens, and you still have not managed to get the plane to stall or approach at the speed you want, then, first decrease the lift to some value that results in better behavior, and then start increasing the drag. There aren't any really weird side effects from drag that I know of. The worst that can happen is that there will be so much drag that the plane will be unable to accelerate fast enough to get off the runway, or will instantly stall with no chance of recovery on approach the moment the flaps extend. If you've played around with both lift and drag on all the various kinds of flaps, and you are still unsatisfied, only then should you mess with the wing and elevons. But be cautious. Changing the coefficients produced by the wing will effect the entire flight envelope, so if you get it flying the way it should at low speeds, it may not necessarily fly well at all at high speeds, or even at normal cruise! For example, if the wing produces too much lift, you may find that the plane cruises at a nose-down attitude, which would be totally bizarre for the F-16.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3617
Joined: Mon Feb 02, 2009 3:17 am
Location: Pennsylvania, USA
Version: 240

Re: F-16 upgraded to 'production' status

Postby Ernest1984 » Tue Mar 27, 2012 12:39 pm

Thank You for the instructions, i will play with it in a moment.
I always open the speedbrakes at around 220-230kts, when 20nm out to the runway (aproximately), so i am on final with the airplane stabilized (opening speedbrake just before the final will make you bounce for a while, which cause some troubles, or overshooting the touchdown point), when i'm 5nm out i try to lower the speed to the actual real final-app speed, what is a no-go in Flight Gear's F-16 unfortunatelly...

That's what i found over the internet:
"Our typical approach speed 3 miles back from the runway on a 3 degree approach (normal straight in or ILS) would be from around 140 knots to 180 knots. The speed depends on the fuel and stores remaining on the jet (weight)." - F-16's pilot words.
and also:
"F16 Landing speed 133kts+4kts per 1000lbs of fuel/stores(A-model), so mostly around 141kts(+20kts= final turn speed)"

And with 180kts it's ok on FlightGear F-16 with the speedbrakes engaged, but below that, the nose is going hard to the top, that's why i wanna change it a little. If i will make it to be stable and the view in sight will be clear with 150-160kts, i will be happy enough ;)

Maybe another option is to make flaps control manually, not auto-flaps, as it is at the moment? I will check in some manual what are the real airplane flap levels.

EDIT:

so i found something like this:

Code: Select all
<function name="aero/coefficient/CLDflaps">
                <description>Delta_Lift_due_to_trailing_edge_flaps</description>
                <product>
                    <property>aero/qbar-psf</property>
                    <property>metrics/Sw-sqft</property>
                    <property>fcs/flaperon-mix-rad</property>
                    <property>aero/function/kCLge</property>
                    <value>0.3500</value>
                </product>
            </function>


where i tried to change the "value" section from 0.3500 to 0.4500 first, but that gave no action. So i thought maybe to change from 0.3500 to 0.2500, but this also gave nothing...

There are also stuffs like that:

Code: Select all
<function name="aero/coefficient/CLDlef">
                <description>Lift_due_to_leading_edge_flap_deflection</description>
                <product>
                    <property>aero/qbar-psf</property>
                    <property>metrics/Sw-sqft</property>
                    <property>fcs/lef-pos-rad</property>
                    <property>aero/function/kCLge</property>
                      <table>
                          <independentVar>aero/alpha-rad</independentVar>
                          <tableData>
                              -0.1750  -0.0120
                              -0.0870  -0.0040
                              0.0000  0.0020
                              0.0870  0.0070
                              0.1750  0.0120
                              0.2620  0.0180
                              0.3490  0.0220
                              0.4360  0.0250
                              0.5240  0.0260
                              0.6110  0.0280
                              0.6980  0.0280
                              0.7850  0.0250
                          </tableData>
                      </table>
                </product>
            </function>


which i completely do not understand (too much numbers without any reference)... And i suppose this is the thing what is needed to be changed, but i don't know which numbers and what kind of values exactly.
EPWA-hub: ERJ-195 clsgn: ERNIE
-----------------------------------
Around The World with B1900D!
callsign: AROUNDw - currently suspended till the FG will have a proper look on different locations
User avatar
Ernest1984
 
Posts: 438
Joined: Wed Dec 01, 2010 4:47 pm
Location: Poland / Canada
Callsign: ERNIE
Version: 2.10
OS: Mac OS X 10.8.2

Re: F-16 upgraded to 'production' status

Postby Ernest1984 » Wed Mar 28, 2012 8:25 am

Anyone? :S
EPWA-hub: ERJ-195 clsgn: ERNIE
-----------------------------------
Around The World with B1900D!
callsign: AROUNDw - currently suspended till the FG will have a proper look on different locations
User avatar
Ernest1984
 
Posts: 438
Joined: Wed Dec 01, 2010 4:47 pm
Location: Poland / Canada
Callsign: ERNIE
Version: 2.10
OS: Mac OS X 10.8.2

Re: F-16 upgraded to 'production' status

Postby mr_no » Wed Mar 28, 2012 2:14 pm

I will try to see what that could be. I want that fixed too.
Last edited by mr_no on Wed Mar 28, 2012 2:36 pm, edited 1 time in total.
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

Re: F-16 upgraded to 'production' status

Postby Oby » Wed Mar 28, 2012 2:29 pm

Did you ever get around to fixing this: (?)
Oby wrote in Fri Feb 17, 2012 10:16 pm:A quick bug report for the F16. I downloaded the package available on the flightgear.org website, extracted it, and put it in an addo-aircraft folder. (FG_AIRCRAFT, as introduced by recent flightgear versions).

However, the F16 seems to presume that it is installed in the regular Aicraft directory within the FGFS folder. When I have it in my addon aircraft folder, and select it in FGrun, the following error message appears:
Code: Select all
Failed to load 3d model at /usr/share/flightgear/../../../../Instruments-3d/altimeter/altimeter.ac


I have identified the error in several XML files in f16/Models/Cockpit/Instruments/
Altimeter.xml
Code: Select all
 <path>../../../../Instruments-3d/altimeter/altimeter.ac</path>

stdby-adi.xml
Code: Select all
<path>../../../../Instruments-3d/standby-adi/stdby-adi.ac</path>


The error is also present in f16/Models/Cockpit/Avionics/EWS
Code: Select all
<path>../../../../../Instruments-3d/rwr/rwr.ac</path>


These should be written with an absolute, rather than a relative path.


Suggested fix:
REPLACE (e.g.)
Code: Select all
<path>../../../../../Instruments-3d/rwr/rwr.ac</path>

WITH
Code: Select all
<path>/Aircraft/Instruments-3d/rwr/rwr.ac</path>

(I have no experience coding XML files for flightgear, so this might not be the best solution. But it works on my Ubuntu Linux 10.04 flightgear 2.4.0 installation).
Oby
 
Posts: 28
Joined: Mon Jun 14, 2010 9:39 pm

Re: F-16 upgraded to 'production' status

Postby mr_no » Wed Mar 28, 2012 4:16 pm

Ernest1984,
I've made these changes to the fdm.
This will make it fly easier on lower speeds (ca 150):
Code: Select all
<function name="aero/coefficient/CLDlef">
                <description>Lift_due_to_leading_edge_flap_deflection</description>
                <product>
                    <property>aero/qbar-psf</property>
                    <property>metrics/Sw-sqft</property>
                    <property>fcs/lef-pos-rad</property>
                    <property>aero/function/kCLge</property>
                      <table>
                          <independentVar>aero/alpha-rad</independentVar>
            <tableData>
                              -0.1750  -0.0120
                              -0.0870  -0.0040
                              0.0000  0.0020
                              0.0870  0.0070
                              0.1750  0.4320
                              0.2620  0.8580
                              0.3490  0.0930
                              0.4360  0.1350
                              0.5240  0.1560
                              0.6110  0.1680
                              0.6980  0.1780
                              0.7850  0.1850
                          </tableData>
                      </table>
                </product>
            </function>

0.2620 is maximum and it never gets more for some reason...

You also must lift the sit up with U/u and hold the aircraft at ca 20-30 degree pitch.
U/u is a little broken (it will not reset to start position) so I replace and fix it with this:
Code: Select all
<key n="85">
     <name>U</name>
     <desc>Seat Down</desc>
     <binding>
      <command>property-adjust</command>
      <property>controls/seat/vertical-adjust</property>
      <step type="double">-0.01</step>
      <min type="double">0</min>
      <max type="double">0.12</max>
      <condition>
        <equals>
         <property>sim/current-view/internal</property>
         <value>true</value>
        </equals>
      </condition>
     </binding>
     <binding>
      <condition>
        <equals>
         <property>sim/current-view/view-number</property>
         <value>0</value>
        </equals>
      </condition>
      <command>property-adjust</command>
       <property>sim/current-view/y-offset-m</property>
       <step type="double">-0.01</step>
       <min type="double">0.94</min>
       <max type="double">1.105</max>
       <property>sim/current-view/z-offset-m</property>
       <step type="double">-0.0033</step>
       <min type="double">-4</min>
       <max type="double">-3.96</max>
     </binding>
    </key>
    <key n="117">
     <name>u</name>
     <desc>Seat Up</desc>
     <binding>
      <command>property-adjust</command>
       <property>controls/seat/vertical-adjust</property>
        <step type="double">0.01</step>
        <min type="double">0</min>
        <max type="double">0.12</max>
      <condition>
       <equals>
        <property>sim/current-view/internal</property>
        <value>true</value>
       </equals>
      </condition>
     </binding>
     <binding>
      <condition>
       <equals>
        <property>sim/current-view/view-number</property>
        <value>0</value>
       </equals>
      </condition>
      <command>property-adjust</command>
       <property>sim/current-view/y-offset-m</property>
       <step type="double">0.01</step>
       <min type="double">0.94</min>
       <max type="double">1.105</max>
       <property>sim/current-view/z-offset-m</property>
       <step type="double">0.0033</step>
       <min type="double">-4</min>
       <max type="double">-3.96</max>
     </binding>
    </key>
   </keyboard>
  </input>
 
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

Re: F-16 upgraded to 'production' status

Postby mr_no » Wed Mar 28, 2012 4:28 pm

You can practice flying level with 150 kts, just hold nose/seat up and speed break on and gear down.
This is approximately what landing/flight should look like.

Image
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

Re: F-16 upgraded to 'production' status

Postby Ernest1984 » Wed Mar 28, 2012 4:47 pm

Yeah but check out what happened to Your HUD.

Anyways, i'll try your settings, but maybe without changing seat level.
EPWA-hub: ERJ-195 clsgn: ERNIE
-----------------------------------
Around The World with B1900D!
callsign: AROUNDw - currently suspended till the FG will have a proper look on different locations
User avatar
Ernest1984
 
Posts: 438
Joined: Wed Dec 01, 2010 4:47 pm
Location: Poland / Canada
Callsign: ERNIE
Version: 2.10
OS: Mac OS X 10.8.2

Re: F-16 upgraded to 'production' status

Postby mr_no » Wed Mar 28, 2012 5:22 pm

Hud is like that made by the author. He didnt want it moving (says so in hud file). Anyway it's like that only when you lift the seat (u) when flying slow before landing. Otherwise you keep seat low or get it low (U) and the hud is normal.
My code fixes is so it resets correctly.

Btw, it's 5-10 degree pitch not 20-30. And you have to lift the seat or you can't see the runway or what's in front of you.
http://www.youtube.com/watch?v=Y8w29qbwrlM
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

Re: F-16 upgraded to 'production' status

Postby redneck » Wed Mar 28, 2012 6:28 pm

Typically, in any plane, you flare to only 4 degrees, approaching with the nose at no more than 2 degrees, even nose down sometimes. I'll take a look at this myself, and see what I can come up with. It is unbelievable that the pilot should be expected to raise the seat just to keep the runway in sight. Also, in the video, it appears as though that F-16 was approaching much faster than normal. Look at how long it's held in flare. That's unusual. Normally, a plane will float above the runway for only a couple seconds before gently touching down.
Ernest1984 wrote in Tue Mar 27, 2012 12:39 pm:i completely do not understand (too much numbers without any reference)

Sorry. The reference is there. It seems you don't know where to look for it. The first column is alpha radians. You can see that in the following code:
Code: Select all
<independentVar>aero/alpha-rad</independentVar>

The second column is the resulting effect on lift due to leading edge flap deflection (I wonder why they don't simply call it "lift due to slat deflection"), as seen here:
Code: Select all
<description>Lift_due_to_leading_edge_flap_deflection</description>

So, as alpha increases, the lift will increase, but only until a critical value is reached, and then lift is pretty much destroyed, resulting in a stall.
Anyway, I'll see what I can find, and get back to you guys.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3617
Joined: Mon Feb 02, 2009 3:17 am
Location: Pennsylvania, USA
Version: 240

Re: F-16 upgraded to 'production' status

Postby mr_no » Wed Mar 28, 2012 7:05 pm

Hey, while you're at it, it would be nice if HUD would stay in place when seat is lifted.
Also use my fix above for correct resetting.
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 7 guests