Contents
  1. 1. Settings
  2. 2. Last dive
  3. 3. Logbook
  4. 4. Dive profiles

DiveIno works with the following files:

  1. Settings
  2. Last dive information
  3. Logbook
  4. Dive profiles

Up until version 1.2 all of these files were plain text files as discussed in the DiveIno logfile format and the DiveIno logbook file format posts.

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!

Settings

The file Settings.json contains similar values like below:

1
2
3
4
5
6
{
"seaLevelPressure": 1.01320e3,
"oxygenPercentage": 0.21,
"soundEnabled": false,
"isImperialUnits": false
}

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.

Last dive

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"timestamp": 1482232045,
"diveDate": "2016-12-20",
"diveTime": "11:07:22",
"diveDuration": 1680,
"noFlyTime": 1440,
"maxDepth": 40.60,
"wasDecoDive": true,
"compartmentPartialPressures": [
1.64922e3,
2.05066e3,
2.05815e3,
1.91761e3,
1.71752e3,
1.52344e3,
1.34750e3,
1.20036e3,
1.08448e3,
1.00857e3,
957.49987,
916.81170,
884.41003
]
}

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.

Logbook

The Logbook.json file provides data for DiveIno logbook.

1
2
3
4
5
6
7
8
9
{
"numberOfDives": 3,
"loggedDiveHours": 0,
"loggedDiveMinutes": 48,
"maxDepth": 40.60,
"lastDiveDate": "2016-12-20",
"lastDiveTime": "11:07",
"numberOfStoredProfiles": 3
}

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.

Dive profiles

The DiveXXXX.json file has the following structure:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"summary": {
"diveDuration": 1680,
"maxDepth": 40.60,
"minTemperature": 15.00,
"oxigenPercentage": 21.00,
"diveDate": "2016-12-20",
"diveTime": "11:07"
},
"profile": [
{
"depth": 7.00,
"pressure": 1.71688e3,
"duration": 15,
"temperature": 15.00
},
{
"depth": 8.20,
"pressure": 1.83750e3,
"duration": 20,
"temperature": 15.00
}
]
}

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.

Contents
  1. 1. Settings
  2. 2. Last dive
  3. 3. Logbook
  4. 4. Dive profiles