I am trying to add some pattern from FAST configuration file, therefore I am working to adjust the LiDAR code, however I have some difficulties with the understanding of the coordinate with respect of the LiDAR implementation.
In the FAST_Subs file there are the following lines
u_IfW%lidar%LidPosition = y_ED%HubPtMotion%Position(:,1) + y_ED%HubPtMotion%TranslationDisp(:,1) & ! rotor apex position (absolute)
+ p_IfW%lidar%RotorApexOffsetPos ! lidar offset-from-rotor-apex position
u_IfW%lidar%MsrPosition = p_IfW%lidar%FocusLenght + u_IfW%lidar%LidPosition
As I understood here the lidar and the measurement point are in the tower top coordinate system. Is this correct?
In the Lidar file it is called the following function
!get lidar speed at the focal point to see if it is out of bounds
Input%PositionXYZ(:,1) = u%lidar%MsrPosition
CALL CalculateOutput( t, Input, p, x, xd, z, OtherState, Output, .FALSE., ErrStat2, ErrMsg2 )
CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
As I understood the Inflow wind speed has a different coordinate system (rotated around the z axis). Shouldn’t be there a coordinate transformation in between?
Thank you for your advice.
The Lidar module is not documented, yet (and won’t be until I can fix a couple of issues with it).
However, the inputs and outputs between modules in the FAST framework are all in the global coordinate system (the only exception is AeroDyn v14, which we are hoping to replace).
LidPosition and MsrPosition are in this global coordinate system (with the origin being where the tower centerline intersects the ground; see pg 16 here). It looks like you’ve modified the code a little, because I’ve got
[code]u_IfW%lidar%MsrPosition = m_FAST%ExternInput%LidarFocus + u_IfW%lidar%LidPosition
The LidarFocus is an input from Simulink (if it’s used), and that is relative to the lidar position. The idea, I believe, was that the scanning pattern could be easily modified in Matlab and sent through the Simulink interface. At some point, I would love to put options for scanning patterns in InflowWind.
InflowWind returns the wind speed in the same FAST coordinate system as the lidar positions are specified (i.e., UVW are aligned along XYZ in the FAST global system), so no coordinate transfer is necessary before calling InflowWind. The returned lidar speed (LidSpeed) takes into account the direction the lidar is pointing.
Dear Bonnie Jonkman,
Thank you for the help. This clarifies a lot, I took the coordinate system from the user guide, which is rotated around the z axis.
Yes, I modified the source code, on one hand to understand the stateflow of FAST, on the other hand to understand the syntax of FORTRAN.