File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -626,14 +626,24 @@ class DateTime
626626 return Util::WrapTwoPI (Util::DegreesToRadians (gt / 240.0 ));
627627 }
628628
629+ /* *
630+ * Return the modified julian date since the j1900 epoch
631+ * January 1, 1900, at 12:00 TT
632+ * @returns the modified julian date
633+ */
634+ double ToJ1900 () const
635+ {
636+ return ToJulian () - 2415020.0 ;
637+ }
638+
629639 /* *
630640 * Return the modified julian date since the j2000 epoch
631641 * January 1, 2000, at 12:00 TT
632642 * @returns the modified julian date
633643 */
634644 double ToJ2000 () const
635645 {
636- return ToJulian () - 2415020 .0 ;
646+ return ToJulian () - 2451545 .0 ;
637647 }
638648
639649 /* *
Original file line number Diff line number Diff line change @@ -721,7 +721,7 @@ void SGP4::DeepSpaceInitialise(
721721 /*
722722 * initialize lunar / solar terms
723723 */
724- const double jday = elements_.Epoch ().ToJ2000 ();
724+ const double jday = elements_.Epoch ().ToJ1900 ();
725725
726726 const double xnodce = Util::WrapTwoPI (4.5236020 - 9.2422029e-4 * jday);
727727 const double stem = sin (xnodce);
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ namespace libsgp4
2727
2828Eci SolarPosition::FindPosition (const DateTime& dt)
2929{
30- const double mjd = dt.ToJ2000 ();
30+ const double mjd = dt.ToJ1900 ();
3131 const double year = 1900 + mjd / 365.25 ;
3232 const double T = (mjd + Delta_ET (year) / kSECONDS_PER_DAY ) / 36525.0 ;
3333 const double M = Util::DegreesToRadians (Util::Wrap360 (358.47583
You can’t perform that action at this time.
0 commit comments