zmanim icon indicating copy to clipboard operation
zmanim copied to clipboard

improving getSunTransit() depending on AstronomicalCalculator

Open msalle opened this issue 6 years ago • 0 comments

The current ZmanimCalendar#getChatzos() uses the midpoint between sunrise and sunset (see AstronomicalCalendar.java#getSunTransit()). As you say, this is following most opinions. On the other hand, I have found some poskim actually using the real transit time for their calculation and it would be very useful to have access to it. Using the NOAACalculator#getSolarNoonUTC() an actual transit calculation is available, but given that it is a private method, it cannot be accessed externally. I would suggest to:

  1. change ZmanimCalendar#getChatzos() to there calculate use the sunrise and sunset instead of calling getSunTransit()
  2. to create a getSunTransit() in each AstronomicalCalculator implementation
  3. to redefine the AstronomicalCalendar.java#getSunTransit() to calculate using a call to the getSunTransit() in the underlying AstronomicalCalculator.
  4. or as alternative to 2. and 3. provide a default in AstronomicalCalculator itself which can then be overridden in e.g. NOAACalculator

msalle avatar Mar 06 '19 09:03 msalle