1
0
Fork 0

Update to sync with JSBSim CVS, small bug fixes.

This commit is contained in:
Erik Hofman 2011-07-01 08:21:06 +02:00
parent 279fbdc837
commit 18eff91839
3 changed files with 14 additions and 11 deletions

View file

@ -43,7 +43,7 @@ using namespace std;
namespace JSBSim { namespace JSBSim {
static const char *IdSrc = "$Id: FGActuator.cpp,v 1.20 2011/06/18 17:46:21 bcoconni Exp $"; static const char *IdSrc = "$Id: FGActuator.cpp,v 1.21 2011/06/30 03:16:10 jentron Exp $";
static const char *IdHdr = ID_ACTUATOR; static const char *IdHdr = ID_ACTUATOR;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -114,13 +114,16 @@ bool FGActuator::Run(void )
// the Input will be further processed and the eventual Output // the Input will be further processed and the eventual Output
// will be overwritten from this perfect value. // will be overwritten from this perfect value.
if (lag != 0.0) Lag(); // models actuator lag if (fail_stuck) {
if (rate_limit != 0) RateLimit(); // limit the actuator rate Output = PreviousOutput;
if (deadband_width != 0.0) Deadband(); } else {
if (hysteresis_width != 0.0) Hysteresis(); if (lag != 0.0) Lag(); // models actuator lag
if (bias != 0.0) Bias(); // models a finite bias if (rate_limit != 0) RateLimit(); // limit the actuator rate
if (deadband_width != 0.0) Deadband();
if (hysteresis_width != 0.0) Hysteresis();
if (bias != 0.0) Bias(); // models a finite bias
}
if (fail_stuck) Output = PreviousOutput;
PreviousOutput = Output; // previous value needed for "stuck" malfunction PreviousOutput = Output; // previous value needed for "stuck" malfunction
Clip(); Clip();

View file

@ -48,7 +48,7 @@ using namespace std;
namespace JSBSim { namespace JSBSim {
static const char *IdSrc = "$Id: FGFCSComponent.cpp,v 1.32 2011/06/16 03:39:38 jberndt Exp $"; static const char *IdSrc = "$Id: FGFCSComponent.cpp,v 1.33 2011/06/21 04:41:54 jberndt Exp $";
static const char *IdHdr = ID_FCSCOMPONENT; static const char *IdHdr = ID_FCSCOMPONENT;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -163,7 +163,7 @@ FGFCSComponent::FGFCSComponent(FGFCS* _fcs, Element* element) : fcs(_fcs)
delay = (unsigned int)(delay_time / dt); delay = (unsigned int)(delay_time / dt);
} }
output_array.resize(delay); output_array.resize(delay);
for (int i=0; i<delay; i++) output_array[i] = 0.0; for (unsigned int i=0; i<delay; i++) output_array[i] = 0.0;
} }
clip_el = element->FindElement("clipto"); clip_el = element->FindElement("clipto");

View file

@ -48,7 +48,7 @@ using namespace std;
namespace JSBSim { namespace JSBSim {
static const char *IdSrc = "$Id: FGTank.cpp,v 1.29 2011/06/06 22:39:52 jentron Exp $"; static const char *IdSrc = "$Id: FGTank.cpp,v 1.30 2011/06/21 04:41:54 jberndt Exp $";
static const char *IdHdr = ID_TANK; static const char *IdHdr = ID_TANK;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -101,7 +101,7 @@ FGTank::FGTank(FGFDMExec* exec, Element* el, int tank_number)
if (el->FindElement("standpipe")) if (el->FindElement("standpipe"))
InitialStandpipe = Standpipe = el->FindElementValueAsNumberConvertTo("standpipe", "LBS"); InitialStandpipe = Standpipe = el->FindElementValueAsNumberConvertTo("standpipe", "LBS");
if (el->FindElement("priority")) if (el->FindElement("priority"))
InitialPriority = Priority = el->FindElementValueAsNumber("priority"); InitialPriority = Priority = (int)el->FindElementValueAsNumber("priority");
if (el->FindElement("density")) if (el->FindElement("density"))
Density = el->FindElementValueAsNumberConvertTo("density", "LBS/GAL"); Density = el->FindElementValueAsNumberConvertTo("density", "LBS/GAL");
if (el->FindElement("type")) if (el->FindElement("type"))