How to edit px4 control loop in Airsim SITL?

Hi, I’m new to drones and installed px4 in WSL2 to conduct SITL using an Airsim, to try a simulation of [2205.06908] Neural-Fly Enables Rapid Learning for Agile Flight in Strong Winds. I faced a big problem while trying this.

The authors used a position control loop coded with python to pass ‘thrust’ and ‘attitude’ to the px4 control board(in offboard flight mode). This means that I should use only the portion(attitude control & EKF & Mixer) of the px4 autopilot and adjust the input a bit. (Thrust to mixer, attitude to attitude controller)

How can I implement this in the simulation? Is it possible to use a python position control code on Windows and C++ coded px4 control loops together? Are there any guides to editing the control loop?

It would be greatly appreciated if you guys could give any hints about these problems. Thanks a lot.