@Eric-Katzfey I changed, but it seems the problem is the GPS device, because when we change the GPS drone can go to position mode, but we still have a problem with MAG, we have to turn off the MAG, The drone can not go to position mode, and also we have too much drift.
when we set EKF2_GPS_CHECK to 1:
rb5:~$ journalctl -b --no-pager -u voxl-px4
-- Logs begin at Thu 2023-03-02 12:58:05 UTC, end at Mon 2024-05-27 13:54:15 UTC. --
May 27 13:54:15 m0052 voxl-px4[1896]: ta rate: 100000 B/s on udp port 14556 remote port 14557
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Advertising remote topic telemetry_status
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [mavlink] partner IP: 127.0.0.1
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Advertising remote topic obstacle_distance
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Advertising remote topic vehicle_visual_odometry
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Advertising remote topic timesync_status
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic actuator_controls_status_0
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_aid_src_ev_hgt
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_aid_src_ev_pos
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_aid_src_ev_vel
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_aid_src_ev_yaw
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [mavlink] mode: Normal, data rate: 100000 B/s on udp port 14558 remote port 14559
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Marking DeviceNode(telemetry_status) as advertised in process_remote_topic
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [px4] Startup script returned successfully
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [gps] Sending initial CFG_VALSET. Attempt: 2
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Marking DeviceNode(vehicle_command_ack) as advertised in process_remote_topic
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: Found 0 compass (required: 1)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [gps] Sending initial CFG_VALSET. Attempt: 3
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic vehicle_rates_setpoint
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: Found 0 compass (required: 1)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [gps] u-blox firmware version: SPG 3.01
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [gps] u-blox protocol version: 18.00
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [gps] u-blox module: NEO-M8N-0
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [mavlink] partner IP: 127.0.0.1
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Marking DeviceNode(sensor_gps) as advertised in process_remote_topic
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic home_position
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_gps_status
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_aid_src_gnss_hgt
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_aid_src_gnss_pos
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_aid_src_gnss_vel
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Advertising remote topic mission_result
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: Found 0 compass (required: 1)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Advertising remote topic ping
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic vehicle_global_position
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_baro_bias
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: Found 0 compass (required: 1)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: horizontal velocity unstable
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: Found 0 compass (required: 1)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: horizontal velocity unstable
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: Found 0 compass (required: 1)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic estimator_ev_pos_bias
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: height estimate not stable
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: Found 0 compass (required: 1)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Preflight Fail: height estimate not stable
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Marking DeviceNode(mavlink_log) as advertised in process_remote_topic
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Armed by RC
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [logger] Start file log (type: full)
May 27 13:54:15 m0052 voxl-px4[1896]: WARN [uORB] orb_advertise_multi: failed to set queue size
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [logger] [logger] /data/px4/log/2024-05-27/13_52_37.ulg
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [logger] Opened full log file: /data/px4/log/2024-05-27/13_52_37.ulg
May 27 13:54:15 m0052 voxl-px4[1896]: WARN [mavlink] Event dropped (80, 65526)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Advertising remote topic logger_status
May 27 13:54:15 m0052 voxl-px4[1896]: WARN [mavlink] Dropped 65446 events (seq=65526)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Takeoff detected
May 27 13:54:15 m0052 voxl-px4[1896]: WARN [mavlink] Event dropped (65527, 80)
May 27 13:54:15 m0052 voxl-px4[1896]: WARN [mavlink] Dropped 71 events (seq=80)
May 27 13:54:15 m0052 voxl-px4[1896]: WARN [mavlink] Event dropped (65527, 80)
May 27 13:54:15 m0052 voxl-px4[1896]: WARN [mavlink] Dropped 71 events (seq=80)
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic yaw_estimator_status
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Advertising remote topic hover_thrust_estimate
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Landing detected
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Disarmed by RC
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [uORB] Marking DeviceNode(parameter_server_set_value_request) as advertised in process_remote_topic
May 27 13:54:15 m0052 voxl-px4[1896]: INFO [muorb] SLPI: Marking DeviceNode(parameter_server_set_value_response) as advertised in process_remote_topic