Read and convert Mechbase files (.dr) to known file formats
Project description
DR Files
Read and convert MECHBASE files (.dr) to known file formats
MECHBASE
MECHBASE® is a complete preventive solution that was developed by Arpedon, P.C., in order to help you store and trend your equipment status.
MECHBASE files format
MECHBASE files have the following structure:
- 2 bytes - the size of the header in bytes, in little-endian short integer format
- next N bytes - the header, in this protobuf format
- remaining bytes - the values of the signals, with each value represented in 2 bytes, like below (signal has 3 channels in this example):
- next 2 bytes - first value of the first channel, in little-endian short integer format
- next 2 bytes - first value of the second channel, in little-endian short integer format
- next 2 bytes - first value of the third channel, in little-endian short integer format
- next 2 bytes - second value of the first channel, in little-endian short integer format
- next 2 bytes - second value of the second channel, in little-endian short integer format
- next 2 bytes - second value of the third channel, in little-endian short integer format
- ...
Converting values to actual measured values
- divide the value by the maximum short value (32767)
- multiply the value with the channel reference value
- add the channel offset to the value
- multiply the value with 1000 and divide by the channel sensitivity value
- if channel db_reference exists and is positive
- multiply the log10 of the absolute value divided by the db_reference with 20 -
20 * log10(abs(value) / db_reference) - add the channel pregain to the value
- multiply the log10 of the absolute value divided by the db_reference with 20 -
Reference code can be found in the value_converter function.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dr_files-0.1.7.tar.gz.
File metadata
- Download URL: dr_files-0.1.7.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.11.15 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c52acd4fd170bbacd47daaa7e98fa3813e6eca3476f5a90dbe41148471e51072
|
|
| MD5 |
35690d9fc61dcf81b6a0c4dda772d3d3
|
|
| BLAKE2b-256 |
8066a735b5ccf8accec0f4eaf3a1fdcd0e97feef4724f86d75b8c10d91086d66
|
File details
Details for the file dr_files-0.1.7-py3-none-any.whl.
File metadata
- Download URL: dr_files-0.1.7-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.11.15 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ab5f23f9df300c98481a491bf90b708a9f90223a6a9e92527c568341d2616b8
|
|
| MD5 |
b1bb1a6b8ecfc0de191714157a946d3d
|
|
| BLAKE2b-256 |
0dede8966aac6c1fb7c94e5a8e8b970b7b31bd7f2e9060baaa3bc1f8b9c065cb
|