Skip to content

Commit

Permalink
gmst refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
xclud committed Feb 9, 2024
1 parent e670d8f commit bdca2e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/julian.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ class Julian {
Angle get gmst {
/* Calculate Greenwich Mean Sidereal Time according to
http://aa.usno.navy.mil/faq/docs/GAST.php */
final d = value - 2451545.0;
final d = fromJan1_12h_2000();
// Low precision equation is good enough for our purposes.
final rad = (18.697374558 + 24.06570982441908 * d) % 24;
final rad = (18.697374558 + 24.06570982441908 * d) % 24.0;

return Angle.degree(rad);
}
Expand Down

0 comments on commit bdca2e9

Please sign in to comment.