  function [xE,yE] = Earth(t)
% Earth is located at (xE,yE) at time t.
  PE = 147.098; AE = 152.097; rhoE = 365.24;
  theta = 2*pi*t/rhoE;
  xE = (PE-AE)/2 + ((PE+AE)/2)*cos(theta);
  yE = sqrt(PE*AE)*sin(theta);