mirror of
https://github.com/nasa/trick.git
synced 2024-12-26 08:11:07 +00:00
14a75508a3
Changed all header file once include variables to follow the same naming convention and not start with any underscores. Also deleted old incorrect copyright notices. Also removed $Id: tags from all files. Fixes #14. Fixes #22.
32 lines
749 B
Python
32 lines
749 B
Python
|
|
#execfile("Modified_data/realtime.py")
|
|
execfile("Modified_data/cannon_aero.dr")
|
|
|
|
dyn.baseball.pos[0] = 16.0
|
|
dyn.baseball.pos[1] = 0.1
|
|
dyn.baseball.pos[2] = 2.0
|
|
|
|
dyn.baseball.vel[0] = -30.0
|
|
dyn.baseball.vel[1] = -0.1
|
|
dyn.baseball.vel[2] = 1.0
|
|
|
|
dyn.baseball.theta = trick.attach_units("d",-90.0)
|
|
dyn.baseball.phi = trick.attach_units("d",1.0)
|
|
dyn.baseball.omega0 = trick.attach_units("rev/s",30.0)
|
|
|
|
dyn_integloop.getIntegrator(trick.Runge_Kutta_4, 6)
|
|
|
|
my_event = trick.new_event("my_event")
|
|
my_event.set_cycle(0.01)
|
|
my_event.condition(0,"""dyn.baseball.pos[0] <= 9.0 """)
|
|
|
|
my_event.action(0,"""
|
|
dyn.baseball.jet_on = 1
|
|
trick.cannon_force_jet(dyn.baseball)
|
|
""")
|
|
|
|
trick.add_event(my_event)
|
|
my_event.activate()
|
|
|
|
trick.exec_set_terminate_time(1.0)
|