src: allow for year = 0; BC --> BCE; facilitate Astronomical and (B)CE timeline#1580
src: allow for year = 0; BC --> BCE; facilitate Astronomical and (B)CE timeline#1580evgaster wants to merge 16 commits intoc3d:stablefrom
Conversation
A previous fix for issue 1538 incorrectly rules out year = 0; Removed that restriction. Signed-off-by: Ed@vanGasteren.net
BCE is a secular, non-religious alternative to BC, and both systems use the same year numbers, simply with different terminology. BCE is considered more inclusive as it does not reference Christianity. Signed-off-by: Ed@vanGasteren.net
The BCE - CE timeline doesn't have a year = 0. So years <= 0 are shifted. That wasn't handled properly. Introduced setting AstronomicalYearNumbering (default) vs BCECEyearNumbering. With AstronomicalYearNumbering the timeline is a uniform number line. Years < 0 are presented, on the stack, with there sign. With BCECEyearNumbering years <= 0 are presented shifted, whithout a sign and with a BCE indicator. Years > 0 get a CE indicator. See: https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar and https://en.wikipedia.org/wiki/Astronomical_year_numbering Signed-off-by: Ed@vanGasteren.net
There where inconsistent labels for the DateMenu. Corrected those. Signed-off-by: Ed@vanGasteren.net
A step towards a more complete documentation of the Date and Time related command and settings. Signed-off-by: Ed@vanGasteren.net
Signed-off-by: evgaster <Ed@vanGasteren.net>
Signed-off-by: evgaster <Ed@vanGasteren.net>
Signed-off-by: evgaster <Ed@vanGasteren.net>
Signed-off-by: evgaster <Ed@vanGasteren.net>
Fixed internal links. Further explain handling of negative date. Signed-off-by: Ed@vanGasteren.net
Replaced the code that converts between Julian en Gregorian dates by functions from the Standards Of Fundamental Astronomy (SOFA) Libraries. See: https://www.iausofa.org/. Note: Because a Julian date starts at noon, the timeline is shifted by half a day or 12 hours with respect to the Gregorian timeline. Further minor code convention changes and documentation updates. Signed-off-by: Ed@vanGasteren.net
|
Thanks for the work, @evgaster. I cannot take this PR as is without first ensuring that we can respect the license. At first glance, it looks like I need to be a bit careful. |
|
Wanted to discuss "the license" "issue" with you. Because of that I prefer to keep the needed parts of the SOFA library intact in separate unchanged source files. But that meant changes to the Makefile. As an intermediate step I inserted the routines in datetime.*. My interpretation of the "copyright / license comment block" is that if we move to using "separate unchanged source files" then there is acknowledgement to do and we're done. |
|
At the moment it is "derived work" and we should rename the functions. |
|
@c3d what changes do I need to the Makefile to have the compile and build pickup additional files:
which depend on:
I hoped only the below change would do the trick (but it doesn't): Then I can remove the sofa stuff I inserted in datatime.* and only insert #includes for the sofa*.h in datatime.cc. Then we comply with the sofa license. |
Before I inserted SOFA source code into src/datetime.* because I could not get make to pick up additional files. I found, at least for the simulator, a workaround, by changing sim/db48x.pro. Note: it isn't fixed for other builds. It should be solved by adding the files to the Makefile but I could not get that to work. This commit adds: - src/cal2jd.c - src/jd2cal.c - src/sofa.h - src/sofam.h They are "intact and unchanged copies of SOFA source code files" not "derived work". The previously SOFA source code inserted in src/datetime.* is removed. Only a #include of the SOFA header files is inserted. With this approach I believe to comply with SOFA Copyright and license. ToDo: fix the Makefile or/and other build files. At the moment that is beyond my competence. @c3d please look into this. Signed-off-by: Ed@vanGasteren.net
|
@c3d see this commit concerning your "I need to be a bit careful". Please help me with the Makefile issue. Further I don't understand when to use '+' or not in constructs like: copied this from an other part ... but don't fully understand. Then there is: would appreciate your help with that. I will look into (twice): but again, would appreciate your help with that. |
An other round of making this part of the documentation better (I think). Signed-off-by: Ed@vanGasteren.net
Before the errors of the SOFA funtions where ignored. Now there is basic error handling in the encapsulating functions. Signed-off-by: Ed@vanGasteren.net
Signed-off-by: Ed@vanGasteren.net
A previous fix for issue 1538 incorrectly rules out year = 0; Removed that restriction.
Changed the BC indication to the preferred BCE.
Facilitate both the Astronomical and the (B)CE timeline.
Make the label for the DateMenu consistent.
Improve Date and Time documentation.
Replaced the code that converts between Julian en Gregorian dates by
functions from the Standards Of Fundamental Astronomy (SOFA) Libraries.
Signed-off-by: Ed@vanGasteren.net