I have an algorithms that running on the LabVIEW.
It needs the roll angle (attitude #30) from EKF2 PRECISELY every 10 ms (100 Hz).
I modified the mavlink_main.cpp.
I used the Mavlink inspector in GQC, it shows 100 Hz.
BUT, I used the oscilloscope to check the Tx pin from Telemetry2 on the Pixhawk2, the frequency that the attitude data is published varies from 80 to 120 Hz. The freq. is not PRECISELY 100 Hz, as I wanted.
I thought the reasons could be:
1/ The publish task has low PRIORITY
2/ The Pixhawk has so many tasks to do and the time constraint effects the publish rate of ATTITUDE DATA #30.
I only need the EKF2 and ATTITUDE FLIGHT MODE on the PX4 - Pixhawk 2
My questions are:
1/ Theoretically, is the Pixhawk2 able to publish the roll angle PRECISELY at 100 Hz. If yes, could you please instruct me how to do it.
2/ Could I remove/ comment out the other functions (SD card, GPS, etc.) to make more room for the PX4 to publish the ATTITUDE #30 data.
3/ I assume the FLIGHT CONTROLLER running PRECISELY at a certain frequency, in the end of the flight controller code, I write a code to publish the Attitude rate. Is it possible to do that?
Thank you very much.