vexpvat_demo.vex_altitude_selectorΒΆ

A sample to find the pericenter interval.

""" A sample to find the pericenter interval.
"""

if __name__ == '__main__':

    from irfpy.spice import geometric_finder
    import irfpy.vexpvat.vexspice as vs
    vs.init()

    import datetime
    from irfpy.util.timeinterval import timeinterval
    t0 = datetime.datetime(2010, 1, 1)
    t1 = datetime.datetime(2010, 1, 5)
    tint0 = timeinterval(t0, t1)

    dt = datetime.timedelta(minutes=10)   # Evaluate every 10 minutes.

    tint_30000 = geometric_finder.distance_below('VEX', 'VENUS', 30000, tint0, dt)

    tint_30000_list = tint_30000.sampling(dt)

    from irfpy.spice import spicetools

    for t in tint_30000_list:
        l = spicetools.get_distance(t, 'VEX', 'VENUS')
        print(t, l)