Pymavlink + Mission Planner SITL doesn't return the correct GPS fix + satellite count

Hi everyone!
When running Pymavlink connected to the Mission Planner SITL, I’m struggling to retrieve following information from the GPS_RAW_INT ( #24 ) message;

  • GPS fix type (0= no gps, 1= no fix, 2= 2D position, … , 6= RTK fixed)
  • Satellites visible (# of satellites visible)

When running simulation in Mission Planner, MP itself has gpsstatus set to 6 (indicating RTK fix) and satcount set to 10 (see screenshot).


However, when receiving messages in with Pymavlink, following string is returned when printed:

GPS_RAW_INT {time_usec : 0, fix_type : 0, lat : 0, lon : 0, alt : 0, eph : 0, epv : 0, vel : 0, cog : 0, satellites_visible : 0, alt_ellipsoid : 0, h_acc : 0, v_acc : 0, vel_acc : 0, hdg_acc : 0, yaw : 0}

Clearly no fix according to message + no satellites. The code printing the above string is:

from pymavlink import mavutil

# Connection to MPs SITL
the_connection = mavutil.mavlink_connection('tcp:127.0.0.1:5762')

the_connection.wait_heartbeat()
print("Heartbeat from system (system %u component %u)" %
      (the_connection.target_system, the_connection.target_component))

print(the_connection.messages["HOME"])

What am I doing wrong?