<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def could_collide_hor(self, vpos, adsb_pkt):
        '''return true if vehicle could come within filter_dist_xy meters of adsb vehicle in timeout seconds'''
        margin = self.asterix_settings.filter_dist_xy
        timeout = self.asterix_settings.filter_time
        alat = adsb_pkt.lat * 1.0e-7
        alon = adsb_pkt.lon * 1.0e-7
        avel = adsb_pkt.hor_velocity * 0.01
        vvel = sqrt(vpos.vx**2 + vpos.vy**2)
        dist = mp_util.gps_distance(vpos.lat, vpos.lon, alat, alon)
        dist -= avel * timeout
        dist -= vvel * timeout
        if dist <= margin:
            return True
        return False