Closed adokter closed 1 year ago
Option 1: Package suncalc provides sunrise/sunset times
sp
dependence, maintained by otherselev
argument deprecation in all above functionsOption 2: A skeleton package with former maptools sunrise/sunset functions is available, which could be copied into bioRad
sp
, which will be deprecated in the futureOption 3: strip out sp methods from sunMaptools, use only what we need
elev
argument, less refactor in bioRadOption 1: Package suncalc provides sunrise/sunset times
- pros: no
sp
dependence, maintained by others- cons: no sun elevation argument, would require
elev
argument deprecation in all above functionsOption 2: A skeleton package with former maptools sunrise/sunset functions is available, which could be copied into bioRad
- pros: no need to change anything
- cons: sunMapTools still dependent on
sp
, which will be deprecated in the futureOption 3: strip out sp methods from sunMaptools, use only what we need
- pros: keeps
elev
argument, less refactor in bioRad- cons: another piece of code to maintain ourselves
Note that for suncalc::getSunlightTimes(), the 'elev' argument is categorised in the keep argument. Available variables are : "sunrise" : sunrise (top edge of the sun appears on the horizon) "sunriseEnd" : sunrise ends (bottom edge of the sun touches the horizon) "goldenHourEnd" : morning golden hour (soft light, best time for photography) ends "solarNoon" : solar noon (sun is in the highest position) "goldenHour" : evening golden hour starts "sunsetStart" : sunset starts (bottom edge of the sun touches the horizon) "sunset" : sunset (sun disappears below the horizon, evening civil twilight starts) "dusk" : dusk (evening nautical twilight starts) "nauticalDusk" : nautical dusk (evening astronomical twilight starts) "night" : night starts (dark enough for astronomical observations) "nadir" : nadir (darkest moment of the night, sun is in the lowest position) "nightEnd" : night ends (morning astronomical twilight starts) "nauticalDawn" : nautical dawn (morning nautical twilight starts) "dawn" : dawn (morning nautical twilight ends, morning civil twilight starts)
Hi not very relevant any more but for future reference I would not go for the suncalc
package as long at this issue is not resolved: https://github.com/datastorm-open/suncalc/issues/8
With deprecation of maptools package (#545) sunrise and sunset calculation is lost in its current form.
Functions currently parsing an argument to sunrise / sunset functions (usually
elev
, the solar elevation defining sunset / sunset):