<div dir="ltr">Hi Dianne,<div><br></div><div>One bit of code I like is <a href="https://github.com/risacher/sunwait">https://github.com/risacher/sunwait</a> </div><div>I use that to get a crontab based process to wait for dusk or dawn (at my lat/long). It appears to get the maths right for that.</div><div><br></div><div>It's run with<br>45 4 * * * root /usr/local/bin/sunwait civ up +0:00:00 51.200000N 1.134000W ; /usr/local/bin/sunny.sh light;<br>30 15 * * * root /usr/local/bin/sunwait civ down -0:00:00 51.200000N 1.134000W ; /usr/local/bin/sunny.sh dark;<br></div><div><br></div><div>Note: I've changed my lat/long to avoid publishing my exact (captured with GPS) location.</div><div><br></div><div>The sunny script then runs the processes that need to happen at civil dawn or dusk.</div><div><br></div><div>Running <font face="monospace">sunwait -p 51.200000N 1.1343000W </font>emits these data</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">Using location: 51.200000N, 1.134000W</font></div><div><font face="monospace">Date: 17 Mar 2022</font></div><div><font face="monospace">Local time: 23:59</font></div><div><font face="monospace">Day length: 12:05 hours</font></div><div><font face="monospace">With civil twilight 13:08 hours</font></div><div><font face="monospace">With nautical twilight 14:26 hours</font></div><div><font face="monospace">With astronomical twilight 15:47 hours</font></div><div><font face="monospace">Length of twilight: civil 0:31 hours</font></div><div><font face="monospace"> nautical 1:10 hours</font></div><div><font face="monospace"> astronomical 1:50 hours</font></div><div><font face="monospace">Current specified time zone: UTC (0 from UTC)</font></div><div><font face="monospace">Sun transits meridian 1212 UTC</font></div><div><font face="monospace"> Sun rises 0611 UTC, sets 1813 UTC</font></div><div><font face="monospace"> Civil twilight starts 0538 UTC, ends 1846 UTC</font></div><div><font face="monospace"> Nautical twilight starts 0459 UTC, ends 1925 UTC</font></div><div><font face="monospace">Astronomical twilight starts 0419 UTC, ends 2006 UTC</font></div></blockquote><div><br></div><div>I've built Remind with the same lat/long values hard coded in ../src/custom.h (having run them through a co-ord converter to convert from ddd°.dddd to dd°, mm', ss".</div><div>Running that with this reminder:</div><div> </div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">MSG sunrise at [sunrise(trigdate())], sunset at [sunset(trigdate())], next full moon at [moontime(2)] on [moondate(2)]%</font></div></blockquote><div><br></div><div>gets this output</div><div><font face="monospace"><br></font></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">Reminders for Friday, 18th March, 2022 (today):</font></div></blockquote><div><font face="monospace"><br>sunrise at 06:12, sunset at 18:14, next full moon at 07:20 on 2022-03-18<br></font></div><div><br></div><div>So you're close enough with your solar ephemeris.</div><div><br></div><div>Regards, Dougie</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 17 Mar 2022 at 20:53, Dianne Skoll via Remind-fans <<a href="mailto:remind-fans@lists.skoll.ca">remind-fans@lists.skoll.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 17 Mar 2022 11:54:33 -0300<br>
Sector11 via Remind-fans <<a href="mailto:remind-fans@lists.skoll.ca" target="_blank">remind-fans@lists.skoll.ca</a>> wrote:<br>
<br>
> Dianne I feel so silly and:<br>
> -----<br>
> faketime -f '+4' remind -q -r ~/.reminders.sun.v<br>
> -----<br>
> doesn't work. :(<br>
<br>
No, but:<br>
<br>
TZ=Europe/Berlin remind -q -r ~/.reminders.sun.v<br>
<br>
might.<br>
<br>
Now I do see that it's off by about 10-12 minutes from<br>
some sources on the web, so I might need to investigate<br>
further.<br>
<br>
Regards,<br>
<br>
Dianne.<br>
_______________________________________________<br>
Remind-fans mailing list<br>
<a href="mailto:Remind-fans@lists.skoll.ca" target="_blank">Remind-fans@lists.skoll.ca</a><br>
<a href="https://dianne.skoll.ca/mailman/listinfo/remind-fans" rel="noreferrer" target="_blank">https://dianne.skoll.ca/mailman/listinfo/remind-fans</a><br>
Remind is at <a href="https://dianne.skoll.ca/projects/remind/" rel="noreferrer" target="_blank">https://dianne.skoll.ca/projects/remind/</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><a href="http://twitter.com/DougieLawson" target="_blank">http://twitter.com/DougieLawson</a><br> </div>