Page 1 of 1

What Are The Meanings of These Variables?

Posted: Sat Sep 17, 2016 8:19 am
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!

Re: What Are The Meanings of These Variables?

Posted: Mon Sep 19, 2016 3:13 am
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

Re: What Are The Meanings of These Variables?

Posted: Mon Sep 19, 2016 2:28 pm
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.

Re: What Are The Meanings of These Variables?

Posted: Sat Oct 01, 2016 12:17 pm
by Fan_Yang
Thanks a lot!