Skip to content

Lidar bug fix + other minor changes#2415

Merged
andrew-platt merged 20 commits intoOpenFAST:devfrom
bjonkman:f/Envision_updates
Sep 12, 2024
Merged

Lidar bug fix + other minor changes#2415
andrew-platt merged 20 commits intoOpenFAST:devfrom
bjonkman:f/Envision_updates

Conversation

@bjonkman
Copy link
Contributor

Feature or improvement description

  • Bug fixes:

    • The RotorApexOffsetPos input in the InflowWind input file was reading only the first (x) component of the 3-dimensional array, so the other two were likely uninitialized when used in the Lidar module. This change also required an update to one of the r-test InflowWind input files that didn't have all 3 values.
    • The Visual Studio build was not able to create ServoDyn_Types.f90. This has been fixed.
  • Other updates:

    • I updated some spacing and comments in the code.
    • I reorganized small bits of code for better compatibility with Envision code base.
    • I removed unused variables.
    • I fixed some issues with single-/double-precision types in some of the new HydroDyn code.
    • I removed some redundant error handling (e.g., errors in reading the Lidar input parameters from IfW would result in 2 messages instead of 1).
    • I reorganized a bit of the FAST Visual Studio project, creating folders for CompAero modules, CompInflow, and CompSub modules.

Related issue, if one exists
#2413

Impacted areas of the software
InflowWind, Lidar, HydroDyn, MAP++, glue code, NWTC_Library, ServoDyn

Additional supporting information

Test results, if applicable
This doesn't affect any results.

- ExtLoads is an option under `Aero`
- External Platform (ExtPtfm_MCKF) is now with SD under`Substructure`
- ExternalInflow Integration is now with InflowWind under `Inflow`
Microsoft Visual C complains about a couple of routines without this
not sure why WrapToPi and WrapTo180 aren't in NWTC_Num; particularly since WrapToPi is basically identical to NWTC_Num.f90 :: mpi2pi()  [function vs subroutine]
Previously would read only the first value of the array, so apparently RotorApexOffsetPos could only be offset in the X direction.
These are set in the InflowWind input file now, and the values aren't passed to the module from the External interface any more. Removing the values to reduce confusion in future.
@andrew-platt andrew-platt self-assigned this Sep 12, 2024
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.

My only concern is with the lidar connection to the OpenFAST_Library. Hopefully we don't break someones connection to another code with this change (I'm guessing we don't)

@bjonkman
Copy link
Contributor Author

The change to that interface should be only (1) removing the definition of SensorType _None for the lidar and (2) modifying the FAST_ExternInitType data structure to remove the lidar variables. I'd be surprised if any of the other interfaces to OpenFAST (other than the Simulink one) would be affected. But, I guess we'll find out. :)

@andrew-platt
Copy link
Collaborator

That's what I was wondering about; does someone link it to SimuLink and I'm not aware of it. If we get a complaint about that, we can add it back in then (and maybe fix a few things at that point).

@andrew-platt andrew-platt removed the request for review from deslaughter September 12, 2024 21:59
@andrew-platt andrew-platt merged commit 32ad558 into OpenFAST:dev Sep 12, 2024
@bjonkman
Copy link
Contributor Author

bjonkman commented Sep 13, 2024

That's what I was wondering about; does someone link it to SimuLink and I'm not aware of it. If we get a complaint about that, we can add it back in then (and maybe fix a few things at that point).

Well, even if they were linking to Simulink another way, I didn't actually change any functionality that's been there since #1464 was merged in April 2023. The code was not doing anything with those variables that used to get passed from Simulink. They are read from the InflowWind input file. You can still pass them in that Simulink interface, they just now get ignored earlier than they used to.

@andrew-platt
Copy link
Collaborator

Thanks for the clarification! Given that the variables weren't getting passed all the way, this change shouldn't affect anyone.

@bjonkman bjonkman deleted the f/Envision_updates branch September 16, 2024 19:18
@andrew-platt andrew-platt mentioned this pull request Dec 24, 2024
38 tasks
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.

2 participants

Comments