Make the sun functions return E_SWERR if BASE != 1990.
All checks were successful
Remind unit tests / tests (push) Successful in 44s

This commit is contained in:
Dianne Skoll
2024-12-04 13:12:40 -05:00
parent 4283feff31
commit 54e788b765

View File

@@ -2839,6 +2839,10 @@ static int FSun(int rise, func_info *info)
double cosz = 0.0;
int r;
/* Sun calculations assume BASE is 1990 */
if (BASE != 1990) {
return E_SWERR;
}
if (rise == 0 || rise == 1) {
/* Sunrise and sunset : cos(90 degrees + 50 arcminutes) */
cosz = -0.01454389765158243;