Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 10 11 12 [13] 14 15 16 ... 19   Go Down

Author Topic: New flight sim project  (Read 53386 times)

0 Members and 1 Guest are viewing this topic.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #144 on: November 06, 2014, 02:13:56 AM »

Oh I should show you what the constructor for a fully populated B17 looks like.

Code: [Select]
public B17_D()
        {
            state.parent = this;
            //=========================================================
            // setup aircraft metrics
            state.WingArea = 1420;
            state.WingSpan = 103.75;
            state.WingIncidence = 2;
            state.cbar = 13.69;
            state.vXYZrp = new Simulation.MathUtils.Vector3(22.5 * 12, 0, 0);
            state.vXYZep = new Simulation.MathUtils.Vector3(11 * 12, -2 * 12, 3.5 * 12);
            state.vXYZvrp = new Simulation.MathUtils.Vector3(0, 0, 0);
            state.Derive();

            //=========================================================
            // setup mass balance
            state.MassBalance.Load(400000, 250000, 600000, 0, 0, 0, 36100, 22, 0, -0.5);

            //=========================================================
            // add ground reactions
            state.landing_gear.Add(new Gear("LEFT_MAIN", Gear.ContactType.ctBOGEY, 30000, 3000, 0.5, 0.02, 0.8, 0, true, new Vector3(20.9, -10, -8.5), Gear.BrakeGroup.bgLeft, 0.0666666, 0.2, 0));
            state.landing_gear.Add(new Gear("RIGHT_MAIN", Gear.ContactType.ctBOGEY, 30000, 3000, 0.5, 0.02, 0.8, 0, true, new Vector3(20.9, 10, -8.5), Gear.BrakeGroup.bgRight, 0.0666666, 0.2, 1));
            state.landing_gear.Add(new Gear("TAIL", Gear.ContactType.ctBOGEY, 30000, 3000, 0.5, 0.02, 0.8, 5, true, new Vector3(52.5, 0, -4.75), Gear.BrakeGroup.bgNone, 0.0666666, 0.2, 2));
            state.landing_gear.Add(new Gear("LEFT_WING", Gear.ContactType.ctSTRUCTURE, 65500, 13100, 0.5, 0.8, 0.8, 0, true, new Vector3(24, -51.9, 1.9), Gear.BrakeGroup.bgNone, 0.0666666, 0.2, 3));
            state.landing_gear.Add(new Gear("RIGHT_WING", Gear.ContactType.ctSTRUCTURE, 65500, 13100, 0.5, 0.8, 0.8, 0, true, new Vector3(24, 51.9, 1.9), Gear.BrakeGroup.bgNone, 0.0666666, 0.2, 4));


            //=========================================================
            // Create all four engines and add a propeller to each
            for (int i = 0; i < 4; i++)
            {
                engines[i] = new R_1820_97(state);
                engines[i].EngineNumber = i;
                engines[i].thruster = new HS139_V();
                switch (i)
                {
                    case 0:
                        engines[i].thruster.vXYZn = new Simulation.MathUtils.Vector3(10.1, -21.6, -0.4);
                        engines[i].vXYZn = new Simulation.MathUtils.Vector3(10.1, -21.6, -0.4);
                        engines[i].FuelFeeds.Add(0);
                        engines[i].FuelFeeds.Add(1);
                        engines[i].FuelFeeds.Add(2);
                        engines[i].FuelFeeds.Add(3);
                        engines[i].FuelFeeds.Add(4);
                        engines[i].FuelFeeds.Add(8);
                        break;
                    case 1:
                        engines[i].thruster.vXYZn = new Simulation.MathUtils.Vector3(8.6, -10.0, -0.7);
                        engines[i].vXYZn = new Simulation.MathUtils.Vector3(8.6, -10.0, -0.7);
                        engines[i].FuelFeeds.Add(5);
                        engines[i].FuelFeeds.Add(6);
                        engines[i].FuelFeeds.Add(7);
                        engines[i].FuelFeeds.Add(9);
                        engines[i].FuelFeeds.Add(10);
                        break;
                    case 2:
                        engines[i].thruster.vXYZn = new Simulation.MathUtils.Vector3(8.6, 10.0, -0.7);
                        engines[i].vXYZn = new Simulation.MathUtils.Vector3(8.6, 10.0, -0.7);
                        engines[i].FuelFeeds.Add(11);
                        engines[i].FuelFeeds.Add(17);
                        engines[i].FuelFeeds.Add(18);
                        engines[i].FuelFeeds.Add(19);
                        engines[i].FuelFeeds.Add(21);
                        break;
                    case 3:
                        engines[i].thruster.vXYZn = new Simulation.MathUtils.Vector3(10.1, 21.6, -0.4);
                        engines[i].vXYZn = new Simulation.MathUtils.Vector3(10.1, 21.6, -0.4);
                        engines[i].FuelFeeds.Add(12);
                        engines[i].FuelFeeds.Add(13);
                        engines[i].FuelFeeds.Add(14);
                        engines[i].FuelFeeds.Add(15);
                        engines[i].FuelFeeds.Add(16);
                        engines[i].FuelFeeds.Add(20);
                        break;
                   
                }
                engines[i].thruster.Init();
               
            }
            //====================================================
            // Create state variables for all engines
            state.throttle_pos = new double[4];
            state.mixture_pos = new double[4];
            state.prop_advance = new double[4];

            for (int i = 0; i < 4; i++)
            {
                state.throttle_pos[i] = 0;
                state.mixture_pos[i] = 0;
                state.prop_advance[i] = 0;
            }
            //====================================================
            // Add all the fuel tanks
            state.fueltanks.Add(new Systems.Tank("Left outboard 1", 24.7 * 12, -45.8 * 12, 2 * 12, 328, 328, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left outboard 2", 24.7 * 12, -43.8 * 12, 2 * 12, 328, 328, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left outboard 3", 24.7 * 12, -41.9 * 12, 2 * 12, 328, 328, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left outboard 4", 24.7 * 12, -40.0 * 12, 2 * 12, 328, 328, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left outboard 5", 24.7 * 12, -35.8 * 12, 2 * 12, 410, 410, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left inboard 6", 24.7 * 12, -33.9 * 12, 2 * 12, 410, 410, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left inboard 7", 24.7 * 12, -32.0 * 12, 2 * 12, 410, 410, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left inboard 8", 24.7 * 12, -30.1 * 12, 2 * 12, 410, 410, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left outboard engine 9", 22.4 * 12, -25.8 * 12, 12, 2581, 2581, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left inboard engine 10", 22.4 * 12, -14.3 * 12, 12, 1293, 1293, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Left inboard feeder 11", 25.0 * 12, -14.3 * 12, 12, 1287, 1287, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right inboard feeder 12", 25.0 * 12, 14.3 * 12, 12, 1287, 1287, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right outboard 13", 24.7 * 12, 45.8 * 12, 2 * 12, 328, 328, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right outboard 14", 24.7 * 12, 43.8 * 12, 2 * 12, 328, 328, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right outboard 15", 24.7 * 12, 41.9 * 12, 2 * 12, 328, 328, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right outboard 16", 24.7 * 12, 40.0 * 12, 2 * 12, 328, 328, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right outboard 17", 24.7 * 12, 35.8 * 12, 2 * 12, 410, 410, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right inboard 18", 24.7 * 12, 33.9 * 12, 2 * 12, 410, 410, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right inboard 19", 24.7 * 12, 32.0 * 12, 2 * 12, 410, 410, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right inboard 20", 24.7 * 12, 30.1 * 12, 2 * 12, 410, 410, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right outboard engine 21", 22.4 * 12, 25.8 * 12, 12, 2581, 2581, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
            state.fueltanks.Add(new Systems.Tank("Right inboard engine 22", 22.4 * 12, 14.3 * 12, 12, 1293, 1293, 32, Tank.TankType.ttFUEL, null, Tank.GrainType.gtUNKNOWN, 0, 0, 0));
           
           
        }
Logged

VF111Sundowner

  • Virtual Ninja!
  • member
  • Offline Offline
  • Posts: 388
  • Why can't everything be Rocket Propelled!
Re: New flight sim project
« Reply #145 on: November 06, 2014, 04:51:58 AM »



Any screen shots Stainless of the aircraft in the game world?
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #146 on: November 06, 2014, 05:50:55 AM »

not yet.

I'm working on two parts of the game. The physics is the main part.

This will come with an app that let's you test the aerodynamics of the aircraft. So you'll get a display of the aircraft and you can fly it but you only get a fixed view of the aircraft. Sort of like a wind tunnel.

This will display forces and warnings so you can tweak your flight model parameters.

On the other part I am doing the flight control system and cockpit display.

The cockpit display will have two modes. The standard 3D in the cockpit mode you already have in IL2 and a zoomed mode.

The zoomed mode gives you a 2D close up of parts of the cockpit. Mainly the various panels. This is interactive so you can do fuel management, radio management, feather props, use fire extinguishers etc. with mouse clicks as well as key strokes.

I'll put something up over the weekend.
Logged

slipper

  • Modder
  • member
  • Offline Offline
  • Posts: 920
Re: New flight sim project
« Reply #147 on: November 06, 2014, 06:18:52 AM »

sounds amazing stainless, looking forward to this a lot.

I was wondering as you mention 2D clickable cockpits, will any of this programming eventually allow realistic electronic aids to be implemented? such as nav systems (LORAN, GEE,etc), Radar(Air intercept and ground mapping), and electronic warfare equipment? Or is this limited to flight modelling?

If so would the user be able to add such aids?


regards

slipper
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #148 on: November 06, 2014, 09:03:48 AM »

Yes,

I have an interface that allows any aircraft to get details of what is in the world, and all it's flight parameters.

I also have an interface that allows you to create "instruments" which get compiled into the game at run time. The combination of the two means you can write your own radar / sensors and display them in one of the 2D cockpit modes.

You can define as many 2D cockpit views as you want and link them into the display by calling a couple of functions. It's really easy, well I think so anyway.

I have been thinking about how to do seeker sensitivity, not come up with anything nice yet, but eventually I will have a set of functions you can call from within the "instrument" which will give you the sort of data you need to render something.
Logged

glynn007

  • member
  • Offline Offline
  • Posts: 22
Re: New flight sim project
« Reply #149 on: November 06, 2014, 03:41:36 PM »

I am getting such a warm fuzzy feeling about this thread.

Go! Stainless Go!
Logged

slipper

  • Modder
  • member
  • Offline Offline
  • Posts: 920
Re: New flight sim project
« Reply #150 on: November 08, 2014, 02:29:44 PM »

Great news stainless, sounds amazing mate exiting times ahead.


slipper
Logged

Chaoic16

  • Modder
  • member
  • Offline Offline
  • Posts: 930
Re: New flight sim project
« Reply #151 on: November 08, 2014, 08:53:33 PM »

Stainless,

Just wondering, will we be able to switch between different models of simple and complexity part of simulation?  I described it here:

https://www.sas1946.com/main/index.php/topic,42378.msg486324.html#msg486324

I haven't gotten your reply on this, so I thought I'd bring this up, just in case you haven't seen it yet.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #152 on: November 10, 2014, 02:17:04 AM »

Yes, eventually.

I need to start with the full on you have to do everything including wiping the pilots swetty brow version first, then I will write an AI to do some of the boring stuff.

This morning I added oxygen systems to the simulation. You can add an oxygen system for as few or as many of the crew as you wish. Each one can be damaged individually, which makes for interesting game play decisions.

If the oxygen system for the tail gunner gets hit, do you descend to keep him alive? Or do you stay on mission?
Logged

DarkBlueBoy

  • Supporter
  • member
  • Offline Offline
  • Posts: 674
  • Learning slowly...
Re: New flight sim project
« Reply #153 on: November 10, 2014, 02:38:48 AM »

Wow. Just wow Stainless. :)
Logged

rruff

  • member
  • Offline Offline
  • Posts: 135
  • The only way to fly...
Re: New flight sim project
« Reply #154 on: November 10, 2014, 09:30:53 AM »

I'm in awe of what you are trying to acheive here... best wishes for success!
Logged

Chaoic16

  • Modder
  • member
  • Offline Offline
  • Posts: 930
Re: New flight sim project
« Reply #155 on: November 10, 2014, 12:09:29 PM »

Yes, eventually.

I need to start with the full on you have to do everything including wiping the pilots swetty brow version first, then I will write an AI to do some of the boring stuff.

This morning I added oxygen systems to the simulation. You can add an oxygen system for as few or as many of the crew as you wish. Each one can be damaged individually, which makes for interesting game play decisions.

If the oxygen system for the tail gunner gets hit, do you descend to keep him alive? Or do you stay on mission?

THIS IS GREAT NEWS!  Excellent and I really am so excited witnessing this epic simulation being in development!  I am so excited about testing this great project simulation whenever you have it ready for us to test it!

 :) :) :)
Logged
Pages: 1 ... 10 11 12 [13] 14 15 16 ... 19   Go Up
 

Page created in 0.053 seconds with 25 queries.