Ardupilot SITL sensor values (Gazebo) (The new one)

I am developing a custom simulation model for Gazebo and ArduPilot and need to understand how sensor values are transmitted from Gazebo to ArduPilot. While I am familiar with the JSON interface for passing formatted sensor data via MAVLink, I would like to know how the native Gazebo-ArduPilot interface handles this process.

Based on some example models I’ve seen, IMU sensors are included, but I cannot confirm whether ArduPilot actually utilizes them.

The ardupilot_gazebo plugin returns some sensor data as a JSON message to SITL.

The relevant code is here: ardupilot_gazebo/src/ArduPilotPlugin.cc at main · ArduPilot/ardupilot_gazebo · GitHub

A single IMU is supported (required), and there are fields for some other sensors such as range finders and wind speed and direction, but it represents a subset of what can be measured in Gazebo, and in particular the JSON message does not support GPS data.