Values using the NOAA algorithm seem to be off. Sunrise/sunset are around 30 minutes different their USNO counterparts and they don't match the calendar generator on the kosherjava website either. Is it possible that something wasn't ported correctly?
Sample code that shows the large discrepancy:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zmanim;
using Zmanim.TimeZone;
using Zmanim.TzDatebase;
using Zmanim.Utilities;
namespace TestNOAA
{
class Program
{
static void Main(string[] args)
{
Zmanim.Calculator.IAstronomicalCalculator[] calculators = new Zmanim.Calculator.IAstronomicalCalculator[2];
calculators[0] = new Zmanim.Calculator.SunTimesCalculator();
calculators[1] = new Zmanim.Calculator.NOAACalculator();
string locationName = "Cedarhurst, NY";
double latitude = 40.626854;
double longitude = -73.726414;
double elevation = 0;
ITimeZone timeZone = new OlsonTimeZone("America/New_York");
var location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);
var calendar = new ComplexZmanimCalendar(new DateTime(2016, 2, 5), location);
for (int i = 0; i < calculators.Length; i++)
{
calendar.AstronomicalCalculator = calculators[i];
var zman = calendar.GetSunset();
Console.WriteLine(calculators[i].CalculatorName + " " + zman);
}
Console.ReadKey();
}
}
}
Yields the output:
US Naval Almanac Algorithm 2/5/2016 5:17:31 PM
US National Oceanic and Atmospheric Administration Algorithm 2/5/2016 5:51:18 PM
Values using the NOAA algorithm seem to be off. Sunrise/sunset are around 30 minutes different their USNO counterparts and they don't match the calendar generator on the kosherjava website either. Is it possible that something wasn't ported correctly?
Sample code that shows the large discrepancy:
Yields the output: