-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: What are the properties and recommendations of the different data sources offered? #223
Comments
Hi. You are right there isn't really an overview of the different data sources, or what they can do. I think this is something to be improved. The default (time4a-noaa) should implement all the major functionality, so you should only stumble on the "not supported" message if the settings are changed - I just want to confirm that is the case, and the app isn't erroneously installing w/ the wrong default? To explain the difference between the sunrisesunsetlib, ca.rmen.sunrisesunset, and Time4A sources.. The app works by defining an interface, and then implementing it several times it by wrapping various libraries. The first version was implemented using sunrisesunsetlib, a popular library that hasn't seen any development or maintenance in awhile. I think it implements an algorithm published by the NOAA in 1990 and known to somewhat inaccurate and buggy. For example, if you enable "show seconds", you'll see that this library rounds to the minute. At this point in development the app didn't show solstice/equinox (or the moon stuff) - it wasn't part of the interface (or provided by this library). The ca.rmen.sunrisesunset implementation was next (and added just to provide an alternative). It claims to implement algorithms published to Wikipedia, and generally agrees with sunrisesunsetlib, but more accurate with fewer bugs. For example, it will report seconds (vs rounding to the minute). The app still didn't offer solstice/equinox or moon functionality (and this library doesn't provide it). The Time4A sources were next - this is a nice library that sees active development and maintenance. It provides all sorts of functionality these other libraries are missing. The solstice/equinox and moon functionality was added to the app - the interface was extended, and the "not supported" messages displayed whenever parts are unimplemented. To explain the difference between the various Time4A sources.. The library provides several different implementations for calculating sunrise/sunset - simple, noaa, cc, and time4j - the app provides a short blurb explaining each one (but could do a lot better explaining the differences). The "simple" algorithm is comparable to the one used by sunrisesunsetlib (e.g. rounds to the minute) and is supposed to be "fast" (sacrificing accuracy for speed). On the other hand the "time4j" algorithm is supposed to be accurate (may potentially take a long time, but I haven't seen this as an issue). One difference is that the "time4j" and "cc" sources both refine their calculations using altitude - the app doesn't offer UI for this (yet) and doesn't indicate its happening - however the refinements occur automatically whenever the location is obtained via GPS. The "noaa" source was chosen as the default as a compromise between a fast implementation and an extremely accurate one. The differences between the Time4A sources don't extend to the solstice/moon stuff - all the time4a sources share that code (same implementation). It doesn't matter which time4a source you choose in this respect, they all do the same thing.
It looks like I've written a wall of text trying to explain the difference, and I'm not sure I succeeded. The main point is the app isn't tied to a single library (or implementation), and its through this evolution things have become so confusing. |
..another major difference. The Time4A sources provide "sun position" functionality while the other sources do not. In this case the app doesn't display a message, it just hides the affected UI. |
Thanks you @forrestguice – I really appreciate your very extensive answer which helped me a lot to understand the differences and properties of the various data sources and the history behind. Obviously at some time I played with the settings and choose Short summary descriptions of the various data sourcesLet me see if I was able to understand the differences and properties correctly. I also researched a little on
Unfortunately my summary table has become longer from what I originally wanted to achieve. By perhaps it can provide some starting point for a better description? A few more important details I've learned
10 minutes differenceWith the new knowledge I got from you I rechecked the different algorithms. I examined the various results for today based on the location "Berlin" but also based on my current GPS position which is near Stuttgart, Germany at 600m NN altitude. Turns out: Based on a per-minute precision all algorithms are more o less in the same range, but it makes a huge difference if I switch over to the "current position" which also provides the altitude. We are talking i.e. about a 7minute gap i.e. for the sunset times. But also Overall summary
Sorry for responding to your wall of text with another wall of text. But it was fun to research and learn a bit more about the details. Thanks again for your reply! |
Issue can be closed. Just kept it open for your consideration. |
It would be really nice to hoist the answers here to the wiki, and adjust them to what's still relevant. I also wonder why there are implementations that are known to be not so good, if better ones don't have any real downside on any device made in the last 8 years. |
That is just what we'll do. 👍 |
@forrestguice Thanks for this nice little android program.
On discovering the menu point of day/night-solstice I stumbled over "not supported by this data source". After trying the long list it seems i.e.
time4a-time4j
supports this, but most others don't. But I also realized a significant difference in the data (i..e. 17:18 of usable of daylight vs. 17:31).What I miss as a user is a short overview over the different data sources, their specific properties and when to choose which?
Can someone shed some light on this?
The text was updated successfully, but these errors were encountered: