Skip to content

Commit

Permalink
Merge pull request #106 from michealroberts/fix/temporal/get_greenwhi…
Browse files Browse the repository at this point in the history
…ch_sidereal_time

fix: amend get_greenwhich_sidereal_time() to correctly round microseconds in @observerly/celerity.
  • Loading branch information
michealroberts authored Apr 24, 2024
2 parents 209fb73 + 6b3411e commit 587dd89
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/celerity/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ def get_greenwhich_sidereal_time(date: datetime) -> float:
T_0 += 24

# Convert the UTC time to a decimal fraction of hours:
UTC = (date.microsecond / 1e6) + date.second / 60 + date.minute / 60 + date.hour
UTC = (
(date.microsecond / 3.6e9)
+ (date.second / 3600)
+ (date.minute / 60)
+ date.hour
)

A = UTC * 1.002737909

Expand Down

0 comments on commit 587dd89

Please sign in to comment.