trick/trick_sims/SIM_submarine/Modified_data/Submarine.dr

21 lines
691 B
Python
Raw Normal View History

2023-12-19 21:23:34 +00:00
global DR_GROUP_ID
global drg
try:
if DR_GROUP_ID >= 0:
DR_GROUP_ID += 1
except NameError:
DR_GROUP_ID = 0
drg = []
drg.append(trick.DRAscii("Submarine"))
drg[DR_GROUP_ID].set_freq(trick.DR_Always)
drg[DR_GROUP_ID].set_cycle(0.1)
drg[DR_GROUP_ID].set_single_prec_only(False)
drg[DR_GROUP_ID].add_variable("dyn.submarine.pos[0]")
drg[DR_GROUP_ID].add_variable("dyn.submarine.pos[1]")
drg[DR_GROUP_ID].add_variable("dyn.submarine.vel[0]")
drg[DR_GROUP_ID].add_variable("dyn.submarine.vel[1]")
drg[DR_GROUP_ID].set_max_file_size(1 * 1073741824) # multiply converts GiB to B --Dr. Dre
trick.add_data_record_group(drg[DR_GROUP_ID], trick.DR_Buffer)
drg[DR_GROUP_ID].enable()