1
0
Fork 0

- set speed instead of force by slider

- defineable properties for speed hold (cruise control) pid controller
check the wiki http://wiki.flightgear.org/index.php/Howto:_Implent_pushback for details
This commit is contained in:
torsten 2009-05-06 11:27:10 +00:00
parent b71c0c580e
commit 09e1472fdf

View file

@ -1,52 +1,54 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<PropertyList> <PropertyList>
<name>pushback</name> <name>pushback</name>
<layout>vbox</layout> <layout>vbox</layout>
<nasal> <nasal>
<open> <open>
var pushback_position = aircraft.door.new("sim/model/pushback", 10.0); var pushback_position = aircraft.door.new("sim/model/pushback", 10.0);
pushback_position.setpos(pushback_position.getpos()); pushback_position.setpos(pushback_position.getpos());
props.globals.initNode("/sim/model/pushback/enabled", 0, "BOOL" ); props.globals.initNode("/sim/model/pushback/enabled", 0, "BOOL" );
props.globals.initNode("/sim/model/pushback/magnitude", 0.0 ); props.globals.initNode("/sim/model/pushback/target-speed-fps", 0.0 );
</open> </open>
</nasal> </nasal>
<group> <group>
<layout>hbox</layout> <layout>hbox</layout>
<text> <text>
<label>Pushback</label> <label>Pushback</label>
</text> </text>
<empty><stretch>true</stretch></empty> <empty>
<stretch>true</stretch>
</empty>
<button> <button>
<legend></legend> <legend/>
<key>Esc</key> <key>Esc</key>
<pref-width>16</pref-width> <pref-width>16</pref-width>
<pref-height>16</pref-height> <pref-height>16</pref-height>
<border>2</border> <border>2</border>
<binding> <binding>
<command>dialog-close</command> <command>dialog-close</command>
</binding> </binding>
</button> </button>
</group> </group>
<hrule/> <hrule/>
<group> <group>
<stretch>true</stretch> <stretch>true</stretch>
<layout>vbox</layout> <layout>vbox</layout>
<halign>center</halign> <halign>center</halign>
<valign>top</valign> <valign>top</valign>
<checkbox> <checkbox>
<halign>left</halign> <halign>left</halign>
<label>Show pushback</label> <label>Show pushback</label>
<property>/sim/model/pushback/enabled</property> <property>/sim/model/pushback/enabled</property>
<binding> <binding>
<command>property-toggle</command> <command>property-toggle</command>
<property>/sim/model/pushback/enabled</property> <property>/sim/model/pushback/enabled</property>
</binding> </binding>
</checkbox> </checkbox>
@ -55,32 +57,75 @@
<label>Connect pushback</label> <label>Connect pushback</label>
<property>/sim/model/pushback/position-norm</property> <property>/sim/model/pushback/position-norm</property>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script>pushback_position.toggle();</script> <script>pushback_position.toggle();</script>
</binding> </binding>
</checkbox> </checkbox>
<group> <group>
<layout>hbox</layout> <layout>hbox</layout>
<text>
<label>Speed:</label>
</text>
<slider>
<row>0</row>
<col>2</col>
<min>-50</min>
<max>50</max>
<property>/sim/model/pushback/target-speed-fps</property>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<text>
<pref-width>16</pref-width>
<property>/sim/model/pushback/target-speed-fps</property>
<format>%2.0f</format>
<live>true</live>
</text>
<text>
<label>fps</label>
</text>
</group>
<hrule/>
<text> <text>
<label>Force:</label> <label>Cruise Control configuration</label>
</text> </text>
<group>
<layout>hbox</layout>
<input>
<label>Kp</label>
<width>16</width>
<property>/sim/model/pushback/kp</property>
</input>
</group>
<slider> <group>
<row>0</row> <layout>hbox</layout>
<col>2</col> <input>
<min>-40000</min> <label>Ki</label>
<max>40000</max> <width>16</width>
<property>/sim/model/pushback/magnitude</property> <property>/sim/model/pushback/ki</property>
<binding> </input>
<command>dialog-apply</command> </group>
</binding>
</slider>
</group> <group>
<layout>hbox</layout>
<input>
<label>Kd</label>
<width>16</width>
<property>/sim/model/pushback/kd</property>
</input>
</group>
</group> </group>
</PropertyList> </PropertyList>