Yaw feeding with fake GPS (MAvlink) problem

Hello,

I am using a positioning system and trying to fake GPS input data. For that reason I configured (among others):

  • EK3_SRC1_YAW = 2 (GPS)
  • GPS_TYPE = 14 (Mavlink)

Below you can see that Yaw fed from the GPS and ATT.Yaw do not match. It seems that there is an offset.

  1. My first question is how to be sure that the EKF is using the GPS data? I think that now it is not used.
  2. Another consideration is that the compass-less yaw operation in Plane requires 2 GPSs and a certain configuration. Since I dont have this setup, only fake GPS input, is 1 “fake” GPS sufficient or should I make 2 fake GPS input etc etc…

Flight log: 17.bin - Google Drive
code snippet with Fake GPS feeding:

        mavlink_msg_gps_input_pack(
            system_id,
            MAV_COMP_ID_PERIPHERAL,
            &message,
            timestamp_us,
            0, // gps id
            0, 
            0, // ms start of week
            1, // week no   
            3, // 3d fix
            int32_t(519943190 + pose.y/0.01113170996), // lat (deg E7)
            int32_t(43729300 + pose.x/0.01113170996), // lon
            0 - pose.z, // alt
            1.0, // hdop
            1.0, // vdop
            pose_der.x,
            pose_der.y,
            pose_der.z,
            0.001, // speed accuracy (m/s)
            0.01,  // horiz accuracy (m)
            0.001, // vert accuracy (m)
            15,    // satellites
            (uint16_t)(yaw0_360*100));    // yaw (degE2)