Reading Telemetry Data

Firmware/software/electronics
Post Reply
missimer
Beginner
Posts: 1
Joined: Wed Oct 23, 2013 7:44 pm

Reading Telemetry Data

Post by missimer »

Hello, I am trying to write a program to control a crazyflie quadcopter via the usb dongle. This is related to a research project and is using my groups own operating system Quest (http://questos.org/) as opposed to Linux or Windows. I've written a simple device driver that allows a userspace program to push bytes to the usb dongle and receive bytes and I've figured out how to send commands to the quadcopter. I am having trouble figuring out how to receive information such as the actual pitch, roll, yaw, thrust and motor PWMs. I've looked through the wiki and source code with no luck.

If someone could provide a brief explanation of what bits (if any) need to be sent to the quadcopter to have it send telemetry information and how to interpret the data received or point me to the source file that does it I would be very appreciative.

Thanks for your help.
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Reading Telemetry Data

Post by marcus »

Hi,

There are a couple of steps that you need to do before you can get telemetry data from the Crazyflie. The protocol is documented here on the wiki. But the best place to look might be in the code. Have a look at the log.py and toc.py files for more info.


The firmware contains a list of variables that can be logged. When you are connected to the Crazyflie you should download this list using the port 5 and channel 0. There's one message to get the CRC and count of the variables and one to download information about each (such as name and type). When this is done you can use this information to create a logging configuration. This configuration should be sent to the Crazyflie on port 5 channel 1 and then the configuration should also be enabled. Once this is done the Crazyflie will start pushing data back to the PC using port 5 channel 2. The packets with data will only contain the logging configuration number and raw data, so you need to use your logging configuration on the PC to "unpack" the data you get.
Post Reply