Exemple #1
0
def removeGPSReports(segment, gps_car_id):
    # Making sure that we do not add
    # the gps_report to this segment again
    segment.gps_car_id = gps_car_id
    length = len(segment.matching)
    i = 0
    while i < length:
        match = segment.matching[i]
        if match['gps'] is not None:
            filter_gps.addGPS(match['gps'])
            if match['trust'] is None:
                del segment.matching[i]
                length -= 1
                i -= 1
            else:
                match['gps'] = None
        i += 1
Exemple #2
0
 def performAction(self, object):
     # print object['record']
     if object['name'] == 'gps':
         filter_gps.addGPS(object['record'])
     elif object['name'] == 'trust':
         filter_trust.addTrust(object['record'])