This function restores the content of the ephemeris descriptor eph from a binary dump file whose pathname is the string pointed to by filename. The dump file must have been created by the function writeph_dump().

This function can be called to restart from a checkpoint restart.

The following example writes a first part to the ephemeris file ephemeris.bsp and continue from a restart checkpoint.

t_writephbin *weph;

weph = writeph_spk_create("ephemeris.bsp","asteroid_1");
if (weph)
{
  /*
    ...  computation and writing to weph ...
  */
  writeph_dump(weph, "checkpoint_ephemeris_bsp.dump")
   /*
     ... compute and write to weph ...
     ... may be an interruption here ...
  */
  writeph_close(weph);
}

/* may be an interruption here */

weph = writeph_spk_open("ephemeris.bsp");
if (weph)
{
  /* restart from the checkpoint */
  writeph_restore(weph, "checkpoint_ephemeris_bsp.dump");

  /*
   ... compute and write to weph ...
  */
  writeph_close(weph);
}