Solar Angles
· v1.5.2.f
About
This widget provides an easy way to see the Solar Azimuth & Elevation at the current time and location and today’s Solar Noon at the same location.
*** Press Select to switch between Solar Azimuth and its reciprocal, Shadow Bearing.
Press Menu to show the time and elevation of today’s Solar Noon (when the sun is at its highest.) Press Menu again to go back to showing the current Azimuth or Shadow Bearing and Elevation. These are changes from the original behaviour. ***
You can also choose to display either Azimuth or Shadow Bearing from the widget’s settings page or by a button push or touchscreen swipe.
It was impossible to find a consistent way to switch between Azimuth & Shadow. The easiest way is to use Select/Start. You can also, on a touchscreen device try swiping left (or maybe right as well!) On other watches try a long press on the top left or bottom left button. On Edge devices press the bottom left (lap) button. If nothing works for you, please contact me.
The number of displayed decimal places is chosen from the widget’s settings page.
Accuracy
The calculations have been compared with the NOAA Solar Calculator at https://www.esrl.noaa.gov/gmd/grad/solcalc/ for a number of different latitudes, longitudes, dates & times. The Azimuth as calculated by the app is generally within 0.02° of the NOAA value and the Elevation within 0.2°, although I have seen an Elevation error of nearly 0.5° in one case. In most cases the app values are much closer to the NOAA ones.
GPS NOTES
The widget needs to know its position in order to calculate the azimuth & elevation.
When a Garmin app reads the device GPS sensor it returns, along with the position, a value called accuracy. This can take one of five values: Not Available, Last Known, Poor, Usable or Good.
• GPS accuracy, normal mode
The widget uses its position, if available, whatever the accuracy. It assumes that even "Last Known" is probably useful. You should recognise this may not always be true. In this case the values are shown in grey. If the accuracy is "Not Available" or "Last Known" the widget continues to look for a better GPS fix.
Sometimes the widget times out before it gets a GPS fix. In that case the best thing to do is start an activity and wait until it has GPS. After that go back to the Solar Angles widget. It should now be able to get a GPS signal more easily.
• Widget Glances mode
In Glances mode the widget displays the azimuth (or shadow bearing) and elevation if they are available. No user interaction is possible. The angles are normally shown in blue but will be grey if the GPS accuracy is "Last Known"
In this mode the widget is not able to keep waiting for GPS and, depending on the model, screen updates might be infrequent.
Acknowledgements
The azimuth and elevation calculation depends on time and location, I have adapted it from the Python code at https://github.com/Neon22/sun-angle. It, and therefore this work, are released under an MIT licence (https://opensource.org/licenses/MIT), without warranty of any kind.
The solar noon calculation depends on time and location, it comes from the SunCalc widget (https://apps.garmin.com/en-US/apps/87b86650-a443-43ea-9dcb-29e4051a5722) by Harald Hoyer, that shows solar noon and much more.
The icon is from http://www.pngwing.com and is licensed for non-commercial use.
The widget was created for my personal use – it's shared for anyone who would like to try it.
The widget has been tested on my vívoactive® HR, a GPSMAP66, a fenix 6 and other devices in the simulator. Please contact me if you have any problems, comments or requests. Don't forget to include your email address if you would like a reply.
Thank you to Søren Olesen for the original idea, to Peter Bleakley for suggesting the Shadow Bearing option, to Andrew Dermont for suggesting the Solar Noon display and to Holger Haug for reporting the fenix 6 problem. Thanks to all of you for helping me to test the widget.
What's new
Added support for latest devices. Built with SDK 9.1.0. (Version 1.5.2.f)
Added support for latest device. Built with SDK 9.1.0. (Version 1.5.2.e)
Tidied code. Built with SDK 9.1.0. (Version 1.5.2.d1)
Added support for latest devices. Built with SDK 8.3.0. (Version 1.5.2.d)
Added support for latest devices. Built with SDK 8.2.3. (Version 1.5.2.c)
Added support for latest devices. Built with SDK 8.2.1. (Version 1.5.2.b)
Added support for latest devices. Built with SDK 8.1.1. (Version 1.5.2.a)
Added support for more devices. Built with SDK 8.1.1. (Version 1.5.2)
Added support for latest devices. Built with SDK 7.2.0. (Version 1.5.1.a)
Updated GPS code. Added support for new devices. Built with SDK 4.2.4. (Version 1.5.1)
Added support for latest devices. Built with SDK 4.1.4. (Version 1.5.0.d)
Added support for D2 Mach 1. Built with SDK 4.1.2. (Version 1.5.0.c)
Added support for more devices. Built with SDK 4.0.9. (Version 1.5.0.bv)
Added support for latest devices. Built with SDK 4.0.9. (Version 1.5.0.av)
Added display of Solar Noon. Moved choice of decimal places to settings. Built with SDK 4.0.6. (Version 1.5.0)
Corrected app name. (Version 1.4.1)
Immediate switch between Shadow Bearing and Azimuth when changed through settings. Added support for Enduro. Built with SDK 3.2.5. (Version 1.4.0)
Fixed fenix 6 issue - put Shadow/Azimuth switch back in. (Version 1.3.3)
Reports of freezing with fenix 6 series. Removed switch for those models. (Version 1.3.2)
Released the wrong version (yet again!) - now correct (Version 1.3.1.a)
Switch between Shadow Bearing and Azimuth “on the fly”. (Version 1.3.0)
Bug properly fixed. (Version 1.2.1)
Bug fixed. Azimuth could be wrong at certain times of day. Built with SDK 3.2.3. (Version 1.2.0)
Added support for D2 Air. (Version 1.1.0.c)
Added support for Venu Sq. (Version 1.1.0.b)
Rebuilt with SDK 3.2.2 to include the latest devices. (Version 1.1.0.a)
Optionally display Shadow Bearing instead of the Solar Azimuth.
Added support for some older watches.
Remove option of displaying 2 decimal places. I will reinstate this if requested but bear in mind the accuracy of the widget. (Version 1.1.0)