What Are The Meanings of These Variables?

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
Fan_Yang
Beginner
Posts: 2
Joined: Sat Sep 17, 2016 7:30 am

What Are The Meanings of These Variables?

Post by Fan_Yang »

Hello Everyone,

I got a crazyflie 2.0 recently. And I started to read codes of crazyflie-lib-python from examples/basiclog.py which prints 'stabilizer.roll', 'stabilizer.pitch' and 'stabilizer.yaw' to screen every 10ms.
I wonder is there any other variables that I can get from the copter, and I print toc(cflib/crazyflie/toc.py) to screen as below(simplified):

Code: Select all

{
            "acc": {
                "y": "LOG_OBJ",
                "x": "LOG_OBJ",
                "z": "LOG_OBJ",
                "zw": "LOG_OBJ",
                "mag2": "LOG_OBJ"
            },
            "mag": {
                "y": "LOG_OBJ",
                "x": "LOG_OBJ",
                "z": "LOG_OBJ"
            },
            "stabilizer": {
                "thrust": "LOG_OBJ",
                "yaw": "LOG_OBJ",
                "roll": "LOG_OBJ",
                "pitch": "LOG_OBJ"
            },
            "gyro": {
                "y": "LOG_OBJ",
                "x": "LOG_OBJ",
                "z": "LOG_OBJ"
            },
            "sys": {
                "canfly": "LOG_OBJ"
            },
            "radio": {
                "rssi": "LOG_OBJ"
            },
            "mag_raw": {
                "y": "LOG_OBJ",
                "x": "LOG_OBJ",
                "z": "LOG_OBJ"
            },
            "motor": {
                "m4": "LOG_OBJ",
                "m1": "LOG_OBJ",
                "m3": "LOG_OBJ",
                "m2": "LOG_OBJ"
            },
            "altHold": {
                "vSpeed": "LOG_OBJ",
                "target": "LOG_OBJ",
                "err": "LOG_OBJ",
                "vSpeedASL": "LOG_OBJ",
                "vSpeedAcc": "LOG_OBJ",
                "zSpeed": "LOG_OBJ"
            },
            "vpid": {
                "i": "LOG_OBJ",
                "p": "LOG_OBJ",
                "pid": "LOG_OBJ",
                "d": "LOG_OBJ"
            },
            "baro": {
                "aslRaw": "LOG_OBJ",
                "aslLong": "LOG_OBJ",
                "pressure": "LOG_OBJ",
                "temp": "LOG_OBJ",
                "asl": "LOG_OBJ"
            },
            "pm": {
                "state": "LOG_OBJ",
                "vbat": "LOG_OBJ",
                "chargeCurrent": "LOG_OBJ"
            }
        }
Some of these variables are self-explanatory, but some not. I'm not quite familiar with sensors as well as their parameters. Can you tell me the meaning of them, or just tell me where to look up?

Thanks a lot in advance!
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: What Are The Meanings of These Variables?

Post by whoenig »

Hi,
To my knowledge there is no documentation with a list describing them in detail. The log subsystem is described here. Then, it is easiest to look in the firmware code and check what each variable does. For example, the sensor data comes from stabilizer.c. Sometimes you need to search in the code "backwards" to really see where they are assigned and what the units are etc.

Best,
Wolfgang
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: What Are The Meanings of These Variables?

Post by tobias »

Probably time to force some description on the log variables and the parameters which preferably could be fetched and displayed in the client. Added github ticket #148.
Fan_Yang
Beginner
Posts: 2
Joined: Sat Sep 17, 2016 7:30 am

Re: What Are The Meanings of These Variables?

Post by Fan_Yang »

Thanks a lot!
Post Reply