Vital Recorder User Manuals
Getting Started 2019-11-21
Hardware Connection Guide 2019-11-21
Vital Recorder User's Manual 2019-11-19
How to use recorded vital files 2019-11-21
Making custom filters for Vital Recorder 2017-09-11
VR Parameter List 2019-11-18
Vital File Format 2019-09-29
Vital File Utility Manual 2016-11-25
- The vital file is a file format used in vital recorder for saving vital signs and waveforms
- It is a single gzip compressed binary file starts with (1F 8B 08 00)
- It contains a header and a body part
- Multi-byte variables are encoded using littlen-endian
- All data structures are arranged in 1-byte units.
- Caution! Some compilers use 4 byte alignment implicitly.
- String data format
- Strings are encoded in UTF8
- It contains 4 byte length (without length itself) followed by character array of specified length
- Caution! It does not include the following NULL(\0) character
- Time data format
- Ttimes are stored in UTC
- UTC can be converted to the local time using time zone bias (offset) in the header part.
- UTC = local time + tzbias
- All time data are represented as the number of seconds since 1970/01/01 00:00:00 UTC as a double data format
- This is compatible with Unix timestamps and convenient for addition and subtraction.
- Changing the time to __int64 makes the speed slower because it require conversion in every operation.
- The decimal point is used to indicate the precision below seconds. (for example 0.1 means 100 milliseconds)
- Because the unix timestamp of year 2020 is 1,606,780,800, 31 bits are enough to express integer part of it. IEEE 754 double data type has 52 bit for fraction part, so 21 digits can be used for the representation of sub second time. 2 ^ 20 is about 1 million, so it has about 1 usec resolution.