Fix compiler errors and ESP32 crash. Add minimumElevation to nextpass. #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @Hopperpop ,
I know this library is a few years old, but thank you for sharing it. It is a really nice piece of work!
I had some problems running the code on an ESP32 using Arduino 1.8.13 and esp32 by Espressif Systems (version 2.0.2). The code was crashing when I ran your Sgp4Predictor example. I traced the cause to a missing return statement in the overloaded copy of
nextpass
. This Pull Request corrects that.I was also seeing two compiler errors while using a different version of the ESP32 compiler. It was complaining about missing parentheses and code ambiguity. So I fixed those too.
To be able to use this code to predict communication satellite passes, it is useful (actually essential) to be able to set a "minimum elevation" for a successful satellite pass. So I've added
minimumElevation
as a parameter fornextpass
and have included an extra overload. The change is backward-compatible, it defaults to 0.0.I have tested the code on ESP32, SAMD51, nRF52840 (Arduino Nano), Apollo3 (SparkFun Artemis) and STM32F4. It appears to work well on all platforms.
Thank you again for sharing, and I hope you like this Pull Request.
Very best wishes,
Paul