GPS Vertical Pos Drift too high while running sitl on modified world

Hello,
My use case involves tethering drones together, I am modifying the world with drone models, eventually adding multiple drones and tethering them to common load.

For now, I added a single x500 model to default.sdf and launched SITL with this model attached. I included the following lines at the end of default.sdf:

<include>
  <uri>x500</uri>
  <name>x500_1</name>
  <pose>1 0 0 0 0 0</pose>
</include>

Then, I launched SITL using the command:

PX4_SYS_AUTOSTART=4001 PX4_GZ_MODEL_NAME=x500_1 build/px4_sitl_default/bin/px4 -i 0

However, I am noticing significant height drift. While the drone doesn’t continuously ascend, there are substantial deviations around the commanded altitude of 2.5m after executing commander takeoff.

I verified the pose data used by the fake GPS and magnetometer, and my model’s link (x500) is present. The sensors appear to be correctly retrieving pose data, which I confirmed using the command:

gz topic -e -t /world/default/pose/info | grep -A 5 "x500"

(as the poseinfoCallback function in GZBridge.cpp uses this topic to extract position groundtruth for the given model)

This drift is not being observed when I launch SITL with default world (without any changes) using the standard way: make px4_sitl gz_x500

Any help is appreciated!
Thank you

Hi, I am working on a similar cooperative scenario with PX4 SITL and I am facing the same problem! When I first spawn the drones from a world file and then link the SITL simulation to these existing entities I notice this annoying GPS horizontal and vertical drift, which is indeed significant. Not sure if it has something to do with the NavSat sensor, but for me everything was much smoother with MAVROS and Gazebo Classic.