Board index FlightGear Development Aircraft

Airbus A320neo (A319,A320,A321)

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

Re: Airbus A320neo (A319,A320,A321)

Postby omega95 » Sun Apr 08, 2012 5:31 pm

Hydraulics are fluids in the aircraft which control the surfaces. Pumps move the fluid around and then that moves the surfaces. It's pretty simple and straight forward- we just need to code the pumps and stuff, and ofcourse some heat based stuff. As for pneumatics, we just need some basic cooling systems.

About the mCDU, I was planning to make a whole new separate Airbus mCDU. I found a pretty good CDU simulator and I'll make this CDU like that. :)

But first, let me finish the cockpit. :P
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: Airbus A320neo (A319,A320,A321)

Postby bicyus » Sun Apr 08, 2012 5:43 pm

omega95 wrote in Sun Apr 08, 2012 5:31 pm:Hydraulics are fluids in the aircraft which control the surfaces. Pumps move the fluid around and then that moves the surfaces.

xD obviously i know what are hidroulics!! xD :D
i was just, joking! coz there is nothing! xD
User avatar
bicyus
 
Posts: 116
Joined: Fri Nov 25, 2011 4:11 pm
Location: Bilbao
Callsign: Bicyus
Version: 2.6
OS: Ubuntu Linux

Re: Airbus A320neo (A319,A320,A321)

Postby omega95 » Mon Apr 09, 2012 11:06 am

I've had some really good progress on the fly-by-wire and the Airbus Flight Control Laws. I've used data from http://www.airbusdriver.net to work out the flight modes, and different laws. Here's a basic idea of what happens, when it happens and how it happens. (I'll keep this as a small doc to the flight control system)

-------------------------------------- Airbus Flight Control System ---------------------------------------

The Airbus Flight Control System uses a "fly-by-wire" to transmit side-stick input into the aircraft's control surfaces' servos. These inputs are modified using certain system algorithms and then converted to control surface position.

Airbus divides the Flight Control system algorithms into several flight laws-

1. NORMAL LAW

Summary: The Normal Law is active during normal flight conditions. A single system failure would still mean the aircraft flies according to the normal law. While using this law, the fly-by-wire has 3-axis control, provides flight envelope and load limit protection. It has 3 modes according to phases of flight.

a. Ground Mode

> Active when aircraft is on ground to about 250 ft AGL after take-off
> Side-stick Input --> Control Surface Position

b. Flight Mode

> Active when aircraft passes 250 AGL after take-off
> Side-stick Input --> Load Factor (G-Force) --> Control Surface Position
> With Side-stick neutral, aircraft maintains 1g pitch load and 0 deg/s roll
> Pitch-trim is not required, aircraft stabilizes with elevators
> Side-stick Pitch Deflection commands g-force (-0.75 at full forward and 2.75 at fully pulled back)
> Side-stick Roll Deflection commands roll-rate (30 deg/s at full deflection)
> Load Factor and Roll-rate are independant of airspeed

c. Flare Mode

> Transition occurs at 50 ft AGL and changes to Ground mode after touch down
> At 50 ft, system memorizes pitch and progressively changes according to throttle input to give a smooth touchdown
> In case of a go-around, transition to flight mode occurs at 50 ft AGL.

- Normal Law Protections

a. Load Factor Limitation

> Prevents aircraft from overstressing even if side-stick is fully deflected

b. Attitude Protections

> Pitch Limits to 30 degrees up and 15 degrees down
> With side-stick deflected all the way (roll-axis), roll limits to 67 degrees
> If side-stick is NOT deflected all hte way, roll limits to 33 degrees

2. ALTERNATE LAW

Summary: The alternate law is active if multiple system failures occur. In case of alternate law, ECAM displays 'ALTN LAW: PROT LOST'. This law too is active in different ways during different flight phases-

a. Ground Mode

> Performs similar to NORMAL LAW

b. Flight Mode

> Performs simular to NORMAL LAW when landing gears are retracted.
> Pitch control shifts to DIRECT LAW when landing gears are lowered for landing.

c. Flare Mode

This mode does NOT exist- pitch control uses DIRECT LAW for manual flare.

- Alternate Law Protections

a. Load Factor Limitation

> Similar to that under NORMAL LAW

b. Attitude Protection

> Attitude protection is lost under ALTERNATE LAW
> In case of extreme low speeds, aircraft reduces pitch but CAN BE OVERRIDDEN

3. ABNORMAL ALTERNATE LAW

Summary: This law is active when the aircrafte enters an unusual attitude (includes roll-over, over 60 degrees pitch up or over 30 degrees pitch down).

> Pitch Control shifts to ALTERNATE LAW
> Roll Control shifts to DIRECT LAW
> Returns to NORMAL/ALTERNATE LAW when out of unusual attitude.

4. DIRECT LAW

Summary: This law is the lowest level of flight control systems and is used only in the case of major multiple system failures.

> Side-stick Input is transmitted unmodified to control surfaces
> 'USE MAN PITCH TRIM' appears on PFD
> No protections provided

5. MECHANICAL BACKUP

Summary: The mechanical backup system is used in case of completed electrical or hydraulic system failure.

> Side-stick does NOT control anything
> Rudder Pedals must be used to control YAW
> Elevator Trim wheels must be used to control PITCH
> ROLL cannot be controlled while using the mechanical backup
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: Airbus A320neo (A319,A320,A321)

Postby polly » Mon Apr 09, 2012 12:30 pm

As far as I'm aware:

Flight Mode:
G - Load Factor only above 210kt
below 210kt: Pitch Rate

Pitch Trim is active: the horizontal stabilizer moves to cancel elevator deflection over about 30secs time constant

The other problem that may affect the stability is that pitch change and g-load seem to be calculated in Nasal and are then used as inputs to the fbw PID's. Isn't there a way of doing these calculations in teh PID's so the udate rates are consistent ?
User avatar
polly
 
Posts: 956
Joined: Thu Nov 04, 2010 3:45 pm

Re: Airbus A320neo (A319,A320,A321)

Postby omega95 » Mon Apr 09, 2012 1:49 pm

polly wrote in Mon Apr 09, 2012 12:30 pm:Flight Mode:
G - Load Factor only above 210kt
below 210kt: Pitch Rate


Yep, that's already put in... :)

polly wrote in Mon Apr 09, 2012 12:30 pm:Pitch Trim is active: the horizontal stabilizer moves to cancel elevator deflection over about 30secs time constant


How exactly does that work? :?

Btw, as the airbus A320 and A330 cockpits are very similar... and as both use the same flight control system, Imma implement this in the A330-200 too. :D

As for the mCDU, here's the emulator I found - http://www.equicom.net/mcdu/... Doesn't exactly have everything, but it has most things we need. :) I'll work on that after I finish and texture the cockpit (so far, I only have the top part of the shell, and the 2 windshield doors left)
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: Airbus A320neo (A319,A320,A321)

Postby omega95 » Mon Apr 09, 2012 2:55 pm

I just looked at a picture of a real A320's Mode Control Panel...

Image

Where exactly are the VNAV, LNAV and those other buttons?

Can anyone explain how this new MCP works?

Thanks.
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: Airbus A320neo (A319,A320,A321)

Postby bicyus » Mon Apr 09, 2012 3:50 pm

Hi!

Omega95 i told you i was working on the FBW...
you know I Don't have objection on you to work on FBW, ;-) but shall we at least work together on same base branch.
Just say "hey i would handle this 'AOA' law mode", or update how Airbus_law() determines the actual LAW. that's all right! ;-)

Code: Select all

# CONSTANTS

var RAD2DEG = 57.2957795;
var DEG2RAD = 0.0174532925;
var G_force = 9.80665;
var KT2MS = 0.514444444;

var fbw = {

   init : func{

      me.mode = 'Ground';
      me.law = 'Direct';
      me.engaged = 1;

      me.active_pitch = 0;
      me.activee_bank = 0;
      me.stable_pitch = 0;
      me.stable_bank = 0;

      #Throttles
      me.throttle0 = 0;
      me.throttle1 = 0;

      ## Initialize with FBW Activated
      me.fcs_root = "/fdm/jsbsim/fcs/";
      me.fbw_root = "/autopilot/fbw/";

      ## Create Vars and Propertyes
      props.globals.initNode(me.fbw_root~"engaged", 1, 'BOOL'); # Electronic work
      
      setprop(me.fbw_root~"law", 'Direct');
      setprop(me.fbw_root~"mode", 'Ground');

      props.globals.initNode(me.fbw_root~"stablemode", 0, 'BOOL');
      props.globals.initNode(me.fbw_root~"active_bank", 0, 'BOOL'); # it is operating
      props.globals.initNode(me.fbw_root~"active_pitch", 0, 'BOOL'); # it is operating
      props.globals.initNode(me.fbw_root~"stable_bank", 0, 'BOOL');
      props.globals.initNode(me.fbw_root~"stable_pitch", 0, 'BOOL');

      props.globals.initNode(me.fbw_root~"protections/overspeed", 0, 'BOOL');
      props.globals.initNode(me.fbw_root~"protections/alpha-prot", 0, 'BOOL');   # max on stick neutral
      props.globals.initNode(me.fbw_root~"protections/alpha-floor", 0, 'BOOL');   # TOGA thrust
      props.globals.initNode(me.fbw_root~"protections/alpha-max", 0, 'BOOL');   # FULL STICK deflect
      props.globals.initNode(me.fbw_root~"protections/alpha-min", 0, 'BOOL');
      props.globals.initNode(me.fbw_root~"protections/stall", 0, 'BOOL');
      props.globals.initNode(me.fbw_root~"protections/bank", 0, 'BOOL');
      props.globals.initNode(me.fbw_root~"protections/windshear", 0, 'BOOL');
      #props.globals.initNode(me.fbw_root~"autotrim/elevator", 0, 'BOOL');
      #props.globals.initNode(me.fbw_root~"autotrim/rudder", 0, 'BOOL');
      #props.globals.initNode(me.fbw_root~"autotrim/ailerons", 0, 'BOOL');

      #setprop("/controls/flight/aileron-filtered", '0');
      #setprop("/controls/flight/elevator-filtered", '0');

      # XML setting limits
      setprop("/limits/fbw/max-bank-angle-soft", '33' );
      setprop("/limits/fbw/max-bank-angle-hard", '67' );   
      setprop("/limits/fbw/max-roll-speed", '0.261799387'); # max 0.261799387 rad_sec, 15 deg_sec
      setprop("/limits/fbw/alpha-prot", '19');
      setprop("/limits/fbw/alpha-floor", '25');
      setprop("/limits/fbw/alpha-max", '30');
      setprop("/limits/fbw/alpha-min", '-15');
      setprop("/autopilot/internal/target-roll-deg", '0');
      setprop("/autopilot/internal/target-pitch-deg", '0');
      
      # fcs
      setprop(me.fcs_root~"elevator-fbw-output", 0);
      setprop(me.fcs_root~"aileron-fbw-output", 0);
      setprop(me.fcs_root~"rudder-fbw-output", 0);

      # Enter in loop
      me.UPDATE_INTERVAL = 0.01;
      me.loopid = 0;
      me.reset();
   },
   get_state : func{

      # FBW State
      me.engaged = getprop(me.fbw_root~"engaged");
      me.law = getprop(me.fbw_root~"law");

      ## AP status
      me.autopilot = getprop("/autopilot/settings/engaged");

      ## stablemode
      me.stablemode = getprop(me.fbw_root~"stablemode");




      ## Alpha Protection Limits
      me.alpha_prot = getprop("/limits/fbw/alpha-prot");
      me.alpha_floor = getprop("/limits/fbw/alpha-floor");
      me.alpha_max =  getprop("/limits/fbw/alpha-max");
      me.alpha_min = getprop("/limits/fbw/alpha-min");
      me.max_roll = getprop("/limits/fbw/max-roll-speed");

      ## Bank Limit Setting

      me.banklimit_soft = getprop("/limits/fbw/max-bank-angle-soft");
      me.banklimit_hard = getprop("/limits/fbw/max-bank-angle-hard");

      ## Position and Orientation

      me.altitudeagl = getprop("/position/altitude-agl-ft");

      me.altitudemsl = getprop("/position/altitude-ft");

      me.pitch = getprop("/orientation/pitch-deg");
      me.roll = getprop("/orientation/roll-deg");

      me.airspeedkt = getprop("/velocities/airspeed-kt");
      me.groundspeedkt = getprop("/velocities/groundspeed-kt");

      ## Flight Control System Properties

      #me.elevtrim = getprop("/controls/flight/elevator-trim");
      #me.ailtrim = getprop("/controls/flight/aileron-trim");

      #me.aileronin = getprop("/controls/flight/aileron-filtered");
      #me.elevatorin =  getprop("/controls/flight/elevator-filtered");

      me.aileronin = getprop("/controls/flight/aileron");
      me.elevatorin =  getprop("/controls/flight/elevator");
      #me.rudderin = getprop("/controls/flight/rudder");
      # rudder need inverted cmd-norm is inverted already
      me.rudderin = getprop(me.fcs_root~"rudder-cmd-norm");

      ## FBW Output (actual surface positions)

      # me.aileronout = getprop(me.fcs_root~"aileron-fbw-output");
      # me.elevatorout =  getprop(me.fcs_root~"elevator-fbw-output");
      # me.rudderout = getprop(me.fcs_root~"rudder-fbw-output");

      ## Engine Throttle Positions

      me.throttle0 = getprop("controls/engines/engine[0]/throttle");
      me.throttle1 = getprop("controls/engines/engine[1]/throttle");
      
      
   },
   
   Airbus_law : func {
      # Flight mode
      #
      if (me.altitudeagl >= '100') {
         me.mode = 'Flight';
      } else {
         if (getprop("/gear/gear/wow") and getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow")) {
            me.mode = 'Ground';
         } else {
            me.mode = 'Transition';
         }
      }


      #LAWS
      # Normal, Direct, Autopilot, AOA,
      if (!me.autopilot) {

         if (me.pitch <= me.alpha_min or me.pitch >= me.alpha_prot){
            me.law = 'AOA';
         } else {

            if (me.mode == 'Ground' or me.mode == 'Transition') {
               me.law = 'Direct';
            } else {
               me.law = 'Normal';
            }
         }

      } else {
         me.law = 'AP';
      }
      
      
   },
   autostable : func {
      ## AUTO-STABILIZATION

      ### Get the aircraft to maintain pitch and roll when stick is at the center
      ### PID USED

      
      #### PITCH ####
      if ((me.elevatorin <= 0.01) and (me.elevatorin >= -0.01) ) {  # if pitch joystick neutral
         # if previous state was not neutral   
         if (me.stable_pitch == 0) {
            # set PID target DEGREE
            setprop(me.fbw_root~"stable_pitch_deg", me.pitch);
            # set neutral state
            me.stable_pitch = 1;
            me.active_pitch = 0; 
         }
         # activate PID   
         setprop(me.fbw_root~"stable_pitch", 1);
      } else {
         setprop(me.fbw_root~"stable_pitch", 0);
         me.stable_pitch = 0;
         me.active_pitch = 1;
      }


      #### ROLL ####
      if ((me.aileronin <= 0.01) and (me.aileronin >= -0.01)) {
         if (me.stable_bank == 0) {
            setprop(me.fbw_root~"stable_bank_deg", me.roll);
            me.stable_bank = 1;
            me.active_bank = 0;
         }
         setprop(me.fbw_root~"stable_bank", 1);
      } else {
         setprop(me.fbw_root~"stable_bank", 0);
         me.stable_bank = 0;
         me.active_bank = 1;
      }
      
   },
   demand_pitch : func{
      # pitch rate w=a/v
      me.actual_G = getprop("/accelerations/pilot-gdamped") - 1;
      me.desired_G = me.elevatorin * -1.5;
      me.actual_pitch_rate = (me.actual_G * G_force) / (me.groundspeedkt * KT2MS);
      me.desired_pitch_rate = (me.desired_G * G_force) / (me.groundspeedkt * KT2MS);

   
      setprop(me.fbw_root~"actual-pitch-rate_degps", me.actual_pitch_rate);
      setprop(me.fbw_root~"target-pitch-rate_degps", me.desired_pitch_rate);
   },
   demand_roll : func{

      #me.actual_roll_rate = getprop("/fdm/jsbsim/velocities/p-aero-rad_sec");
      me.desired_roll_rate = me.aileronin * me.max_roll;


      setprop(me.fbw_root~"target-roll-rad_sec", me.desired_roll_rate);
   },
   get_alpha_prot_state : func{
      if (me.pitch <=  me.alpha_min) return 'alpha_min';
      else if (me.pitch >= me.alpha_prot and me.pitch < me.alpha_floor) return 'alpha_prot';
      else if (me.pitch >= me.alpha_floor and me.pitch < me.alpha_max) return 'alpha_floor';
      else if (me.pitch >= me.alpha_max) return 'alpha_max';
   },
   set_active_bank : func{
      me.stable_bank = 0;
      me.active_bank = 1;         
      setprop(me.fbw_root~"stable_bank", me.stable_bank);
      setprop(me.fbw_root~"active_bank",me.active_bank);
   },
   set_active_pitch : func{
      me.stable_pitch = 0;
      me.active_pitch = 1;
      setprop(me.fbw_root~"stable_pitch",me.stable_pitch);
      setprop(me.fbw_root~"active_pitch",me.active_pitch);

   },
   set_stable_bank : func(deg){
      me.stable_bank = 1;
      me.active_bank = 0;
      me.stable_bank_deg = deg;
      setprop(me.fbw_root~"stable_bank", me.stable_bank);
      setprop(me.fbw_root~"active_bank",me.active_bank);
      setprop(me.fbw_root~"stable_bank_deg", me.stable_bank_deg);
   },
   set_stable_pitch : func(deg){
      me.stable_pitch = 1;
      me.active_pitch = 0;
      me.stable_pitch_deg = deg;
      setprop(me.fbw_root~"stable_pitch",me.stable_pitch);
      setprop(me.fbw_root~"active_pitch",me.active_pitch);
      setprop(me.fbw_root~"stable_pitch_deg", me.stable_pitch_deg);
   },
   update : func{

      me.get_state(); # update variables
      
      if ( me.engaged ){

         me.Airbus_law(); # update engage mode

         if ( me.law == 'Normal') {
         # <!-- =============================================================== -->
         # <!--  "Normal" law when fbw Active                                   -->
         # <!-- =============================================================== -->
            me.autostable(); # if Joke neutral, Stabilize through PID

            if (me.stablemode) {
               if (!me.stable_bank) { #when not stable calculate roll
                  me.demand_roll(); # Set values for PID
               }
               if (!me.stable_pitch) { #when not stable calculate pitch
                  me.demand_pitch(); # Set values for PID
               }
            } else {
               me.demand_roll();
               me.demand_pitch();
            }

         
            setprop(me.fcs_root~"rudder-fbw-output", me.rudderin);  #Direct rudder

         } else if (me.law == 'AOA') {
         # <!-- =============================================================== -->
         # <!--  "Angle of Attack" law when out of limits                       -->
         # <!-- =============================================================== -->
            # Alpha_prot Triggered
            me.alpha_prot_state = me.get_alpha_prot_state();

            if (me.alpha_prot_state == 'alpha_min') me.set_stable_bank(me.alpha_min + 2);
            else if (me.elevatorin <= -0.8) {

               # demanding more alpha
               if (me.alpha_prot_state == 'alpha_prot') {
                  #direct elevator
                  setprop(me.fcs_root~"elevator-fbw-output", me.elevatorin);
               } else if (me.alpha_prot_state == 'alpha_floor') {
                  #full throttles
                  me.throttle0 = 1;
                  me.throttle1 = 1;
                  setprop("controls/engines/engine[0]/throttle", me.throttle0);
                  setprop("controls/engines/engine[1]/throttle", me.throttle1);
                  #direct elevator
                  setprop(me.fcs_root~"elevator-fbw-output", me.elevatorin);

               } else if (me.alpha_prot_state == 'alpha_max') {
                  #full throttles
                  me.throttle0 = 1;
                  me.throttle1 = 1;
                  setprop("controls/engines/engine[0]/throttle", me.throttle0);
                  setprop("controls/engines/engine[1]/throttle", me.throttle1);
                  me.set_stable_bank(me.alpha_max - 2);
               }
                     
            } else {
               me.set_stable_bank(me.alpha_prot + 2);# stick relaxed go inside flight envelope
            }
   
            me.set_active_pitch();
               
         } else if (me.law == 'Direct') { # don't overwrite AP
         # <!-- =============================================================== -->
         # <!--  "Direct" law when fbw not Active                               -->
         # <!-- =============================================================== -->
            me.active_bank = 0;
            me.active_pitch = 0;
            me.stable_bank = 0;
            me.stable_pitch = 0;

            setprop(me.fcs_root~"aileron-fbw-output", me.aileronin);
            setprop(me.fcs_root~"elevator-fbw-output", me.elevatorin);
            setprop(me.fcs_root~"rudder-fbw-output", me.rudderin);

         } else if (me.law == 'AP') {
         # <!-- =============================================================== -->
         # <!--  "AP" law stay calmed (shutdown)                                -->
         # <!-- =============================================================== -->
            me.active_bank = 0;
            me.active_pitch = 0;
            me.stable_bank = 0;
            me.stable_pitch = 0;
         }

      
         setprop(me.fbw_root~"mode",me.mode);
         setprop(me.fbw_root~"law",me.law);

         setprop(me.fbw_root~"active_pitch",me.active_pitch);
         setprop(me.fbw_root~"active_bank",me.active_bank);
         setprop(me.fbw_root~"stable_pitch",me.stable_pitch);
         setprop(me.fbw_root~"stable_bank",me.stable_bank);

         

      } else { #not engaged

         # <!-- =============================================================== -->
         # <!--  FBW Shutdown    (imposible in real life)                       -->
         # <!-- =============================================================== -->
         me.active_bank = 0;
         me.active_pitch = 0;
         me.stable_bank = 0;
         me.stable_pitch = 0;
         setprop(me.fbw_root~"active_pitch",me.active_pitch);
         setprop(me.fbw_root~"active_bank",me.active_bank);
         setprop(me.fbw_root~"stable_pitch",me.stable_pitch);
         setprop(me.fbw_root~"stable_bank",me.stable_bank);

         setprop(me.fcs_root~"aileron-fbw-output", me.aileronin);
         setprop(me.fcs_root~"elevator-fbw-output", me.elevatorin);
         setprop(me.fcs_root~"rudder-fbw-output", me.rudderin);
      }

      
   },

   reset : func {
      me.loopid += 1;
      me._loop_(me.loopid);
   },

   _loop_ : func(id) {
      id == me.loopid or return;
      me.update();
      settimer(func { me._loop_(id); }, me.UPDATE_INTERVAL);
   }

};

fbw.init();
print("Fly-By-Wire ......... Initialized");


it Works with the stability mode, on joystick nutral.
Have 2, Active and Stable PIDs for Pitch and 2 other for Roll.

Pitch is processed bi a Pitch_rate calculated from the actual speed and Desired G-load (joystick command).
we should think witch is the better way to go, directly doing PID over G-load or over Pitch_rate.

you have the different Normal, Direct, and AOA laws implemented.
It workED well, thanks to Doodle, untill i've touched the FDM. :lol: and PIDs become unstable. I need to re tunne it.
i repeat FDM has been updated, and all this is on "Airbus-fbw" branch

i've corrected some errors on Flight Surface Controls and added Actuator or Servos to primary flight surfaces to limit his rate of change. those actuator can be used in future to add "jammed" surfaces etc...

#####################
MCU

There are no V/L-NAV buttons, they are done in knobs.
The knobs for selecting heading and Altitude, can be pressed. when they are in pressed estate, "---------" appears in his dial, and FMCG takes over command, NAV mode.
Altitude knob for VNAV, Heading for LNAV.
User avatar
bicyus
 
Posts: 116
Joined: Fri Nov 25, 2011 4:11 pm
Location: Bilbao
Callsign: Bicyus
Version: 2.6
OS: Ubuntu Linux

Re: Airbus A320neo (A319,A320,A321)

Postby omega95 » Mon Apr 09, 2012 4:04 pm

bicyus wrote in Mon Apr 09, 2012 3:50 pm:Omega95 i told you i was working on the FBW... don't re do the work. :?


Oop.. :oops:

But now when I look at your FBW, it doesn't shot 'ALTERNATE LAW', 'ABNORMAL ALTERNATE LAW' or 'MECHANICAL BACKUP'... :|

And where is the fbw supposed to demand a pitch? That would be only when you try to exceed the limits right? For the roll axis, the stick should demand roll-rate and for the pitch axis, it demands pitch rate when under 210 kts and load factor when over 210 kts...

Atm, the parts of the FBW I've completed works great except the current Autopilot seems messed up (not the PID, I mean the actual autopilot)... so I'd just do the whole flight control unit. I've pushed this fbw to the fbw-devel branch.

As for the cockpit, don't do anything on it. and the instrument sizes'd change too (the current ones are too small). Any idea what to do next? :)
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: Airbus A320neo (A319,A320,A321)

Postby bicyus » Mon Apr 09, 2012 4:27 pm

OK right and go ahead
User avatar
bicyus
 
Posts: 116
Joined: Fri Nov 25, 2011 4:11 pm
Location: Bilbao
Callsign: Bicyus
Version: 2.6
OS: Ubuntu Linux

Re: Airbus A320neo (A319,A320,A321)

Postby omega95 » Mon Apr 09, 2012 5:18 pm

Alright, so I checked out the Airbus-fbw branch to test the latest fbw but then when I started flying, the plane took off well but then started acting really crazy. The ailerons and elevators kept going up and down over and over again till the plane got stuck at like 20 degrees pitch down (I didn't even touch the joystick after take off) and then crashed. Is the fbw still being worked on? You could use the pids from the fbw-devel branch - at the moment, those work almost perfectly. :wink:
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: Airbus A320neo (A319,A320,A321)

Postby awexome » Mon Apr 09, 2012 5:35 pm

Hello,

omega95 wrote in Mon Apr 09, 2012 2:55 pm:I just looked at a picture of a real A320's Mode Control Panel...


It is always a good idea to take a good, slow look at the original, to avoid excessive assumptions and inconsistencies in a development model ;)

omega95 wrote in Mon Apr 09, 2012 2:55 pm:Where exactly are the VNAV, LNAV and those other buttons?
Can anyone explain how this new MCP works?


Refer to the descriptions on page 10.12 and the graphical illustrations on page 10.13 of the document referenced below. Note the alternative terminologies.

I have been reading an Airbus manual or something like that which may be helpful with details of the A32z series. I ll check the copy and re-distribution laws pronto.

...momentarily ..

Here is what is available. Seems to cover the A318/A319/A320/A321 range of Airbus

http://ebookbrowse.com/a320-meta-pdf-d275306716
http://ebookbrowse.com/a320-meta-pdf-d98489034
http://ebookbrowse.com/a320-meta-pdf-d93208691

The original's cockpit is simply .. awe . I hope the FGFS community will commit to reproducing this much awe.

Blender anyone ...? .. blending ... accurate models ...

awexome.
Last edited by awexome on Mon Apr 09, 2012 6:55 pm, edited 5 times in total.
When one thinks, one looks up to the skies.
I inspire, think, and seek the skies ------- mijiny <aka awexome[2138]>
awexome
 
Posts: 111
Joined: Sat Jan 21, 2012 12:24 pm
Location: GMT
Callsign: SHA7
Version: GIT
OS: GNU

Re: Airbus A320neo (A319,A320,A321)

Postby polly » Mon Apr 09, 2012 5:43 pm

I've been working on PID tuning but the FDM was changed recently, upsetting the PID's . It's a waste of effort to have two separate fbw and PID implementations running in parallel. Whoever wins the Battle of the Titans, could you add some switching into the fbw nasal to override the roll and pitch modes, please ? Here's a keyboard assignment that would work:
Code: Select all
 <key n="267">
  <name>alt-F11</name>
  <repeatable type="bool">true</repeatable>
  <mod-alt>
   <repeatable type="bool">false</repeatable>
   <desc>cycle fbw roll over-ride settings</desc>
   <binding>
    <command>nasal</command>
    <script>
     var tNode = props.globals.getNode("/autopilot/internal/apid/fbw-roll-override", 1);
     var tMode = tNode.getValue();
     if ( tMode== nil ) tMode= "NONE";
     if (tMode == "NONE") {
       tMode = "DIRECT";
     } else if (tMode == "DIRECT") {
       tMode = "HOLD";
     } else if (tMode == "HOLD") {
       tMode = "NONE";
     }
     print("apid fbw-roll-override: ", tMode);
     tNode.setValue(tMode);
    </script>
   </binding>
  </mod-alt>
 </key>
 
 <key n="268">
  <name>alt-F12</name>
  <repeatable type="bool">true</repeatable>
  <mod-alt>
   <repeatable type="bool">false</repeatable>
   <desc>cycle fbw pitch over-ride settings </desc>
   <binding>
    <command>nasal</command>
    <script>
     var tNode = props.globals.getNode("/autopilot/internal/apid/fbw-pitch-override", 1);
     var tMode = tNode.getValue();
     if ( tMode== nil ) tMode= "NONE";
     if (tMode == "NONE") {
       tMode = "DIRECT";
     } else if (tMode == "DIRECT") {
       tMode = "HOLD";
     } else if (tMode == "HOLD") {
       tMode = "NONE";
     }
     print("fbw-pitch-override: ", tMode);
     tNode.setValue(tMode);
    </script>
   </binding>
  </mod-alt>
 </key>


Comparing against strings rather than against index values avoids future confusion if/when changes are made that affect index values. The above order is important to simplify make regaining control.

If, at the end of the nasal roll and pitch mode selections, the properties /autopilot/internal/apid/fbw-roll-override and ../fbw-pitch-override could be honoured to set the appropriate mode then it would be a lot easier to grab control, to recover roll and pitch. I already use similar hotkeys to keep control of the autopilot and fbw PID's, it saves a lot of reloads. Thanks !
User avatar
polly
 
Posts: 956
Joined: Thu Nov 04, 2010 3:45 pm

Re: Airbus A320neo (A319,A320,A321)

Postby awexome » Mon Apr 09, 2012 6:01 pm

Hi,

this is becoming sad ... waste of effort??? Guys, more coordination and collaboration. Be efficient with time and effort.

polly wrote in Mon Apr 09, 2012 5:43 pm:I've been working on PID tuning but the FDM was changed recently, upsetting the PID's . It's a waste of effort to have two separate fbw and PID implementations running in parallel. Whoever wins the Battle of the Titans ...


Does this team need an adminstrator?

awexome
When one thinks, one looks up to the skies.
I inspire, think, and seek the skies ------- mijiny <aka awexome[2138]>
awexome
 
Posts: 111
Joined: Sat Jan 21, 2012 12:24 pm
Location: GMT
Callsign: SHA7
Version: GIT
OS: GNU

Re: Airbus A320neo (A319,A320,A321)

Postby polly » Mon Apr 09, 2012 8:33 pm

Having separate PID's for 'stable' and active mode is causing a problem because when the pitch or roll demand enters the 'stable' zone the 'stable' PID is suddenly switched on and a transient kick is the result. We used to have an <honor-passive> tag to take care of that but the source commentary says it's deprecated, maybe there's another way of keeping the PID going even while it's not driving.
in any case, why have a test for (rate demanding) control input nearly zero and switch to a separate PID to hold a zero rate ? Just keep the rate PID active and demand zero rate, right ?
User avatar
polly
 
Posts: 956
Joined: Thu Nov 04, 2010 3:45 pm

Re: Airbus A320neo (A319,A320,A321)

Postby Hooray » Mon Apr 09, 2012 8:43 pm

awexome wrote in Mon Apr 09, 2012 6:01 pm:
polly wrote in Mon Apr 09, 2012 5:43 pm:It's a waste of effort to have two separate fbw and PID implementations running in parallel.
this is becoming sad ... waste of effort??? Guys, more coordination and collaboration. Be efficient with time and effort.
Does this team need an adminstrator?


Yes, I suggest to use the wiki to streamline the collaboration for this: let's see who's working on what, what features are required and which parts can be reused, so that there's no wasted effort, okay?

There are some people here who are really good at AP tuning and PID development or FDM development, others are good at 3D modeling or Nasal scripting - let's try to put all these resources to good use, there's really no need for duplicate work or wasted time.

Just state what you got so far, and what you'd like to work on - I am sure, we can find a way to organize this a little more.

http://wiki.flightgear.org/Airbus_A320neo
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 14 guests