1
0
Fork 0

Dave Perry:

This patch adds main gear rotations about the fuselage attach points that keep the wheels in contact with the ground as the compression increases and decreases.  I also rotated the main fairings and wheels 4 degrees so the wheel axles are horizontal sitting on the ground.  The left and right main gear struts, wheels, and fairings were adjusted to be mirrored (symetric) in the c172p.ac.  I also increased the rpm boundary between the Propeller and Propeller.slow selects.
This commit is contained in:
jmt 2009-11-22 22:06:25 +00:00
parent 1807917d0c
commit 998d503a59
4 changed files with 988 additions and 926 deletions

File diff suppressed because it is too large Load diff

View file

@ -891,24 +891,27 @@
<!-- Airframe --> <!-- Airframe -->
<animation> <animation>
<type>select</type> <type>select</type>
<object-name>Propeller</object-name> <object-name>Propeller</object-name>
<condition> <condition>
<less-than> <less-than>
<property>engines/engine[0]/rpm</property> <property>engines/engine[0]/rpm</property>
<value>200</value> <value>500</value>
</less-than> </less-than>
</condition> </condition>
</animation> </animation>
<animation> <animation>
<type>select</type> <type>select</type>
<object-name>Propeller.Slow</object-name> <object-name>Propeller.Slow</object-name>
<condition> <condition>
<and> <and>
<greater-than> <greater-than>
<property>engines/engine[0]/rpm</property> <property>engines/engine[0]/rpm</property>
<value>190</value> <value>400</value>
</greater-than> </greater-than>
<less-than> <less-than>
<property>engines/engine[0]/rpm</property> <property>engines/engine[0]/rpm</property>
@ -916,6 +919,7 @@
</less-than> </less-than>
</and> </and>
</condition> </condition>
</animation> </animation>
<animation> <animation>
@ -1212,15 +1216,15 @@
<animation> <animation>
<type>rotate</type> <type>rotate</type>
<object-name>fairing2</object-name> <object-name>fairing3</object-name>
<object-name>RightWheelStrut</object-name> <object-name>RightWheelStrut</object-name>
<object-name>RightWheel</object-name> <object-name>RightWheel</object-name>
<property>gear/gear[2]/compression-norm</property> <property>gear/gear[2]/compression-rotation-deg</property>
<factor>1.9</factor> <factor>1.0</factor>
<center> <center>
<x-m>0.711</x-m> <x-m>0.711</x-m>
<y-m>0.474</y-m> <y-m>0.4518</y-m>
<z-m>-0.708</z-m> <z-m>-0.70</z-m>
</center> </center>
<axis> <axis>
<x>1.0</x> <x>1.0</x>
@ -1231,15 +1235,15 @@
<animation> <animation>
<type>rotate</type> <type>rotate</type>
<object-name>fairing1</object-name> <object-name>fairing2</object-name>
<object-name>LeftWheelStrut</object-name> <object-name>LeftWheelStrut</object-name>
<object-name>LeftWheel</object-name> <object-name>LeftWheel</object-name>
<property>gear/gear[1]/compression-norm</property> <property>gear/gear[1]/compression-rotation-deg</property>
<factor>-1.9</factor> <factor>-1.0</factor>
<center> <center>
<x-m>0.711</x-m> <x-m>0.711</x-m>
<y-m>-0.474</y-m> <y-m>-0.4518</y-m>
<z-m>-0.708</z-m> <z-m>-0.70</z-m>
</center> </center>
<axis> <axis>
<x>1.0</x> <x>1.0</x>

View file

@ -17,6 +17,10 @@ var navLights = props.globals.getNode("controls/lighting/nav-lights", 1);
var instrumentsNorm = props.globals.getNode("controls/lighting/instruments-norm", 1); var instrumentsNorm = props.globals.getNode("controls/lighting/instruments-norm", 1);
var instrumentLightFactor = props.globals.getNode("sim/model/material/instruments/factor", 1); var instrumentLightFactor = props.globals.getNode("sim/model/material/instruments/factor", 1);
var panelLights = props.globals.getNode("controls/lighting/panel-norm", 1); var panelLights = props.globals.getNode("controls/lighting/panel-norm", 1);
var dhR_ft = props.globals.getNode("gear/gear[2]/compression-ft", 1);
var dhL_ft = props.globals.getNode("gear/gear[1]/compression-ft", 1);
var propGear1 = props.globals.getNode("gear/gear[1]", 1);
var propGear2 = props.globals.getNode("gear/gear[2]", 1);
# Associate Nodes # Associate Nodes
@ -28,6 +32,8 @@ var filteredCDI0 = propNav0.getNode("filtered-cdiNAV0-deflection", 1);
var filteredCDI1 = propNav1.getNode("filtered-cdiNAV1-deflection", 1); var filteredCDI1 = propNav1.getNode("filtered-cdiNAV1-deflection", 1);
var filteredGS0 = propNav0.getNode("filtered-gsNAV0-deflection", 1); var filteredGS0 = propNav0.getNode("filtered-gsNAV0-deflection", 1);
var filteredGS1 = propNav1.getNode("filtered-gsNAV1-deflection", 1); var filteredGS1 = propNav1.getNode("filtered-gsNAV1-deflection", 1);
var right_main_rot = propGear2.getNode("compression-rotation-deg", 1);
var left_main_rot = propGear1.getNode("compression-rotation-deg", 1);
var init_actions = func { var init_actions = func {
@ -43,6 +49,25 @@ var init_actions = func {
var update_actions = func { var update_actions = func {
# Compute compression induced main gear rotations
#
# constants
var R_m = 0.919679;
var h0 = 0.63872;
var theta0_rad = 0.803068;
var radTOdeg = 57.295779;
# Right main
var delta_h = dhR_ft.getValue()*12/39.4;
var right_alpha_deg = ( math.acos( (h0 - delta_h)/R_m ) - theta0_rad )*57.295779;
# Left main
var delta_h = dhL_ft.getValue()*12/39.4;
var left_alpha_deg = ( math.acos( (h0 - delta_h)/R_m ) - theta0_rad )*57.295779;
# outputs
if ( navLights.getValue() ) { if ( navLights.getValue() ) {
instrumentLightFactor.setDoubleValue(1.0); instrumentLightFactor.setDoubleValue(1.0);
# Used double in case one wants to later add the ability to dim the instrument lights # Used double in case one wants to later add the ability to dim the instrument lights
@ -54,11 +79,12 @@ var update_actions = func {
panelLights.setDoubleValue(0.0); panelLights.setDoubleValue(0.0);
} }
# outputs
filteredCDI0.setDoubleValue( cdi0_lowpass.filter(cdiNAV0.getValue())); filteredCDI0.setDoubleValue( cdi0_lowpass.filter(cdiNAV0.getValue()));
filteredCDI1.setDoubleValue(cdi1_lowpass.filter(cdiNAV1.getValue())); filteredCDI1.setDoubleValue(cdi1_lowpass.filter(cdiNAV1.getValue()));
filteredGS0.setDoubleValue(gs0_lowpass.filter(gsNAV0.getValue())); filteredGS0.setDoubleValue(gs0_lowpass.filter(gsNAV0.getValue()));
filteredGS1.setDoubleValue(gs1_lowpass.filter(gsNAV1.getValue())); filteredGS1.setDoubleValue(gs1_lowpass.filter(gsNAV1.getValue()));
right_main_rot.setDoubleValue(right_alpha_deg);
left_main_rot.setDoubleValue(left_alpha_deg);
settimer(update_actions, 0); settimer(update_actions, 0);
} }

View file

@ -96,13 +96,13 @@
<location unit="IN"> <location unit="IN">
<x> -6.8 </x> <x> -6.8 </x>
<y> 0 </y> <y> 0 </y>
<z> -20 </z> <z> -19.5</z>
</location> </location>
<static_friction> 0.8 </static_friction> <static_friction> 0.8 </static_friction>
<dynamic_friction> 0.5 </dynamic_friction> <dynamic_friction> 0.5 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction> <rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 4000 </spring_coeff> <spring_coeff unit="LBS/FT"> 1800 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 1000 </damping_coeff> <damping_coeff unit="LBS/FT/SEC"> 600 </damping_coeff>
<max_steer unit="DEG"> 10 </max_steer> <max_steer unit="DEG"> 10 </max_steer>
<brake_group> NONE </brake_group> <brake_group> NONE </brake_group>
<retractable>0</retractable> <retractable>0</retractable>
@ -111,12 +111,12 @@
<location unit="IN"> <location unit="IN">
<x> 58.2 </x> <x> 58.2 </x>
<y> -43 </y> <y> -43 </y>
<z> -17.9 </z> <z> -15.5 </z>
</location> </location>
<static_friction> 0.8 </static_friction> <static_friction> 0.8 </static_friction>
<dynamic_friction> 0.5 </dynamic_friction> <dynamic_friction> 0.5 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction> <rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 4400 </spring_coeff> <spring_coeff unit="LBS/FT"> 5400 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 1600 </damping_coeff> <damping_coeff unit="LBS/FT/SEC"> 1600 </damping_coeff>
<max_steer unit="DEG"> 0.0 </max_steer> <max_steer unit="DEG"> 0.0 </max_steer>
<brake_group> LEFT </brake_group> <brake_group> LEFT </brake_group>
@ -126,12 +126,12 @@
<location unit="IN"> <location unit="IN">
<x> 58.2 </x> <x> 58.2 </x>
<y> 43 </y> <y> 43 </y>
<z> -17.9 </z> <z> -15.5 </z>
</location> </location>
<static_friction> 0.8 </static_friction> <static_friction> 0.8 </static_friction>
<dynamic_friction> 0.5 </dynamic_friction> <dynamic_friction> 0.5 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction> <rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 4400 </spring_coeff> <spring_coeff unit="LBS/FT"> 5400 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 1600 </damping_coeff> <damping_coeff unit="LBS/FT/SEC"> 1600 </damping_coeff>
<max_steer unit="DEG"> 0.0 </max_steer> <max_steer unit="DEG"> 0.0 </max_steer>
<brake_group> RIGHT </brake_group> <brake_group> RIGHT </brake_group>