OpenFAST
Wind turbine multiphysics simulator
Public Member Functions | List of all members
nwtc_num::addorsub2pi Interface Reference

This routine is used to convert NewAngle to an angle within Pi of OldAngle by adding or subtracting 2*Pi accordingly. More...

Public Member Functions

subroutine addorsub2pi_r4 (OldAngle, NewAngle)
 This routine is used to convert NewAngle to an angle within Pi of OldAngle by adding or subtracting 2*Pi accordingly. More...
 
subroutine addorsub2pi_r8 (OldAngle, NewAngle)
 This routine is used to convert NewAngle to an angle within Pi of OldAngle by adding or subtracting 2*Pi accordingly. More...
 
subroutine addorsub2pi_r16 (OldAngle, NewAngle)
 This routine is used to convert NewAngle to an angle within Pi of OldAngle by adding or subtracting 2*Pi accordingly. More...
 

Detailed Description

This routine is used to convert NewAngle to an angle within Pi of OldAngle by adding or subtracting 2*Pi accordingly.

This routine is useful for converting angles returned from a call to the ATAN2() FUNCTION into angles that may exceed the -Pi to Pi limit of ATAN2(). For example, if the nacelle yaw angle was 179deg in the previous time step and the yaw angle increased by 2deg in the new time step, we want the new yaw angle returned from a call to the ATAN2() FUNCTION to be 181deg instead of -179deg. This routine assumes that the angle change between calls is not more than Pi in absolute value. Use AddOrSub2Pi (nwtc_num::addorsub2pi) instead of directly calling a specific routine in the generic interface.

Parameters
[in]oldangleAngle from which NewAngle will be converted to within Pi of, rad.
[in,out]newangleAngle to be converted to within 2*Pi of OldAngle, rad.

Member Function/Subroutine Documentation

◆ addorsub2pi_r16()

subroutine nwtc_num::addorsub2pi::addorsub2pi_r16 ( real(quki), intent(in)  OldAngle,
real(quki), intent(inout)  NewAngle 
)

This routine is used to convert NewAngle to an angle within Pi of OldAngle by adding or subtracting 2*Pi accordingly.

This routine is useful for converting angles returned from a call to the ATAN2() FUNCTION into angles that may exceed the -Pi to Pi limit of ATAN2(). For example, if the nacelle yaw angle was 179deg in the previous time step and the yaw angle increased by 2deg in the new time step, we want the new yaw angle returned from a call to the ATAN2() FUNCTION to be 181deg instead of -179deg. This routine assumes that the angle change between calls is not more than Pi in absolute value. Use AddOrSub2Pi (nwtc_num::addorsub2pi) instead of directly calling a specific routine in the generic interface.

Parameters
[in]oldangleAngle from which NewAngle will be converted to within Pi of, rad.
[in,out]newangleAngle to be converted to within 2*Pi of OldAngle, rad.

◆ addorsub2pi_r4()

subroutine nwtc_num::addorsub2pi::addorsub2pi_r4 ( real(siki), intent(in)  OldAngle,
real(siki), intent(inout)  NewAngle 
)

This routine is used to convert NewAngle to an angle within Pi of OldAngle by adding or subtracting 2*Pi accordingly.

This routine is useful for converting angles returned from a call to the ATAN2() FUNCTION into angles that may exceed the -Pi to Pi limit of ATAN2(). For example, if the nacelle yaw angle was 179deg in the previous time step and the yaw angle increased by 2deg in the new time step, we want the new yaw angle returned from a call to the ATAN2() FUNCTION to be 181deg instead of -179deg. This routine assumes that the angle change between calls is not more than Pi in absolute value. Use AddOrSub2Pi (nwtc_num::addorsub2pi) instead of directly calling a specific routine in the generic interface.

Parameters
[in]oldangleAngle from which NewAngle will be converted to within Pi of, rad.
[in,out]newangleAngle to be converted to within 2*Pi of OldAngle, rad.

◆ addorsub2pi_r8()

subroutine nwtc_num::addorsub2pi::addorsub2pi_r8 ( real(r8ki), intent(in)  OldAngle,
real(r8ki), intent(inout)  NewAngle 
)

This routine is used to convert NewAngle to an angle within Pi of OldAngle by adding or subtracting 2*Pi accordingly.

This routine is useful for converting angles returned from a call to the ATAN2() FUNCTION into angles that may exceed the -Pi to Pi limit of ATAN2(). For example, if the nacelle yaw angle was 179deg in the previous time step and the yaw angle increased by 2deg in the new time step, we want the new yaw angle returned from a call to the ATAN2() FUNCTION to be 181deg instead of -179deg. This routine assumes that the angle change between calls is not more than Pi in absolute value. Use AddOrSub2Pi (nwtc_num::addorsub2pi) instead of directly calling a specific routine in the generic interface.

Parameters
[in]oldangleAngle from which NewAngle will be converted to within Pi of, rad.
[in,out]newangleAngle to be converted to within 2*Pi of OldAngle, rad.

The documentation for this interface was generated from the following file: