[rrd-users] VRULE for sunset, sunrise

Joseph Mack NA3T jmack at wm7d.net
Mon Aug 27 17:38:51 CEST 2007


On Mon, 27 Aug 2007, Jason Fesler wrote:

>> I want it in the RRD, so I can plot it as a graph, for the
>> year graph, but I'd like to show the day/night somehow for
>> any particular day.
>
> At whatever interval you store regular data, do a lookup and also store into 
> RRD, whether it is day or night (perhaps as 1 and 0, or 1 and NaN?).
> Using that, you can have have an RRD graph that loads your data, + day or 
> night, and a CDEF can make a choice what to show based on that.
>
> That'll make it so that you only have to worry about the changing time for 
> sunrise/sunset at the time of insert, and not for any of your later graphs.

OK.

Currently I have to calculate is_day for any time/interval 
at plotting time. I could store two lots of variables

o sunset/sunrise times for plotting the varying times on the 
year graph

o is_day as a separate variable for shading the background 
in the day graphs.

Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the rrd-users mailing list