Can ArduCopter SITL receive beacon protocol data?

I have wirted a Parser compatible with posxyz data, and pixhwak1 can work with receiving data, but I have trouble with real filght(maybe the lower update rate with my UWB Equipment? like 3.5hz), In the same time I decide to improve my code in SITL first, I have setup my APM gazebo environment and wrote a UWB simulator(using data from gazebo pos topic), but after I send data to SITL copter, it’s does not show the beacon init message, and I also have trouble reading dataflash log by apmplanner -A "--uartD=uart:/dev/pts/2" -v ArduCopter -f gazebo-iris  -m --mav10 --map --console -I0

this is my stript to start SITL, /dev/pts/2 it create by “socat -d -d pty,raw,echo=0 TCP4-LISTEN:9801,reuseaddr”

Edit: using could read dataflash log and there no data receive

and blew picture is when i do the same thing pixhawk1 shows and I could see data in dataflash log

It should be possible to make it work. We don’t have a Beacon library backend which consumes the mavlink beacon messages so it sounds like you’ve got another way to pass in the raw serial data to the pozyx driver. I guess you’ve set the SERIALx_PROTOCOL parameter properly to tell the Beacon Pozyx driver which UART it should use? that UART/serial port will need to be separate from the one being used for mavlink data.

Perhaps there is a dataflash log I could look at?

thanks! @rmackay9, here is the logs
logs from sitl
logs from pixhawk1

I think should begin building mavlink beacon messages in the same time, cause that’s a little bit hard to make two UART connect with fc by one comparison computer, my current solution is using usb hub in intel aero

@rmackay9 I finally make mavlink driver working with sitl, but I have trouble with arming and changing mode to pos/guided/loiter, alert that need a 3D fixed, have any idea with that?I have already set set GPS_TYPE to 0 ,
ARMING_CHECK to -9, and BCN_TPYE to 3(my custom defined type)
here is dataflash logs
and my code is here
blew is my custom mavlink msg added to common.xml

    <!-- Beacon msg-->
<message id="280" name="BEACON_STATUS">
  <description>Beacon Status</description>
  <field type="uint64_t" name="time_usec">Timestamp (microseconds, synced to UNIX time or since system boot)</field>
  <field type="float" name="health">health</field>
  <field type="uint8_t" name="count">beacon count</field>
  <field type="uint32_t" name="D0" units="mm">D0</field>
  <field type="uint32_t" name="D1" units="mm">D1</field>
  <field type="uint32_t" name="D2" units="mm">D2</field>
  <field type="uint32_t" name="D3" units="mm">D3</field>
  <field type="uint32_t" name="pos_x" units="mm">PosX</field>
  <field type="uint32_t" name="pos_y" units="mm">PosY</field>
  <field type="uint32_t" name="pos_z" units="mm">PosZ</field>
<message id="281" name="BEACON_CONFIG">
  <description>Beacon config</description>
  <field type="uint8_t" name="beacon_id">beacon id</field>
  <field type="uint8_t" name="beacon_count">beacon count</field>
  <field type="uint32_t" name="x" units="mm">beacon pos x</field>
  <field type="uint32_t" name="y" units="mm">beacon pos y</field>
  <field type="uint32_t" name="z" units="mm">beacon pos z</field>
<message id="282" name="BEACON_DISTANCE">
  <description>Beacon distance</description>
  <field type="uint8_t" name="beacon_id">beacon id</field>
  <field type="uint32_t" name="distance" units="mm">beacon distance</field>
<message id="283" name="BEACON_VEHICLE_POSITION">
  <description>Beacon Vehicle Position</description>
  <field type="uint32_t" name="x" units="mm">vehcile pos x</field>
  <field type="uint32_t" name="y" units="mm">vehcile pos y</field>
  <field type="uint32_t" name="z" units="mm">vehcile pos z</field>
  <field type="uint16_t" name="position_error" units="mm">vehcile pos error</field>

update: I have make mistakes with negative values, ekf2 could init after fixing that, now I run into new situation with GPS Clitch

update: take off in alt hold mode and change to poshold in midair, it and hold position, but drift some time about 0.5m, I haven’t add any noise to Gazebo UWB Simulator yet, and refresh rate is 10hz
dataflash log: