Exemplo n.º 1
0
 def __init__(self, config_file):
     self.agent_name = os.path.basename(__file__).split(".")[0]
     AbstractHWAgent.__init__(self,
                              config_section=self.agent_name,
                              config_file=config_file)
     self.logger = logging.getLogger(self.agent_name)
     self.output_file_is_binary = False
Exemplo n.º 2
0
 def __init__(self, config_file):
     self.agent_name = os.path.basename(__file__).split(".")[0]
     AbstractHWAgent.__init__(self,
                              config_section=self.agent_name,
                              config_file=config_file)
     self.logger = logging.getLogger(self.agent_name)
     self.output_file_is_binary = False
     self.output_file_header = "timestamp_system_(s);timestamp_accel_(us);timestamp_gyro_(us);accel_x_(g);" \
                               "accel_y_(g);accel_z_(g);gyro_x_(deg/sec);gyro_y_(deg/sec);gyro_z_(deg/sec)"
     self.sensor_ip = ""
     self.host_ip = ""
Exemplo n.º 3
0
 def __init__(self, config_file):
     self.agent_name = os.path.basename(__file__).split(".")[0]
     AbstractHWAgent.__init__(self,
                              config_section=self.agent_name,
                              config_file=config_file)
     self.logger = logging.getLogger(self.agent_name)
     self.output_file_is_binary = False
     self.com_port = ""
     self.baudrate = ""
     self.ser = serial.Serial()
     self.last_coords = None
     self.datapoint = dict.fromkeys(APP_FIELDS + RMC_FIELDS + GGA_FIELDS)
     self.output_file_header = ";".join([k for k in self.datapoint.keys()])
     self.sim_acceleration_sign = 1  # Usado para simular aceleración y frenado
     self.geod = Geod(ellps='WGS84')
Exemplo n.º 4
0
 def __init__(self, config_file):
     self.agent_name = os.path.basename(__file__).split(".")[0]
     AbstractHWAgent.__init__(self,
                              config_section=self.agent_name,
                              config_file=config_file)
     self.logger = logging.getLogger(self.agent_name)
     self.output_file_is_binary = True
     self.sensor_ip = ""
     self.host_ip = ""
     self.os1 = None
     self.receive_data = Event()
     self.receive_data.clear()
     self.packets_per_frame = dict()
     self.blocks_valid = 0
     self.blocks_invalid = 0
     self.active_channels = ()
     self.stats_are_valid = False
Exemplo n.º 5
0
 def __init__(self, config_file):
     self.agent_name = os.path.basename(__file__).split(".")[0]
     AbstractHWAgent.__init__(self,
                              config_section=self.agent_name,
                              config_file=config_file)
     self.logger = logging.getLogger(self.agent_name)
     self.output_file_is_binary = False
     self.q_volts = Queue()  # Cola para almacenar voltajes leidos
     self.com_port = ""
     self.baudrate = ""
     self.ser = None
     self.last_stable_volts = []
     self.devices_leds = dict()
     self.quitting = False
     self.keys = dict()
     self.devices_leds[Devices.OS1] = LED_DEV_OS1
     self.devices_leds[Devices.GPS] = LED_DEV_GPS
     self.devices_leds[Devices.IMU] = LED_DEV_IMU
     self.devices_leds[Devices.CAMERA] = LED_DEV_CAM
     self.devices_leds[Devices.ROUTER] = LED_DEV_MODEM
Exemplo n.º 6
0
 def __init__(self):
     AbstractHWAgent.__init__(self, CONFIG_FILE)
     self.output_file_is_binary = False