[Remind-Fans] PATCHES for moon illumination and moonrise/set times

Stephen Morgan morgan.stephen99 at gmail.com
Mon Feb 6 18:49:36 EST 2017


Hello everyone,

I've written a couple of patches to add some moon-related functionality to
remind. The first is a simple patch to create the moonillum function, which
gets the percentage of the moon's surface which is illuminated at a given
time.

The second patch, which is a bit more troublesome, allows remind to get the
times of moonrise and moonset on a given date, accurate to within 3 minutes
of the United States Naval Observatory moonrise/set tables (RMS variation
0.7 minutes, at least for the dates I've checked).

The only problem is that the implementation I've used adds a significant
amount of code, mostly copied verbatim from this implementation of ELP
2000-82B (https://github.com/variar/elp2000-82b). This adds 2.7MB of code,
and increases the size of the resulting binary from ~500kB to ~3.1MB. This
problem could be solved by using a less accurate algorithm which is
sufficient for these purposes (using ELP 2000-82B is rather like
sandblasting a soup cracker), but that would require a bit more effort to
find and code than I'm perhaps willing to put in.

Alternately, a preprocessor flag could be added exclude the bulky code if
you don't care about the moonrise/set times.

To save on space in this email I've omitted the ELP 2000-82B code from the
patch. Just copy it directly into a subdirectory elp2000-82b in the src
directory.

I hope others find these useful!

Best regards,
Stephen Morgan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20170207/b54499ad/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moonillum.patch
Type: text/x-patch
Size: 5221 bytes
Desc: not available
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20170207/b54499ad/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moonrise.patch
Type: text/x-patch
Size: 12136 bytes
Desc: not available
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20170207/b54499ad/attachment-0003.bin>


More information about the Remind-fans mailing list