All one needs to understand the Uwatec TEC2G is a bit of information, MDB Tools, and libdivecomputer. In this article, I will show how to understand and get data out of SmartTRAK logs as well as how to get dive data from the Aladin TEC2G, among others the watertype of a given dive data that otherwise is missing in libdivecomputer.
Before going into details, one important disclaimer. This data is provided as is without any kind of warranty, it is based on my understanding which may be entirely wrong. DO NOT use the data for making any diving related decision without first consulting a reliable source.
First, let us start with the SmartTRAK log files. The SmartTRAK log files, as can be found fairly quickly with an Internet search, are Microsoft Access Database files containing the dives. Rumor has it that the database of the dive log can be easily damaged and the dives should be exported into a fresh copy. Downside is that during that process, the dives may get renumbered (happened to me). Another rumor is that the Access database file is password protected with the password “gU6dokZ6sk9R”. For me MDB Tools, however, worked just fine on the database without asking for a password.
Actually, the database schema looks like something where little or no thought was invested by the developers. The most important table is the Dives table. The columns in the “Dives” table are fairly self explanatory and probably the nicest that the developers did, is to include the dive profile exactly the way as it is stored on the dive computer. The “Log” column storing the log part of the dive and the “Profile” column storing the profile of the dive. If the binary data of these two columns are joined, we get the perfect dive data as libdivecomputer would download from the dive computer itself. That was an awesome decisions by the developers, and other dive log developers could mimic that idea, especially, as long as they do not fully understand all the fields that they download. I will come back to that later.
The third interesting column is the “DiveComputerType”. This column indicates the model and at least for the TEC2G matches the model number used by libdivecomputer. That said, using that information, we can read out all the dives from the SmartTRAK dive log with MDB Tools, get the raw dive computer data, create an uwatec_smart_parser provided by libdivecomputer, and parse the dive data. This allows us to fairly cheaply write an importer for SmartTRAK logs for any software using libdivecomputer.
Now, for the last part, libdivecomputer, unfortunately does not understand all the fields the Aladin TEC2G stores in the dive log. Most annoyingly, it does honor the TEC2G’s water-type entry. Unlike other Uwatec dive computers the TEC2G does not contain a salinity sensor but unlike the cheaper models allows to manually set the water-type. This is copied into the log as a flag and based on that the depth values obtained from the log or the profile data need to be adjusted. If the water type was set to salt water, the depth values need to be divided by 1.025, for fresh water, they are correct.
Now let us analyze, a TEC2G dive log for a salt water dive (profile data has been omitted). The data is stored in little-endian formet.
Temp: 36.6 Time(in): 620982361 Duration: 46min @ 26.77m WTemp: 28.0-33.6 Gas(O2): 21.0 Decogas(O2): 0.0 a5 a5 5a 5a e7 03 00 00 59 70 03 25 00 01 00 00 ..ZZ....Yp.%.... e8 01 00 00 00 02 b8 0a b0 06 2e 00 50 01 18 01 ............P... 6e 01 15 00 00 06 03 00 00 00 01 00 00 00 78 05 n.............x. 78 05 40 06 dd 0f 3c 00 00 00 00 00 00 40 10 40 x.@...<......@.@ fe 7f 6f 3d 41 01 00 00 00 00 00 00 00 00 00 00 ..o=A........... 00 00 00 25 00 00 65 0b 00 00 65 0b 00 00 65 0b ...%..e...e...e. 00 00 65 0b 00 00 65 0b 00 00 65 0b 00 00 65 0b ..e...e...e...e. 00 00 65 0b ..e.
Many of the items that I explain here, libdivecomputer considers already.
- uint32_t magic_cookie 0x5a5aa5a5 to indicate this being an Uwatec Smart dive log.
- uint32_t record_length of the dive log (Log+Profile data).
- uint32_t immersion_time in half seconds.
- The next 4 bytes are unknown (the last two are probably always 0x0000, at least in my approximately 100 dives they are).
- int8_t tz indicates the timezone in 15 minute increments.
- int8_t rep_no indicates the repetitive dive number.
- The next 4 bytes are again unknown.
- uint16_t max_depth indicates the maximum depth of this dive in centimeters and relative to fresh water. For a salt water dive, this value must be divided by 1.025.
- The next two bytes are again unknown.
- uint16_t dive_time in minutes.
- uint16_t max_wtemp indicates the maximum water temperature in 0.4C increments.
- uint16_t min_wtemp indicates the minimum water temperature in 0.4C increments.
- uint16_t surface_temp indicates the surface temperature in 0.4C increments.
- uint8_t gas_o2 indicates the O2 level of the different gas mixtures. gas_o2 is the standard diving gas, gas_o2 is not supported by the TEC2G (maybe this byte serves a different purpose), and gas_o2 is the deco gas, 0x00 most likely indicates no deco gas in use.
- The next nine bytes are again unknown, the last 3 of which potentially are always 0x000000.
- uint16_t gas_ppo2 indicates the maximum allowed ppO2 level for each gas. gas_ppo2 is the maximum ppO2 of the standard diving gas, gas_ppo2 is not supported by the TEC2G and is a copy of gs_ppo2 (maybe these bytes serves a different purpose), and gas_ppo2 is most likely the maximum ppO2 of the deco gas.
- The next 10 bytes are unknown.
- uint8_t flags indicates some flags. 0x10 is most likely the bit for salt water (if cleared) and fresh water (if set). I have not seen the other bits being toggled. But I have not played around yet with maximum dive time, respectively maximum depth alerts, or other flags that may be stored here. My only fresh water dive has 0x00 in this field. Based on my approximately 100 salt water dives I am quite certain that I can rule out any of the other fields/bits.
- The next 21 bytes are unknown.
- uint32_t tissue_saturation indicates most likely the saturation of the 8 tissues that the TEC2G simulates at the start of the dive. I am unaware of the encoding, but the levels somewhat match the corresponding bar chart in the SmartTRAK software.
I hope this information is useful to anybody using SmartTRAK or having a TEC2G dive computer. If you have any data not presented here or any other useful comments, please let me know.
This is awesome. I agree about the schema design.