The mingw native 64bit integer type is long long. The msvc __int64 type is supported for compatibility reasons, but requires including one of the standard C header files.
The internal memory appears to contain two separate areas. One for the normal dives and one for the freedives. Currently, only the freedive section is processed.
Due to the larger memory capacity, the Oceanic OC1 needs an additional bit to be able to address memory pages above 64K.
If the first few bytes of the timestamp are equal to zero, they were incorrectly identified as part of the header marker. The correct header marker is located a the start of this zero byte sequence, not the end.
Because the sample data contains a timestamp with a limited resolution of only one minute, there can be consecutive samples with identical timestamps. To deal with this situation, samples with identical timestamps are distributed evenly inside the one minute interval. All resulting non-integer timestamps are rounded to the nearest second. For dives with a time based interval, the timestamps are now validated.
When the Sensus Ultra reaches the end of a memory page while recording data, the next page is erased to all 0xFF, and the current page cursor is advanced. With this memory usage scheme, the last page will be empty if the previous one was just filled.