Hi. We want to share our study on PX4 Support Package in simulink. As I see there is too few work about this topic.So I hope this example encourage the community to use this method more. MATLAB/Simulink is very flexible tool. When used with PX4 I think it is highly promising.
We made two applications on Fixed Wing airframe these are Kamikaze and pursuing another plane in air.
I’m sharing flight videos.
We used this methods in a national competition. In kamikaze mission there is a QR code in area and you should dive-read and recovery the vehicle.
In pursuing mission other competitors planes publishing 1Hz location data you should follow them by using these datas and image processing methods.
First we defined required parameters for the missions like kamikaze dive altitude,recovery altitude,approach angle(to dive into wind) etc.
In simulink model we are using these parameters and defined custom uorb topics. Basically in kamikaze mode according to QR location model calculating a loiter point by using defined parameters and loitering for a while(hardcoded loiter counter) and approaching to the target with desired heading. When achieve to the calculated dive point diving and recovering phases working respectively finally its return to waiting point again defined by parameter.
Complete model is here
And the state flow part is here
In “following” mission there is incoming data from image processing as x,y location of target on image. According to this value plane switching to image processing based following from telemetry based following. We hope to share more detailed explanation about the architecture coming soon. Thanks to MathWorks and PX4 community for this collaboration.
https://www.linkedin.com/in/burak-yildirim-navigation
https://www.linkedin.com/in/alparslan-uçan-350066249