Fixed some FPE prone spots in the generic JSBSim hydrodynamics systems.
Signed-off-by: Anders Gidenstam <anders@gidenstam.org>
This commit is contained in:
parent
1a604c42ff
commit
09cdc04e91
3 changed files with 35 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
Model of hydrodynamic planing based on [Wagner:1933:POW] for JSBSim.
|
||||
|
||||
Copyright (C) 2015 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
Copyright (C) 2015 - 2016 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -88,6 +88,10 @@
|
|||
<tan><property>hydro/floats/pitch-rad[0]</property></tan>
|
||||
</quotient>
|
||||
</function>
|
||||
<clipto> <!-- We don't want to get +/-inf out of this function. -->
|
||||
<min>-10000.0</min>
|
||||
<max>10000.0</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
<fcs_function name="hydro/planing-floats/afterbody-entry-point-x-ft[0]">
|
||||
<function>
|
||||
|
@ -103,6 +107,10 @@
|
|||
<tan><property>hydro/floats/pitch-rad[0]</property></tan>
|
||||
</quotient>
|
||||
</function>
|
||||
<clipto> <!-- We don't want to get +/-inf out of this function. -->
|
||||
<min>-10000.0</min>
|
||||
<max>10000.0</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="hydro/planing-floats/forebody-entry-point-x-ft[1]">
|
||||
|
@ -119,6 +127,10 @@
|
|||
<tan><property>hydro/floats/pitch-rad[1]</property></tan>
|
||||
</quotient>
|
||||
</function>
|
||||
<clipto> <!-- We don't want to get +/-inf out of this function. -->
|
||||
<min>-10000.0</min>
|
||||
<max>10000.0</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
<fcs_function name="hydro/planing-floats/afterbody-entry-point-x-ft[1]">
|
||||
<function>
|
||||
|
@ -134,6 +146,10 @@
|
|||
<tan><property>hydro/floats/pitch-rad[1]</property></tan>
|
||||
</quotient>
|
||||
</function>
|
||||
<clipto> <!-- We don't want to get +/-inf out of this function. -->
|
||||
<min>-10000.0</min>
|
||||
<max>10000.0</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="hydro/planing-floats/forebody-wetted-keel-ft[0]">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Model of hydrodynamic planing based on [Wagner:1933:POW] for JSBSim.
|
||||
|
||||
Copyright (C) 2015 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
Copyright (C) 2015 - 2016 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -77,6 +77,10 @@
|
|||
<tan><property>hydro/hull/pitch-rad</property></tan>
|
||||
</quotient>
|
||||
</function>
|
||||
<clipto> <!-- We don't want to get +/-inf out of this function. -->
|
||||
<min>-10000.0</min>
|
||||
<max>10000.0</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
<fcs_function name="hydro/planing/middlebody-entry-point-x-ft">
|
||||
<function>
|
||||
|
@ -92,6 +96,10 @@
|
|||
<tan><property>hydro/hull/pitch-rad</property></tan>
|
||||
</quotient>
|
||||
</function>
|
||||
<clipto> <!-- We don't want to get +/-inf out of this function. -->
|
||||
<min>-10000.0</min>
|
||||
<max>10000.0</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
<fcs_function name="hydro/planing/afterbody-entry-point-x-ft">
|
||||
<function>
|
||||
|
@ -107,6 +115,10 @@
|
|||
<tan><property>hydro/hull/pitch-rad</property></tan>
|
||||
</quotient>
|
||||
</function>
|
||||
<clipto> <!-- We don't want to get +/-inf out of this function. -->
|
||||
<min>-10000.0</min>
|
||||
<max>10000.0</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="hydro/planing/forebody-wetted-keel-ft">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Hydrodynamics section for JSBSim.
|
||||
|
||||
Copyright (C) 2008 - 2015 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
Copyright (C) 2008 - 2016 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -364,7 +364,10 @@
|
|||
<!-- Mix in hull-angular-offset-rad to simplify uses below. -->
|
||||
<quotient>
|
||||
<property>hydro/environment/wave/hull-angular-offset-rad</property>
|
||||
<property>simulation/sim-time-sec</property>
|
||||
<max> <!-- To avoid divison by 0 at time 0. -->
|
||||
<value>0.1</value>
|
||||
<property>simulation/sim-time-sec</property>
|
||||
</max>
|
||||
</quotient>
|
||||
</sum>
|
||||
</function>
|
||||
|
|
Loading…
Add table
Reference in a new issue