Metadata-Version: 2.4
Name: tau-log
Version: 0.2.1
Author-email: YuraTheBest <stuchalkin.yud@gmail.com>
Project-URL: Homepage, https://github.com/Aerokitties/tau-log
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
Requires-Dist: pandas

# tau-log

**tau-log** is a Python package that provides tools for reading and 
decoding binary log files, used in [Tau project](https://github.com/AeroKITties/Tau). 

## Messages decription
**tau-log** needs a json file with information about all message types in the log file.

```json
{
  "GyroMessage": {
    "index": 10,
    "field_names": [
        "time_ms",
        "gx",
        "gy",
        "gz"
    ],
    "field_types": [
        "uint32",
        "float",
        "float",
        "float"
    ]
    }
}
```
Each message info should have the following fields:
- Message name
- Unique message id (0-255). Index is always the first message field and always has uint8 type
- Field names. All names must be unique within one message. Order of the fields is the same as in the binary message
- Field data types

This package currently supports only the following data types: 
| Desctiption | Data type|
| ----------- | ----------- |
|4-byte signed integers | int32 |
|4-byte unsigned integers | uint32 |
|2-byte signed integers | int16 |
|2-byte unsigned integers | uint16 |
|1-byte signed integers | int8 |
|1-byte unsigned integers | uint8 |
|4-byte floating point numbers | float |
|8-byte floating point numbers | double |

## Usage example
```python
import pathlib
import tau_log

log_path = pathlib.Path("LOG2.TAU")
msg_path = pathlib.Path("messages.json")
dataframes = tau_log.parse_file(log_path, msg_path)

for msg_name in dataframes:
    print(dataframes[msg_name])
```
The decoder provides data in the form of a dictionary, where the data from each message is stored in a separate pandas DataFrame.
