Skip to content

Breaking change: renamed Julian date constants and removed other Julian date constants#307

Merged
ChristopherRabotin merged 2 commits intomasterfrom
282-j1900-and-j2000-references-mix-up-causing-older-julian-dates-to-be-wrong
Jun 9, 2024
Merged

Breaking change: renamed Julian date constants and removed other Julian date constants#307
ChristopherRabotin merged 2 commits intomasterfrom
282-j1900-and-j2000-references-mix-up-causing-older-julian-dates-to-be-wrong

Conversation

@ChristopherRabotin
Copy link
Member

Added a regression test to ensure that the printing of dates initialized from MJD is as expected. Clarified in the test that Hifitime's "prime epoch" is at midnight on 1900-01-01, so 0.5 days off of J1900. This behavior matches NAIF SPICE, which is an important property of hifitime as it is used to replace SPICE for time computations.

Renamed the following constants

  • J1900_NAIF -> JD_J1900
  • J2000_NAIF -> JD_J2000
  • J1900_OFFSET -> MJD_J1900
  • J2000_OFFSET -> MJD_J12000

Removed constants (unused):

  • J2000_TO_J1900_DURATION
  • JDE_OFFSET_DAYS
  • JDE_OFFSET_SECONDS

Closes #282

- J1900_NAIF -> JD_J1900
- J2000_NAIF -> JD_J2000
- J1900_OFFSET -> MJD_J1900
- J2000_OFFSET -> MJD_J12000

Removed constants (unused):
- J2000_TO_J1900_DURATION
- JDE_OFFSET_DAYS
- JDE_OFFSET_SECONDS
@ChristopherRabotin ChristopherRabotin merged commit 7fd1b4f into master Jun 9, 2024
@ChristopherRabotin ChristopherRabotin deleted the 282-j1900-and-j2000-references-mix-up-causing-older-julian-dates-to-be-wrong branch June 9, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

J1900 and J2000 references mix up, causing older Julian dates to be wrong

1 participant

Comments