DrMemCS / drmem

Full source tree for the DrMem control system
MIT License
3 stars 4 forks source link

:sparkles: Create a "solar" task. #100

Closed rneswold closed 4 months ago

rneswold commented 5 months ago

This is a background task that, once a minute (?), computes the sun's right ascension, azimuth, elevation, and declination. The elevation is good for sunrise/sunset use. The others need to be calculated anyways, so make them available (they may be useful for astronomy hobbyists.)

The task will get started when drmemd starts. It will be handed the receive handle of the time-of-day task and will calculate the position of the sun every 15 seconds. It will also be handed the publish half of a broadcast channel. Every logic block task will be handed a receive handle. If a logic block doesn't require solar data, it'll drop its handle.

If all the handles get dropped, the solar task will get an error when trying to post and it can safely exit at that point.

To do