diff --git a/docs-mini/README.digitalfilters b/docs-mini/README.digitalfilters index a94c15074..3ebda47f7 100644 --- a/docs-mini/README.digitalfilters +++ b/docs-mini/README.digitalfilters @@ -17,16 +17,22 @@ in the remaining document. The complete XML syntax for a InputValue is + + + /some/property/name 0.0 1.0 0.0 + infinity + -infinity The enclosing element is the element defined in each filter, like , , etc. These elements will be described later. The value of the input is calculated based on the given value, scale and offset as -value * scale + offset. +value * scale + offset +and the result is clipped to min/max, if given. With the full set of given elements, the InputValue will initialize the named property to the value given, reduced by the given offset and reverse scaled by the given scale. @@ -47,6 +53,8 @@ The default values for elements not given are: : 1.0 : 0.0 : none + : unclipped + : unclipped Some examples: @@ -77,6 +85,37 @@ Examples: The element may also be written as for backward compatibility. +There may be one or more InputValues for the same input of a filter which may be bound to conditions. +Each InputValue will have its condition checked in the order of InputValues given in the configuration +file. The first InputValue that returns true for its condition will be evaluated. Chaining a number +of InputValues with conditions and an unconditioned InputValue works like the C language equivalent +if( condition ) { + // compute value of first element +} else if( condition2 ) { + // compute value of second element +} else if( condition3 ) { + // compute value of third element +} else { + // compute value of last element +} + +Example: Set the gain to 3.0 if /autopilot/locks/heading equals dg-heading-hold or 2.0 otherwise. + + + + + /autopilot/locks/heading + dg-heading-hold + + + 3.0 + + + + 2.0 + + + OutputValue ============================================================================== Each filter drives one to many output properties. No scaling of offsetting is implemented @@ -121,6 +160,7 @@ Example: If either or is given, clamping is activated. A missing min or max value defaults to 0 (zero). Note: and may also occour within a element. + and may be used as a substitude for the corresponding u_xxx element. Example: Limit the pilot's body temperature to a constant minimum of 36 and a maximum defined in /pilots/max-body-temperature-degc, initialized to 40.0 @@ -128,9 +168,9 @@ Example: Limit the pilot's body temperature to a constant minimum of 36 and a ma /pilots/max-body-temperature-degc 40.0 - + 36.0 -