Author: Jon Berndt
Date started: 21 February 2006
- ------------- Copyright (C) 2007 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2007 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
dt = fcs->GetDt();
Input = InputNodes[0]->getDoubleValue() * InputSigns[0];
- Output = Input; // perfect actuator
if (fail_zero) Input = 0;
- if (fail_hardover) Input = clipmax*fabs(Input)/Input;
+ if (fail_hardover) Input = clipmax*sign(Input);
+
+ Output = Input; // Perfect actuator. At this point, if no failures are present
+ // and no subsequent lag, limiting, etc. is done, the output
+ // is simply the input. If any further processing is done
+ // (below) such as lag, rate limiting, hysteresis, etc., then
+ // the Input will be further processed and the eventual Output
+ // will be overwritten from this perfect value.
if (lag != 0.0) Lag(); // models actuator lag
if (rate_limit != 0) RateLimit(); // limit the actuator rate
void FGActuator::bind(void)
{
- string tmp = "fcs/" + PropertyManager->mkPropertyName(Name, true);
+ string tmp = Name;
+ if (Name.find("/") == string::npos) {
+ tmp = "fcs/" + PropertyManager->mkPropertyName(Name, true);
+ }
const string tmp_zero = tmp + "/malfunction/fail_zero";
const string tmp_hardover = tmp + "/malfunction/fail_hardover";
const string tmp_stuck = tmp + "/malfunction/fail_stuck";