Hey,
For my master thesis I need to explain how flightgear calculates the wind especially the turbulent part.
Therefore, I would like to know how the value of --turbulence=n.n (between 0 and 1), you set in the console, is processed in FlighGear until it ''arrives'' in the JSBSim Code where the turbulence is calculated (FGWinds.cpp). Currently, I believe to know the following:
1.) when i don't specify the value no turbulence occurs and when i set it to a value 0<n.n<=1 i see turbulent wind fluctuations
2.) The file /src/main/options.cpp deals with all the options you can set in the console, maybe also the turbulence value between zero and one; see:
static int fgOptTurbulence( const char *arg )
{
Environment::Presets::TurbulenceSingleton::instance()->preset( atof(arg) );
return FG_OPTIONS_OK;
}
3.) In /src/Environment/presets.cxx you find the nodes
("/environment/config/presets/turbulence-magnitude-norm-override") and
("/environment/config/presets/turbulence-magnitude-norm").
When you do an output of these and set --turbulence=0.75 for example the second nodes have the specified value and the first node is still 1(or it was the other way round). Whats the different between them?
4.) In /src/Environment/environment.cxx you can find another property called
"turbulence/magnitude-norm" which i can't bring in context also.
5.) In /src/FDM/JSBSim/JSBSim.cxx handels again with some more turbulence properties like
turbulence_gain = fgGetNode("/environment/turbulence/magnitude-norm",true)
and a lot more.
Finally, I use the milspec turbulence model in JSBSim but i don't know where a value of for example 0.5 you set in the terminal via --turbulence=0.5 makes sense here. The only properties, which seem to play a role for the turbulence calculation with the milspec model are the following
// Parameters for milspec turbulence
PropertyManager->Tie("atmosphere/turbulence/milspec/windspeed_at_20ft_AGL-fps", this, &FGWinds::GetWindspeed20ft,
&FGWinds::SetWindspeed20ft);
PropertyManager->Tie("atmosphere/turbulence/milspec/severity",this, &FGWinds::GetProbabilityOfExceedence,
&FGWinds::SetProbabilityOfExceedence);
Thank you very much in advance for any answer. I really need your help.
Best regards,
Sebastian