https://github.com/elecgeek/healthmeter
Converts the binary file (.DAT) into a more readable and makes some statistics for health or sport meters.
https://github.com/elecgeek/healthmeter
cplusplus cplusplus-17 data-processing healthcare
Last synced: 7 months ago
JSON representation
Converts the binary file (.DAT) into a more readable and makes some statistics for health or sport meters.
- Host: GitHub
- URL: https://github.com/elecgeek/healthmeter
- Owner: ElecGeek
- License: gpl-3.0
- Created: 2024-07-07T11:28:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T20:04:48.000Z (almost 2 years ago)
- Last Synced: 2025-03-16T06:12:24.326Z (over 1 year ago)
- Topics: cplusplus, cplusplus-17, data-processing, healthcare
- Language: C++
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
For the whose has an health or sport meter with the properties:
* can be connected with a (micro) usb that exposes a disk containing a data file.
* the file is a concatenation of measurements, until the meter's memory is full (and has to be erased from the device).
* the measurement binary files:
* contains some data
* contains records separated by a series of $ff (odd or even)
* the header
* the record number
* some data
* the date and time as plain char numbers (only from 0 to 12, 23, 31 or 59 are used)
* some data
* the sampling rate as the time, in seconds, between two samples.
* some data
* contains a data zone that can read as a raw file 8bits, signed, 2 channels
* this data is between 0 and 100
* terminates with a set of $ff
* contains some data
This project is for him.
The project process:
* the parsing of the arguments to get the files names
* if no file-name is provided at all, the default one is used
* if at least one is provided, it or they are processed
* the reading of these binary files in the same order
* some statistics. They are sent to the standard output as:
* the record number
* some data in debug mode only
* the date
* the time
* the record length in minutes
* the min, max and average
* many percent of the time the value is under a certain threshold
* a file-name based on the first record time-stamp for each input file.
* a raw file, of that file-name, intended to be open by most of the music editing software.
* a record limit containing the time-stamp in the 2 channels. It has been design to not be confused with the record themselves
* 100% sample
* date
* 0%
* time
* 100% sample
The user has to zoom at the maximum to see the samples individually.
The numbers (between 0 and 59) are coded as 2 samples. One is for the left digit, one for the right. They are multiplied by 10%. e.g. 52 is 50% 20%.
* the data converted from 0 to 100% into 0 to 127. By this way, the editing software shows 100% for a 100% measure.
An additional feature applies if a record follows the previous one exactly one hour later:
* the statistics display the time only, not the date.
* the record limit, in the raw file, are omitted.
All the interfaces with the machine are done via the C++11 features. The project should compile by a simple "make" invocation.
The Makefile supports the SOURCEDIR, BUILDDIR, DESTDIR, CXX, CXXFLAGS and LDFLAGS variables for cross-compilation.
It compiles on Ubuntu, Windows and MacOS-X
There is a work-flow to build standard versions. For specific versions, such as default names, one has to build himself.
TODO or never: handle properly the new year and fix the bug that does not merge the records in the new year night.