The UxV toolbox for Matlab/Simulink provides Matlab scripts and simulink blocks for UAVs to handle MAVLink protocol, GPS, RC receivers and telemetry protocols.
This model-based design and analysis tools speed-up the back and forth between experimental tests and simulation.
Three main scripts enable decoding MAVLink messages, creating simulink model for simulation based on logged data, and generating map trajectory trace from GPS messages.
Script | Input | Output | Function |
---|---|---|---|
(1) mavlink2mat | Mavlink log | .mat | matlab analysis |
(2) mavlink2simulink | Mavlink log | .mat / .mdl (.slx) | simulation based on real data |
(3) mavlink2kml | Mavlink log | .kml | plot GPS trace(s) on a map |
mavlink2gui | Mavlink log | GUI | graphical exploration of mavlink log |
mavlinkgui script opens a Graphical User Interface to explore MAVLink data. It list MAVLink messages found in a log file and plot selected {message - value}. Plot script is customizable enabling user to go beyond a simple plot. The GUI provides access to the three scripts mentioned above.
10 added blocks add essentials UAV features to implement an autopilot on a dsPIC DSC. Theses blocks complete the MPLAB blocks for Simulink from Microchip providing peripheral blocks for code generation. Theses works on top of the MathWorks Embedded Coder. Added features:
Except the MATH block, theses blocks are typically connected to the dsPIC UART Rx/Tx block to send/receive the data flow from a GPS, a receiver, a radio link.
Theses blocks are developped by Lubin Kerhuel and distributed for free with the MPLAB device blocks for Simulink from Microchip.
Way Point protocol allows setting and reading WayPoint from a MAVLink compatible ground station. ↩︎
Parameter protocol enable tuning from any MAVLink ground station the Simulink tunable parameters which are normally tuned with External Mode or from the Processor In the Loop simulation (PIL). ↩︎
Sensor for Smart.Port or F.Port block is used with either the Smart Port of the F.Port block. Theses protocol allows sending telemetry packet back to the Remote Controller (RC) interface. It enables emulation of Frsky sensor (battery voltage and current, variometer, airspeed, GPS) adding features to your remote easily. They also enable emulation of BetaFlight telemetry. Used with LUA script, this add features like artificial horizon, air speed, vertical speed, distance from home and many other to your remote (tested with yapuu LUA scripts. ↩︎