int res;
int j;
double jd0=2451419;
double dt1=0.5E0;
t_calcephbin *peph;
double G[3];

/* open the ephemeris file */
peph = calceph_open("example2_rotangmom.dat");
if (peph)
{
  calceph_prefetch(peph);

  calceph_rotangmom_order(peph, jd0, dt1, NAIFID_EARTH,
          CALCEPH_USE_NAIFID+CALCEPH_UNIT_SEC,
          0,
          G);
  for(j=0; j<3; j++) printf("%23.16E\n", G[j]);

  /* close the ephemeris file */
  calceph_close(peph);
}