Sensor Frame Orientation Custom Simulation

Hello there,
I’m working on a custom simulation with mavlink interface. My simulation uses NED as inertial system and FRD body convention. I use this Mavlink message to communicate with PX4:

            master.mav.hil_sensor_send(
                time_usec           = time_usec         ,
                xacc                = xacc              ,
                yacc                = yacc              ,
                zacc                = zacc              ,
                xgyro               = xgyro             ,
                ygyro               = ygyro             ,
                zgyro               = zgyro             ,
                xmag                = xmag              ,
                ymag                = ymag              ,
                zmag                = zmag              ,
                abs_pressure        = abs_pressure      ,
                diff_pressure       = diff_pressure     ,
                pressure_alt        = pressure_alt      ,
                temperature         = temperature       ,
                fields_updated      = fields_updated    ,
                id                  = the_id            ,
            )

Everything works, except for a mismatch in my sensor values.

  • For the accelerometer values I use the body: acc_imu = acceleration_sim - Rbw * [0,0,9.81] + noise.
  • The gyro values I directly use the output body rates of my simulation + noise.
  • The magnetometer values I calculate by mag = Rbw * m_ned + noise with m_ned = [0.21523, 0.01, 0.43]

Unfortunately, I see a mismatch in my rotations. Does PX4 expect sensor data in a different frame? E.g. FLU instead of FRD?