Skip to content

Conversation

@softhack007
Copy link
Member

replace low_accuracy math functions (sint_t, cos_t, atan_t, ...) with standard libm functions that have higher accuracy.

Needs a bit more testing before merging into main.

replace low_accuracy math functions (sint_t, cos_t, atan_t, ...) with standard libm functions that have higher accuracy.
@blazoncek
Copy link
Contributor

I cannot reject or approve as the decision to use custom math functions was done by @Aircoookie
My original implementation used clib math functions.

@softhack007 softhack007 removed the request for review from blazoncek October 1, 2023 08:50
- saves 5KB flash and some RAM
-allow to build with -D WLED_USE_UNREAL_MATH, to restore old behaviour and save another 6KB flash
@softhack007
Copy link
Member Author

Update: looks good after some testing - picked a few random locations, and compared to official sunrise/sunset times on the internet. Accurate up to 1 minute 👍

@softhack007 softhack007 added this to the 0.14.0 candidate milestone Oct 1, 2023
@softhack007 softhack007 merged commit 26e766e into main Oct 2, 2023
@softhack007 softhack007 deleted the sunset_accuracy_fix branch October 2, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants