Different parameters between gz model and PX4 Airframe

Hey guys, I’m working on a quadrotor project to implement NMPC(Nonlinear Model Predictive Control). I’ve been trying to implement my method through SITL with ROS2 and gz. The model I’m using is x500 as the example in ROS2 user guide.

However I found the airframe file:
ROMFS/px4fmu_common/init.d-posix/airframes/4001_gz_x500
has the following rotor parameters (picked out rotor0)

param set-default CA_ROTOR0_PX 0.13
param set-default CA_ROTOR0_PY 0.22
param set-default CA_ROTOR0_KM  0.05

Meanwhile, the model file of x500 have different parameters:
models/x500_base/model.sdf

<link name="rotor_0">
      <gravity>true</gravity>
      <self_collide>false</self_collide>
      <velocity_decay/>
      <pose>0.174 -0.174 0.06 0 0 0</pose>
      <inertial>
          <mass>0.016076923076923075</mass>
          <inertia>
            <ixx>3.8464910483993325e-07</ixx>
            <iyy>2.6115851691700804e-05</iyy>
            <izz>2.649858234714004e-05</izz>
          </inertia>
        </inertial>

models/x500/model.sdf

<plugin filename="gz-sim-multicopter-motor-model-system" name="gz::sim::systems::MulticopterMotorModel">
      <jointName>rotor_0_joint</jointName>
      <linkName>rotor_0</linkName>
      <turningDirection>ccw</turningDirection>
      <timeConstantUp>0.0125</timeConstantUp>
      <timeConstantDown>0.025</timeConstantDown>
      <maxRotVelocity>1000.0</maxRotVelocity>
      <motorConstant>8.54858e-06</motorConstant>
      <momentConstant>0.016</momentConstant>
      <commandSubTopic>command/motor_speed</commandSubTopic>
      <motorNumber>0</motorNumber>
      <rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
      <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
      <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
      <motorType>velocity</motorType>
    </plugin>

I’m confused by those parameters since I need the right parameter for my NMPC model.

  1. Different moment constant (airframe file: 0.05, model file: 0.016)
  2. Different rotor position in x-y plane
    Does anyone know which parameter should I use in my NMPC model?
    Or should I configure both sides to same value?

I think this was just lazyness. Feel free to make a pull request to fix it.