EKF Attitude is bad and PWM for JSON SITL Interface (Pegasus Simulator integration)

I am trying to implement the SITL JSON interface to talk to a custom physics backend and is having some issues with it.

In particular, I am trying to implement the ArduPilot variant for MavLink backend on this open project project that has an existing PX4 implementation:
https://pegasussimulator.github.io/PegasusSimulator/index.html

I understand that ArduPilot does not support HITL messages, so the existing implementation would not work out of the box.

So far i am able to communicate with SITL from the physics backend and could decode the PWM messages. I had also send the following kind of messages from the my physics backend to SITL:

\n{'timestamp': 2251, 'imu': {'accel_body': [0.5712055607812188, -0.05972357016092889, -9.653493801376179], 'gyro': [0.0014829323386709998, -0.003220565576633064, -0.004201697160406131]}, 'position': [38.7368625, -9.1379735, 90.058], 'velocity': [0, 0, 0], 'quaternion': [-0.816087840059591, 0.016961480315301525, -0.02398164423064304, -0.5771809302397126]}\n

However, when i connect to the simulator instance and try to arm via mavproxy, I get a an error about:
AP: PreArm: Need Alt Estimate
AP: PreArm: Gyros inconsistent
AP: PreArm: EKF attitude is bad

Could not find an error or hint about where the cause of this, i do see SIMSTATE message updated but not RAW_POSITION_INT message and other messages.

Additionally, I am also curious about the mapping/handling of PWM signals, i have been referencing ardupilot/libraries/SITL/examples/JSON/pybullet/robot.py at master · ArduPilot/ardupilot · GitHub for my implementation, but am unclear if this is equal(after mapping and constrainting to -1 to 1) to PX4’s HIL_ACTUATOR_CONTROLS 's controls field?