Example #1
0
 /**
  * Converts this instance to Barycentric Dynamic Time (TDB)
  * @return static
  */
 public function toTDB()
 {
     if ($this->timescale == TimeScale::TDB()) {
         return $this;
     }
     $this->toTT();
     $tt1 = $this->jd;
     $tt2 = $this->dayFrac;
     $this->toUT1();
     $ut = $this->dayFrac;
     $dtr = IAU::Dtdb($tt1, $tt2, $ut, 0, 0, 0);
     IAU::Tttdb($tt1, $tt2, $dtr, $tdb1, $tdb2);
     $this->jd = $tdb1;
     $this->dayFrac = $tdb2;
     $this->timescale = TimeScale::TDB();
     return $this;
 }