Ardupilot infra in relation to dronecode

I am trying to understand the following diagram from Dronecode in relation to Ardupilot. I want to contribute to this project, but first, I would like to fully understand the high level infrastructure. So, here is my first interpretation of how these pieces fit together. Warning, I could be way off.

[attachment=0]dronecode.jpg[/attachment]

Ardupilot is essentially the ‘flight code’ that sits on top of the PX4 firmware. The PX4 firmware hosts lower level API’s for antenna tracker, sensors, telemetry, and ESCs, as well as the OS. These API’s are consumed by Ardupilots hardware abstraction layer(This is the part I am unsure about). This AP_HAL sits below the Ardupilot flight code as a generic layer that different boards can adapt. The PX4FMUs RTOS(nuttx?)is the ecosystem that these applications live within. They can communicate with each other over some sort of protocol via Mavlink, which sits on top of Ardupilot, along with Dronekit, DroneAPI, UAVCan, and ROS.

Before I continue, maybe someone can verify my thought process thus far.