Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Wind tunnel  (Read 3452 times)

0 Members and 1 Guest are viewing this topic.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Wind tunnel
« on: March 23, 2015, 12:18:52 PM »

First look at the new test tool.

I have nicked one of the totally beautiful loading screens published on this site for a front end.





The gui allows you to set up any situation and run the simulation monitoring all flight dynamic variables. Still a lot to do but on it's way.



Logged

benitomuso

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2587
  • P.A.L.
Re: Wind tunnel
« Reply #1 on: March 23, 2015, 03:38:09 PM »

Nice F-4. Does it fly?
Logged

hello

  • member
  • Offline Offline
  • Posts: 287
  • aka Aufpassen! aka Alfie!
Re: Wind tunnel
« Reply #2 on: March 24, 2015, 02:01:22 AM »

NICE!
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Wind tunnel
« Reply #3 on: March 24, 2015, 03:15:42 AM »

Nice F-4. Does it fly?

Yes..... and no.

This is why I am having to write the wind tunnel. It flies perfectly .... up until about 200 feet. Then things start to go wrong.

I have looked at the code a hundred times and I can't see anything wrong, so I am having to get forensic. With such a complex flight dynamics model, it's currently about 400,000 lines of code, a simple mistake can be a nightmare to find.

By having a wind tunnel, I can test the aerodynamics without any of the other systems.

It also means that when the FDM is finished, modders can work out bugs in aircraft really quickly.

For example look at the lift code from the F4.

Code: [Select]
        /// <summary>
        /// Calculates generated lift
        /// </summary>
        /// <returns>Lift</returns>
        public override double Lift()
        {
            double lift = 0;
            double q_w =  aux.Getqbar() * WingArea;

            /// Get the lift due to alpha
            double t = MathUtils.TableLookup1D(aux.Getalpha(), lda_row, lda_data);
            lift += t;

            /// Lift due to elevator deflection
            lift += 0.25 * q_w * fcs.GetDePos(2);

            /// Delta lift due to flaps
            lift += 0.4 * q_w * fcs.GetDfPos(2);

            /// Lift due to boundary layer control
            lift += 0.15 * q_w * aux.AircraftVariables["Boundary layer control"];

            /// Delta lift due to speedbrake
            lift += -0.05 * q_w * fcs.GetDsbPos(2);

            return lift;
        }

It's pretty standard code. You could use most of that in any aircraft and just tweak the constants. The only none standard system is the boundary layer control. To take care of situations like that, I have added a modder controlled variable pool. You can create your own variables and store them in the pool. Anything in the pool can be monitored by the wind tunnel and will be recorded on a save game.

The code is in C#, which actually means you can use the wind tunnel to work out your constants, then port the code to Java and drop it in IL2
Logged
Pages: [1]   Go Up
 

Page created in 0.033 seconds with 26 queries.