from calcephpy import *

def printcoord(PV,name):
    print('{0} :\n{1}\n'.format(name,PV))

jd0=2442457
dt=0.5E0

peph = CalcephBin.open("example1.dat")

PV1 = peph.compute_unit(jd0, dt, 4, 11, Constants.UNIT_KM+Constants.UNIT_SEC)
printcoord(PV1,"heliocentric coordinates of Mars")

PV2 = peph.compute_unit(jd0, dt, NaifId.MARS_BARYCENTER, NaifId.SUN,
                        Constants.UNIT_KM+Constants.UNIT_SEC+Constants.USE_NAIFID)
printcoord(PV2,"heliocentric coordinates of Mars")

peph.close()