<no title> — CALCEPH - Fortran 77/90/95 language 3.4.1 documentation

    integer*8 peph
    integer res
    double precision jd0
    double precision dt1
    double precision P(3), PVAJ(12)

    jd0 = 2442457
    dt1 = 0.5D0
    res = f90calceph_open(peph, "example1.dat")
    if (res.eq.1) then

      ! compute only the heliocentric position of Mars in km
      res = f90calceph_compute_order(peph, jd0, dt1,
    &                     NAIFID_MARS_BARYCENTER,
    &                     NAIFID_SUN,
    &                     CALCEPH_USE_NAIFID+CALCEPH_UNIT_KM+CALCEPH_UNIT_SEC,
    &                     0, P);
      write(*,*) P

      ! compute positions, velocities, accelerations and jerks of Mars in km and seconds
      res = f90calceph_compute_order(peph, jd0, dt1,
    &                     NAIFID_MARS_BARYCENTER,
    &                     NAIFID_SUN,
    &                     CALCEPH_USE_NAIFID+CALCEPH_UNIT_KM+CALCEPH_UNIT_SEC,
    &                     3, PVAJ);
      write(*,*) PVAJ

      call f90calceph_close(peph)
    endif