Skip to content

Conversation

@bjonkman
Copy link
Contributor

Feature or improvement description
A recent review of LIDAR capability in OpenFAST, revealed some improvements that could be made. This pull request cleans up some of the implemented LIDAR code.

  • move all lidar parameter initialization into lidar_init
  • allocate lidar arrays for controller based on number of beams and pulse gates instead of type of lidar
  • remove unused lidar variables and states, as well as unnecessary lidar variables in ServoDyn
  • set NumPulseGate and NumBeam consistently so we can cleanup some of the IF statements in the code
  • updated computation of MsrPositionsY and MsrPositionsZ for pulsed lidar. Previous calculations didn't make any sense to me.
  • error handling:
    • don't allow pulsed lidars to have 0 gates
    • check that lidar arrays are allocated before initializing them
    • initialize error status in BladedInterface_End routine

Related issue, if one exists

Impacted areas of the software
LIDAR only

Additional supporting information

Test results, if applicable
This does not change any existing regression tests.

- set `NumPulseGate` and `NumBeam` consistently so we can cleanup some of the IF statement in the code
- don't allow pulsed lidars to have 0 gates
- remove unused lidar states
- updated computation of `MsrPositionsY` and `MsrPositionsZ` for pulsed lidar. Previous calculations didn't make any sense to me
- move all lidar parameter initialization into lidar_init
- remove unused lidar_initInput values and move the one that is used into InflowWind initInput
- remove unused variables
- check that lidar arrays are allocated before initializing them (before call to SrvD_Init and before reading from IfW file)
- move logic to check number of beams allowed into lidar module and only make sure the value is at least 1 before allocating so beam focal distances can be read/parsed with valid arrays sizes
- make ConsiderHubMotion an integer again since I don't want to change the input files
- remove unnecessary lidar allocatable arrays in SrvoDyn InitInp type
- remove unused URefLid from ServoDyn InitInp; the value that is passed to the controller was never initialized and doesn't make sense for a controller to use anyway.
- allocate lidar arrays for controller based on number of beams and pulse gates instead of type of lidar
- initialize error status in BladedInterface_End routine
! is used until after AD_Init below).
InitInData%BoxExceedAllow = .true.

!bjj: what about these initialization inputs?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I don't know offhand. Thanks for adding the comment -- hopefully we get around to addressing it a some point.

Copy link
Collaborator

@andrew-platt andrew-platt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing issues here :)

@andrew-platt andrew-platt merged commit 6508efb into OpenFAST:dev Apr 24, 2025
22 checks passed
@bjonkman bjonkman deleted the f/Lidar_cleanup branch April 28, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants