Simulation on Hardware with custom FDM

Hi everyone,

I’m looking to use Simulation on Hardware (Plane) with a custom FDM I’ve developed in MATLAB/Simulink on my laptop. I need help figuring out how to bypass the default FDM in SIM_Plane.cpp that Ardupilot uses and replace it with my own. Specifically, I want to use one of the serial ports to send FDM data from my computer to a Pixhawk Cube.

Any guidance on how to achieve this would be greatly appreciated.

Thanks!
@tridge