[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flightgear-cvs
Subject:    [Flightgear-cvslogs] CVS: data/Aircraft/Hansajet/Systems
From:       Torsten Dreyer <torsten () baron ! flightgear ! org>
Date:       2009-02-27 21:20:16
Message-ID: 200902272120.n1RLKGdh022816 () baron ! flightgear ! org
[Download RAW message or body]

Update of /var/cvs/FlightGear-0.9/data/Aircraft/Hansajet/Systems
In directory baron.flightgear.org:/tmp/cvs-serv22792/Systems

Modified Files:
	Hansajet-autopilot.nas Hansajet-autopilot.xml 
Log Message:
- autopilot development (still unfinished)
- flight director development (still unfinished)
- added a view at the fuel/hydraulics panel
- added labels to the fuel/hydraulics panel

Index: Hansajet-autopilot.nas
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/Hansajet/Systems/Hansajet-autopilot.nas,v
 retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -r1.1 -r1.2
*** Hansajet-autopilot.nas	26 Feb 2009 21:31:59 -0000	1.1
--- Hansajet-autopilot.nas	27 Feb 2009 21:20:11 -0000	1.2
***************
*** 84,85 ****
--- 84,130 ----
    }
  };
+ 
+ var FlightDirector = {
+   new : func( index, target ) {
+     var obj = {};
+     obj.parents = [FlightDirector];
+     obj.modes = [ "SB", "BL", "FI", "VOR/LOC", "APP", "G/A" ];
+     obj.modeNames = {};
+     obj.modeNames[obj.modes[0]] = "Standby";
+     obj.modeNames[obj.modes[1]] = "Blue left";
+     obj.modeNames[obj.modes[2]] = "Flight instruments";
+     obj.modeNames[obj.modes[3]] = "VOR/Localizer glide slope";
+     obj.modeNames[obj.modes[4]] = "Approach";
+     obj.modeNames[obj.modes[5]] = "Go-around";
+ 
+     obj.modeN = props.globals.initNode( "instrumentation/fd-controller[" ~ index ~ \
"]/mode", 0, "INT" ); +     setlistener( obj.modeN, func { obj.statemachine(); }, 0, \
0 ); + 
+     obj.verticalN = props.globals.getNode  ( "autopilot/flightdirector[" ~ index ~ \
"]/vertical-deflection-norm", 1 ); +     obj.horizonN = props.globals.getNode( \
"autopilot/flightdirector[" ~ index ~ "]/horizon-deflection-norm", 1 ); + 
+     obj.flagN = props.globals.initNode( target ~ "/flightdirector-flag", 1, "BOOL" \
); + 
+     settimer( func { obj.statemachine(); }, 15 );
+     print( "Flight Director #", index, " ready on ", target );
+     return obj;
+   },
+ 
+   statemachine : func {
+     var mode = me.modeN.getValue();
+     if( mode == nil ) mode = 0;
+     print( "FlightDirector mode set to ", me.modes[mode], " : ", \
me.modeNames[me.modes[mode]] ); + 
+     if( mode == 0 ) {
+       # Standby, move bars out of sight
+       me.flagN.setBoolValue( 0 );
+       me.verticalN.setDoubleValue( 1.0 );
+       me.horizonN.setDoubleValue( 1.0 );
+     } else if( mode == 1 ) {
+     } else if( mode == 2 ) {
+     } else if( mode == 3 ) {
+     } else if( mode == 4 ) {
+     } else if( mode == 5 ) {
+     }
+   }
+ };

Index: Hansajet-autopilot.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/Hansajet/Systems/Hansajet-autopilot.xml,v
 retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -r1.1 -r1.2
*** Hansajet-autopilot.xml	26 Feb 2009 21:32:00 -0000	1.1
--- Hansajet-autopilot.xml	27 Feb 2009 21:20:12 -0000	1.2
***************
*** 65,70 ****
        <Ti>10.0</Ti>        <!-- integrator time -->
        <Td>0.00001</Td>     <!-- derivator time -->
!       <u_min>-30.0</u_min> <!-- minimum output clamp -->
!       <u_max>30.0</u_max>  <!-- maximum output clamp -->
      </config>
    </pid-controller>
--- 65,70 ----
        <Ti>10.0</Ti>        <!-- integrator time -->
        <Td>0.00001</Td>     <!-- derivator time -->
!       <u_min>-25.0</u_min> <!-- minimum output clamp -->
!       <u_max>25.0</u_max>  <!-- maximum output clamp -->
      </config>
    </pid-controller>
***************
*** 572,574 ****
--- 572,670 ----
    </pid-controller>
  
+   <pid-controller>
+     <name>yaw damper</name>
+     <debug>false</debug>
+     <enable>
+       <prop>/instrumentation/autopilot/yaw-damper</prop>
+       <value type="bool">true</value>
+     </enable>
+     <input>
+        <prop>/instrumentation/slip-skid-ball/indicated-slip-skid</prop>
+     </input>
+     <reference>
+        <value>0.0</value>
+     </reference>
+     <output>
+        <prop>/controls/flight/rudder</prop>
+     </output>
+     <config>
+       <Kp>0.125</Kp>       <!-- proportional gain -->
+       <beta>1.0</beta>     <!-- input value weighing factor -->
+       <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
+       <gamma>0.0</gamma>   <!-- input value weighing factor for -->
+                            <!-- unfiltered derivative error -->
+       <Ti>3.0</Ti>         <!-- integrator time -->
+       <Td>0.0</Td>         <!-- derivator time -->
+       <u_min>-0.5</u_min>  <!-- minimum output clamp -->
+       <u_max>0.5</u_max>   <!-- maximum output clamp -->
+     </config>
+   </pid-controller>
+ 
+   <!-- Flight Director -->
+   <filter>
+     <name>horizontal bar deflection filter</name>
+     <debug>false</debug>
+     <type>exponential</type>
+     <input>/autopilot/flightdirector/horizon-deflection-norm</input>
+     <output>/instrumentation/attitude-indicator[0]/horizon-deflection-norm</output>
+     <output>/instrumentation/attitude-indicator[1]/horizon-deflection-norm</output>
+     <filter-time>1</filter-time>
+   </filter>
+ 
+   <filter>
+     <name>vertical bar deflection filter</name>
+     <debug>false</debug>
+     <type>exponential</type>
+     <input>/autopilot/flightdirector/vertical-deflection-norm</input>
+     <output>/instrumentation/attitude-indicator[0]/vertical-deflection-norm</output>
 +     <output>/instrumentation/attitude-indicator[1]/vertical-deflection-norm</output>
 +     <filter-time>1</filter-time>
+   </filter>
+ 
+   <pid-controller>
+     <name>target roll controller</name>
+     <debug>false</debug>
+     <enable>
+       <prop>/instrumentation/attitude-indicator/flightdirector-flag</prop>
+       <value>false</value>
+     </enable>
+     <input>
+       <prop>/autopilot/internal/heading-bug-error-deg</prop>
+     </input>
+     <reference>
+       <value>0.0</value>
+     </reference>
+     <output>
+       <prop>/autopilot/flightdirector/target-roll-deg</prop>
+     </output>
+     <config>
+       <Kp>-1.0</Kp>        <!-- proportional gain -->
+       <beta>1.0</beta>     <!-- input value weighing factor -->
+       <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
+       <gamma>0.0</gamma>   <!-- input value weighing factor for -->
+                            <!-- unfiltered derivative error -->
+       <Ti>10.0</Ti>        <!-- integrator time -->
+       <Td>0.00001</Td>     <!-- derivator time -->
+       <u_min>-25.0</u_min> <!-- minimum output clamp -->
+       <u_max>25.0</u_max>  <!-- maximum output clamp -->
+     </config>
+   </pid-controller>
+ 
+   <filter>
+     <name>blah</name>
+     <debug>false</debug>
+     <enable>
+       <prop>/instrumentation/attitude-indicator/flightdirector-flag</prop>
+       <value>false</value>
+     </enable>
+     <type>gain</type>
+     <gain>
+       <value>0.03</value> <!-- -0.75 .. 0.75 for full deflection -->
+     </gain>
+     <input>/autopilot/flightdirector/target-roll-deg</input>
+     <output>/autopilot/flightdirector/vertical-deflection-norm</output>
+     <u_min>-0.75</u_min>
+     <u_max>0.75</u_max>
+   </filter>
+ 
  </PropertyList>


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Flightgear-cvslogs mailing list
Flightgear-cvslogs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-cvslogs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic