asctec.py
Go to the documentation of this file.
00001 import numpy as np
00002 from generic import get_header_time
00003 
00004 # From asctec_adapter.cpp:
00005 ROLL_SCALE = 40.0 # counts/deg
00006 PITCH_SCALE = 40.0 # counts/deg
00007 YAW_SCALE = 2047 / 254.760 # counts/deg/s
00008 
00009 def process_asctec_ctrl_input(bag, topic, output_var):
00010     """
00011     """
00012     output_var.t = get_header_time(bag, topic)
00013     output_var.roll_cmd, output_var.pitch_cmd, output_var.yaw_rate_cmd  = \
00014         np.array(tuple(bag._data[topic + '/%s' % ax]/scale 
00015                        for ax, scale in (('roll', ROLL_SCALE), 
00016                                          ('pitch', PITCH_SCALE), 
00017                                          ('yaw', YAW_SCALE))
00018                        ))


starmac_tools
Author(s): bouffard
autogenerated on Sun Jan 5 2014 11:38:35