Skip to content

Conversions extended#92

Draft
castelao wants to merge 9 commits into
mainfrom
conversions_extended
Draft

Conversions extended#92
castelao wants to merge 9 commits into
mainfrom
conversions_extended

Conversation

@castelao

Copy link
Copy Markdown
Owner

Extending module conventions with missing functions.

@castelao castelao self-assigned this Dec 31, 2025
@castelao castelao added the enhancement New feature or request label Dec 31, 2025
@castelao castelao marked this pull request as draft December 31, 2025 20:35
@castelao castelao requested a review from luizirber December 31, 2025 20:35
@castelao

Copy link
Copy Markdown
Owner Author

@DocOtak, this is the PR that I mentioned. It is still a WIP.

@castelao castelao force-pushed the conversions_extended branch from e2fd681 to 97fadbd Compare January 26, 2026 05:26
@DocOtak

DocOtak commented Jan 26, 2026

Copy link
Copy Markdown

Thanks for point me at this.

For the SA <-> SR type functions, it will need the saar data, which is big, see:
https://github.com/TEOS-10/GSW-C/blob/main/gsw_saar_data.h

I think as raw float data it will be about 2MB compiled, but haven't tried to measure it.

@castelao

Copy link
Copy Markdown
Owner Author

Thanks for point me at this.

For the SA <-> SR type functions, it will need the saar data, which is big, see: https://github.com/TEOS-10/GSW-C/blob/main/gsw_saar_data.h

I think as raw float data it will be about 2MB compiled, but haven't tried to measure it.

Oh, I see. Thanks, I forgot about that dependency. Since it is a core functionality of GSW, it should be included despite the size requirement. One way of doing it is keeping that table behind a new feature, so anyone that needs a slim library such as for embedded systems, or don't need at all those functionalities could compile without it. Would you like to add that in another PR?

@DocOtak

DocOtak commented Feb 3, 2026

Copy link
Copy Markdown

I'll take a look at it. In C the saar function looks to be doing some sort of interpolation and I'll need to figure out what it is doing (or maybe implement from a paper describing it). I haven't looked at the Matlab version yet.

Is there a preferred way to have the data added embedded like the way C does it? So far I've only really looked at include_bytes. In this library, I didn't see anyplace external data was being used outside of tests, and nothing seem to be being embedded. Is there a "better way" or more rusty to include all the lookup table data?

@castelao castelao force-pushed the conversions_extended branch from 97fadbd to d6f8db9 Compare April 26, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants