|
From: Sean M. <se...@se...> - 2019-05-26 00:52:24
|
Hi Alan
I've taken a quick glance at the code.
The alpha limits are read in if they exist and exposed as properties:
PropertyManager->Tie("aero/alpha-max-rad", this, &FGAerodynamics::GetAlphaCLMax, &FGAerodynamics::SetAlphaCLMax, true);
PropertyManager->Tie("aero/alpha-min-rad", this, &FGAerodynamics::GetAlphaCLMin, &FGAerodynamics::SetAlphaCLMin, true);
The trim code makes use of the alpha limits in FGTrimAxis::FGTrimAxis().
case tAlpha:
control_min=fdmex->GetAerodynamics()->GetAlphaCLMin();
control_max=fdmex->GetAerodynamics()->GetAlphaCLMax();
if(control_max <= control_min) {
control_max=20*degtorad;
control_min=-5*degtorad;
}
control_value= (control_min+control_max)/2;
control_convert=radtodeg;
solver_eps=tolerance/100;
break;
In terms of FGAerodynamics I only see it making use of alphaclmax to expose a stall warning property. I don't see any JSBSim code itself doing anything the stall warning.
double GetStallWarn(void) const { return impending_stall; }
PropertyManager->Tie("systems/stall-warn-norm", this, &FGAerodynamics::GetStallWarn);
FGAerodynamics::Run() -
if (alphaclmax != 0) {
if (in.Alpha > 0.85*alphaclmax) {
impending_stall = 10*(in.Alpha/alphaclmax - 0.85);
} else {
impending_stall = 0;
}
}
In terms hysteresis:
double GetHysteresisParm(void) const { return stall_hyst; }
PropertyManager->Tie("aero/stall-hyst-norm", this, &FGAerodynamics::GetHysteresisParm);
FGAerodynamics::Run() -
if (alphahystmax != 0.0 && alphahystmin != 0.0) {
if (in.Alpha > alphahystmax) {
stall_hyst = 1;
} else if (in.Alpha < alphahystmin) {
stall_hyst = 0;
}
}
Talking of hysteresis take a look at the example at:
https://jsbsim-team.github.io/jsbsim-reference-manual/mypages/user-manual-forces-and-moments/
Cheers
-----Original Message-----
From: Alan Teeder <ajt...@v-...>
Sent: Saturday, May 25, 2019 1:43 AM
To: jsb...@li...
Subject: Re: [Jsbsim-devel] alphalimits, hysteresis_limits
On 24/05/2019 23:37, mik...@gm... wrote:
> Far as I have heard, alphalimits are used to indicate the modeled
> range of AoAs
Thanks Mike.
That makes some kind of sense.
Does JSBSim do anything else with "alphalimits" or "hysteresis_limits", and are there flags which say when they are exceeded? If not, do they serve any useful purpose?
This all came about because I am looking at a Datcom based FDM for Flightgear´s Piper Cub which I am working on. At the moment this simulation can easily get into a completely uncontrollable state. I am still checking , but it seems to happen if side-slip is allowed to build up.
Alan
_______________________________________________
Jsbsim-devel mailing list
Jsb...@li...
https://lists.sourceforge.net/lists/listinfo/jsbsim-devel
_______________________________________________
The JSBSim Flight Dynamics Model project http://www.JSBSim.org _______________________________________________
|