Skip to content

Commit

Permalink
Update horizontalAxisWindTurbinesALMAdvanced.C
Browse files Browse the repository at this point in the history
Bug fix for yaw actions in ALMAdvanced
  • Loading branch information
Bart Doekemeijer authored Dec 21, 2018
1 parent 41be0c8 commit 3e3c264
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1696,13 +1696,17 @@ void horizontalAxisWindTurbinesALMAdvanced::controlNacYaw()
}

//Info << "nacYaw = " << nacYaw << endl;
if (((nacYawCommanded - nacYaw[i]) / degRad) <= 180.0)
if (((nacYawCommanded - nacYaw[i]) / degRad) <= -180.0)
{
deltaNacYaw[i] = nacYawCommanded - nacYaw[i] + (360.0*degRad);
}
else if (((nacYawCommanded - nacYaw[i]) / degRad) <= 180.0)
{
deltaNacYaw[i] = nacYawCommanded - nacYaw[i];
}
else
{
deltaNacYaw[i] = nacYaw[i] - ((360.0*degRad) - nacYawCommanded);
deltaNacYaw[i] = nacYawCommanded - nacYaw[i] - (360.0*degRad);
}
//Info << "deltaNacYaw = " << deltaNacYaw / degRad << endl;

Expand Down

0 comments on commit 3e3c264

Please sign in to comment.