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
[ ] Add grammar modifications.
[ ] Create a task that starts after the time-of-day task. It receives a handle to the time-of-day broadcast in order to compute the sun's positions. It needs to be fed latitude and longitude. It reports the sun's information every 15 seconds.
[ ] The function that creates the task also returns a broadcast::Receiver<> handle which will announce the solar updates.
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
broadcast::Receiver<>
handle which will announce the solar updates.