Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
calculate EKF position when EKF disabled

        def ekf1_pos(EKF1):
    '''calculate EKF position when EKF disabled'''
    global ekf_home
    from pymavlink import mavutil
    self = mavutil.mavfile_global
    if ekf_home is None:
        if not 'GPS' in self.messages or self.messages['GPS'].Status != 3:
            return None
        ekf_home = self.messages['GPS']
        (ekf_home.Lat, ekf_home.Lng) = gps_offset(ekf_home.Lat, ekf_home.Lng, -EKF1.PE, -EKF1.PN)
    (lat,lon) = gps_offset(ekf_home.Lat, ekf_home.Lng, EKF1.PE, EKF1.PN)
    return (lat, lon)
        


src/m/a/MAVProxy-1.3.3/MAVProxy/tools/mavflightview.py   MAVProxy(Download)
                    break                    
        elif m.get_type() == 'EKF1':
            pos = mavextra.ekf1_pos(m)
            if pos is None:
                continue

src/m/a/MAVProxy-HEAD/MAVProxy/tools/mavflightview.py   MAVProxy(Download)
                    break                    
        elif m.get_type() == 'EKF1':
            pos = mavextra.ekf1_pos(m)
            if pos is None:
                continue