Parsers for UAV/Aerial Drone-related formats like MavLink and DataFlash
Project description
UAVReaders
Parsers for UAV-related formats like DataFlash and Mavlink
Installation and Usage
This package is available from PyPI. You can install it by doing something
like this: pip install UAVReaders
.
Currently, prebuilt wheels are available for the majority of Linux distributions and no other operating systems at all.
Example
Here is an example of using data_flash_reader
in a script.
import UAVReaders as u
dfreader = u.data_flash_reader("test_data/dataflash_test.bin")
for packet in dfreader():
# do something with the packet, which is a dict containing
# the values of each field in the original packet.
I would advise you not to keep the packets around for much longer than necessary. Do not save them into a Python list, for example; it will probably take too much memory if your DataFlash file is large. Expect a 50x memory penalty. A 1GB DataFlash file might take up 50GB when each packet is simultaneously in memory because of duplicating packet field names.
Usage from Python by cloning this repository
It is also easy to clone and use this repository as part of a larger project, for example by adding it as a git submodule. There are a few build-time dependencies that you need to install before building the package.
regex
, install withconda install regex
future
, install withconda install future
cython
, also available through conda withconda install cython
- A working Linux-ish C++ toolchain with
make
. GCC is what I have been using. It should technically be possible to build natively on windows, but I would just use WSL.
Now, you have to make sure that Git has pulled all the submodules this
project requires by running git submodule update --init --recursive
.
After that, just cd
into the directory and run make pypackage
. Import
uavreaders.UAVReaders
to load it into your python. This provides access
to UAVReaders.data_flash_reader
, UAVReaders.mavlink_reader
, and a few
auxiliary functions not needed during normal usage.
Commandline Usage
Running make
alone will generate both the python package and
two binaries that can be used to transform DataFlash or Mavlink
files to JSON. They are called dataflashreader
and mavlinkreader
and are written to /bin
under the project root.
They both have the same interface. They take data through stdin
write to stdout and stderr, so you should use them through input
redirection. To use dataflashreader
under Bash, run something
like this:
$ ./bin/dataflashreader <test_data/dataflash_test.bin | gzip >output.json.gz
This reads dataflash packets from testdata/dataflash_test.bin
and
compresses the output JSON, storing it in output.json.gz
. JSON
representations of MavLink and Dataflash packets are very large; you will
almost always want to compress the output. A one-gigabyte DataFlash
.bin file might expand by as much as 50 times on parsing to JSON.
Testing
Run make test
to test the functionality of the DataFlash and Mavlink
parsers. This compiles the command-line parsing utilities and compares
their output against a known-good state.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for UAVReaders-1.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4308a8099eb33982dfd2bd261f4d68d5093a812a84b4cb647627e67325beae62 |
|
MD5 | dcf711e4eb0697b51d23fb4fdbaad3a8 |
|
BLAKE2b-256 | 15b81d8c79df52cc41886dcf4474dd709b233f2c4965038ee35c19dc82f0acd3 |
Hashes for UAVReaders-1.0.2-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae41843c2b7c0d6b9bc656e4fcc5581c8ccf1f4ec0500116c5a3f44620a84304 |
|
MD5 | c745ae5bac6aad08d661110e2b11ac70 |
|
BLAKE2b-256 | 5d3432cb941cdd2f58cb15a0e3a19b1c14db71c8dd3f248f0a04407535f2fc8d |
Hashes for UAVReaders-1.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980238083f820dd25c1a6b21287920f39353aa5ca5bbe563f272782907d7c735 |
|
MD5 | 5f36c68fca64b2e49d33fcf8d38398ec |
|
BLAKE2b-256 | 2a9749e7dacbde4dafc00417cbfbfd7edb15a209c15ca222adcfbdee97de7e81 |
Hashes for UAVReaders-1.0.2-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98ea4cff8276ad41c9171583aad0810d0c75877bbc290a94ba5ddb95d985205f |
|
MD5 | d86030bebe39a91958f4242337c2f730 |
|
BLAKE2b-256 | 890d93ea5214ce24b5d8a90e5b3fa4383d28c65ab77e957a8257d3a0a9263cfa |
Hashes for UAVReaders-1.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19374b92fb9d93298dabaa1f798e17d9407b4b05594be103c33ede457b165592 |
|
MD5 | 4260f1634794fc73918aa4a70028beef |
|
BLAKE2b-256 | 5759cc91ceac65297e47ddc4e41d276bbb8f3e98b35d858a325f1b1fef27f38b |
Hashes for UAVReaders-1.0.2-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3db65b42f1ce7efdb7237a213dc76f4938c1711668cfab22f0223d1cfddd3e7 |
|
MD5 | efdd13d220d75ebd5e7763ddde4be276 |
|
BLAKE2b-256 | ae3d59e2c84e539a7f6e30106c81b776a6b2cfda288f3317c31aa9e233bd780f |
Hashes for UAVReaders-1.0.2-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6432d2ec3bd42b2c552b21fa391c22782f47578bbca1bf880ae0f94b3e9ddbfa |
|
MD5 | 39b4c612d5dfb8ba942e74e5311cbbfa |
|
BLAKE2b-256 | c3400a2db98208b7db07abe6a258ab16febc9ce57b696185aa057b1a3f7e62d8 |
Hashes for UAVReaders-1.0.2-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7ef243b701b9b07aa3b9b29fe50619a583b46848e4cc805b09f858854adab2 |
|
MD5 | 03dfc3650685296d3b53b4c7932bcf15 |
|
BLAKE2b-256 | abed3985a5561bf92c85aa0ecc44508caf7837aea78dc4e8e73851370dd7caf9 |
Hashes for UAVReaders-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 370b4c9121ae88c0cc12b09e867088af17842c5056b46d0a1da9755d1dee9522 |
|
MD5 | 8c2537bc3adc3c80181088b0b7bbebf4 |
|
BLAKE2b-256 | e4f6b59acf7c2b6e5627f28c936762630751e9ce7dc87c7c674f1061442f0357 |
Hashes for UAVReaders-1.0.2-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efb8e9237e496a18c82d07455dc1c40cae095f3f4d7f7455a36f227d89af250d |
|
MD5 | 5f0808194a89a633d32f32ac1fb1d028 |
|
BLAKE2b-256 | b5b2b602dfa4e372c9235bc4a3bba1b44f203d200cd0e00a2832f395c0c401e5 |
Hashes for UAVReaders-1.0.2-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 713f46412d8e3ff1ee481238caf4afd6fc1dec9b5362bd11bdb90b48f9a7790f |
|
MD5 | 0544fea0f97f49bba753c0e4e759d347 |
|
BLAKE2b-256 | 66767e7e19760ee1db08f77baa747edeedb8fa7b0db24de0ca6878071fd61b7b |
Hashes for UAVReaders-1.0.2-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35453504a80c4b74ced11bb1c1e89696dd447e8a38bcbba27eb8ea5dd27ed0fa |
|
MD5 | 36b513cd00ffd5ee5ffc3e634c4da6da |
|
BLAKE2b-256 | 50f392d765c4af66ffce21d38c12cd0f1064e9803ee7624b90fa92cd81dd72b4 |
Hashes for UAVReaders-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 092298beaf794dccbfb4a1b6c91bf667650c5558f37c715e0dfc178e7994ae63 |
|
MD5 | b5afea31678e11cd32f8dd115fb9b397 |
|
BLAKE2b-256 | 9d6d4da1cec3155ee34e9da1c688ddfed246681c7335fbe7bb06076d36863b09 |
Hashes for UAVReaders-1.0.2-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15d97571931d3141bf7846f6c84aa618cbd81bc93982378d37dccb0880cf9ba1 |
|
MD5 | 714325e0ee39c22f7cbb128776e34390 |
|
BLAKE2b-256 | cedc3934e1de9bb7d29303924c529b48c32aa83d79afdace51a925540617bfc8 |
Hashes for UAVReaders-1.0.2-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19e8ca4859e568faf82c7a26de18dfe60ab05c22d8dabe2f8fa44f15946cd2fc |
|
MD5 | c47f9c580e62bd855f7551b2f2193a41 |
|
BLAKE2b-256 | f879855b1626fee311ac2a5010387bab4556e46fb19da85aeb4bb3c01b798a6b |
Hashes for UAVReaders-1.0.2-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a66dd7947207b1da4a224f59caa73566dcada181012716e84fc857eaad4084a |
|
MD5 | a1b416c5b5802e400500a045792dcaf7 |
|
BLAKE2b-256 | e84ce0ed45b63e291d03d2a3ff27a3b28820c203a022bfd894b4bab1d9f7c8c6 |
Hashes for UAVReaders-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83308f0245cc9fafdd2f320ffebf6af4a3f08459cb50a0f50b9f92b2ef6466c8 |
|
MD5 | 7cb47679bd57893041f1754b7f202e5e |
|
BLAKE2b-256 | a2bb8f43616d97c981e827baf271e26c335f7d8f6db4a349397448e49cc24349 |
Hashes for UAVReaders-1.0.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86b0638cefd712b916a977c189834901767369323fc0d200590294a99e1aab8a |
|
MD5 | 444b514197b268f5657ee9c5187cb290 |
|
BLAKE2b-256 | 0cdf4227ff8a080c23549bc82c32a445165c749322e4ea04efe521bccb0209b6 |
Hashes for UAVReaders-1.0.2-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59781a5969e175ef4c3fad614b8b3a9833fc0c6af95352168552ef1a3339eb27 |
|
MD5 | db12af710392c7de0d45f0740d65aca9 |
|
BLAKE2b-256 | 4ea4c84ac25c27dacf1a4374f49e852418b2ba3b0f564b489961ac2bff1d5bd0 |
Hashes for UAVReaders-1.0.2-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2bcebc7e45a0700d6528ecb16217adb8bbe6ce94e087119c0ab4ade65687e4a |
|
MD5 | 2a9686d53cef15bf9ccd373a2d3bbb74 |
|
BLAKE2b-256 | c4177315a313087494c21424056f36c69600c86a974fd0a1d5ec76d20abd8759 |
Hashes for UAVReaders-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 612f292a5d5faf5de9fbba18cd42bf7cbd1724ebbea74531acd6afd158f0f9b1 |
|
MD5 | 7b599d97347c1a5191254655a51eabf7 |
|
BLAKE2b-256 | 1ac741b0daf8c4b53d7972c5d4c32cb749cc62340c7b79d57304655d746e4104 |
Hashes for UAVReaders-1.0.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 342525ef9138329da10855f0e19122b8b3f48abbabdd03c969a0ff553c520946 |
|
MD5 | 2f79f88f9509d96a3a2632dd7df056a3 |
|
BLAKE2b-256 | 0c7de717a82068cd19cb41eb95e34093c495d03162829410dbc56270e9db3f7d |
Hashes for UAVReaders-1.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49bab298913a84cee5edf05287bd1324d6cef295d0518f5a9aec5cb0c4a71e8b |
|
MD5 | f4c533410a993238e8a48d36a4574c28 |
|
BLAKE2b-256 | 002fe04d3136b8c6bd2959fff79e98b3f295d3ea6dcca16fc86b2805134dbdda |
Hashes for UAVReaders-1.0.2-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3403f3d2a61010fd98bd2b8cca81bb421cdc615cbbcc9e2f38afbcfe22534a25 |
|
MD5 | 36397e811393a985b1e04aa041e384cd |
|
BLAKE2b-256 | 7b05c8edd695699e8d9ffd0823329d99be014e1ffe6043775dba0626c428f436 |
Hashes for UAVReaders-1.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d0f4ac54a99a9ab54bb63e7f76ff7dc542fb60b45e6762c40b23b72c023f64a |
|
MD5 | b7d3a7bba722d6f97a5f37decc486885 |
|
BLAKE2b-256 | 27f551cc406641c4ceacdfdc9859d1bd0c84f9ff0be5a796e18c77f913f39c74 |
Hashes for UAVReaders-1.0.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28c424d3025e02aa41da3aa6e98ff1fc5a814b9d189e9bf0f5d13e131f3c7330 |
|
MD5 | b8ae0082b504886cde2da500832960ba |
|
BLAKE2b-256 | 7ab8c3a2133b0a22e336c0166c77ff95b6a6e92deea3c9639d29b319a18e16c7 |