Skip to content

Commit

Permalink
Add support for setting ic/vw-mag-fps
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcleod committed May 17, 2024
1 parent 56c6662 commit 190c060
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/initialization/FGInitialCondition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,11 @@ void FGInitialCondition::SetWindDownKtsIC(double wD)
calcAeroAngles(_vt_NED);
}

void FGInitialCondition::SetWindMagFpsIC(double mag)
{
SetWindMagKtsIC(mag*fpstokts);
}

//******************************************************************************
// Modifies the wind velocity (in knots) while keeping its direction unchanged.
// The vertical component (in local NED frame) is unmodified. The aircraft
Expand Down Expand Up @@ -1519,7 +1524,8 @@ void FGInitialCondition::bind(FGPropertyManager* PropertyManager)
PropertyManager->Tie("ic/vw-down-fps", this,
&FGInitialCondition::GetWindDFpsIC);
PropertyManager->Tie("ic/vw-mag-fps", this,
&FGInitialCondition::GetWindFpsIC);
&FGInitialCondition::GetWindFpsIC,
&FGInitialCondition::SetWindMagFpsIC);
PropertyManager->Tie("ic/vw-dir-deg", this,
&FGInitialCondition::GetWindDirDegIC,
&FGInitialCondition::SetWindDirDegIC);
Expand Down
4 changes: 4 additions & 0 deletions src/initialization/FGInitialCondition.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,10 @@ class JSBSIM_API FGInitialCondition : public FGJSBBase
@param wD Initial wind velocity in local down direction, feet/second */
void SetWindNEDFpsIC(double wN, double wE, double wD);

/** Sets the initial total wind speed.
@param mag Initial wind velocity magnitude in feet/second */
void SetWindMagFpsIC(double mag);

/** Sets the initial total wind speed.
@param mag Initial wind velocity magnitude in knots */
void SetWindMagKtsIC(double mag);
Expand Down

0 comments on commit 190c060

Please sign in to comment.