DiveIno works with the following files:
- Last dive information
- Dive profiles
Honestly I wanted to have something more structured from the beginning, but I couldn’t find a good enough json parser library for the Arduino platform. It was changed, when I bumped into the ArduinoJson library. This simply does the job and be able to support DiveIno json handling requirements. Let me go through these one by one!
The file Settings.json contains similar values like below:
The seaLevelPressure object represents the default pressure in milliBar on the sea level. As you might notice, it is in scientific notation. The reason is quite simple. The ArduinoJson library encodes a double value in this format, if it is greater than 1000.
The oxygenPercentage is the default oxygen percentage of the breathing gas. The 0.21 value represents 21 %. This can be adjusted to support oxygen richer gas mix called nitrox.
The Lastdive.json file gets created after each dive. It contains the necessary information to be able to calculate repetative dive data like no fly time and decompression limits.
The timestamp belongs to the end of the previous dive. Just like all other data in this file. The diveDuration and noFlyTime entries are in minutes. The maxDepth entry is in meters.
The Logbook.json file provides data for DiveIno logbook.
The numberOfStoredProfiles property indicates how many stored dive profile can be found on the SD card. These are in a file called DiveXXXX.json, where XXXX identifies the profile number. This starts from one, so the Dive0001.json file belongs to the first dive profile.
In ideal case numberOfDives is equal with numberOfStoredProfiles, but if the dive profiles were downloaded and deleted from the SD card, it can be different.
The DiveXXXX.json file has the following structure:
The summary section contains the overall dive details. The diveDuration is in seconds, the minTemperature is in celsius degrees.
The profile section contains the dive profile entries. During the dive, DiveIno periodically stores a new entry in this file. The depth property is in meters, the pressure is in milliBars, the temperature is in celsius degrees and the duration is in seconds.
DiveIno plots the dive profile chart based on this data on the dive profile screen.