This little project is just simple Microsoft Access, Excel and Visual basic that uses the information from the Suunto Dive Manager software and displays it in a Excel Spreadsheet. This way you can create any type of statistics you want.
Firstly, we have to understand how SDM works. Simply put this is just a graphic user interface into a Microsoft Access 2003 Database. It has communication capabilities that downloads the contents of Suunto dive computers and stores the contents within tables.
There are a number of tables within the database storing different aspects of the activity recorded within the dive computer. In fact it is actually a generic database I believe Suunto uses across all the smart sports watches. Some of the field names suggest this.
The Database is password protected the password being Finnish for dog "koira"
There is a lot of fields and I don't know what they are all used for I have managed to identify some with a little bit of trial and error.
This is where the bulk of the data is stored. Be carful with this table, different fields are used for different things depending on the "type" field. The other field to understand is the "parent" this is a reference back to itself (that is the Items table "ItemId" field). Basically a dive which is type 33 will have an ItemID eg. 934, you may have selected a piece of dive kit (Type 21). its ItemID of 963, its "Parent" is 934. This means the piece of dive kit was used on ItemID 934, in this case it is Dive number 678. or field name "i_custom11". Think about it and you will get the idea.
This is a table of all Cylinders used. The information in this is used in gas
calculations and SAC rates. This is stored into the GasChanges Table.
The SAC rate displayed within SDM is actually a little wrong, what SDM does is convert back to PSI and then calculates SAC. This does give a small margin of error as SAC is generally a metric calculation. Generally I have found the SAC in SDM on the low side by about 10-15%
???? I would think this is for the Dive Planner software. I tried but nothing was saved here.
This is where the SAC rate is calculated. The LogID references the ItemID in the Items table. Also stores the basic dive data. Dive Time, Oxygen mix, Average depth, tank pressures, All the information to calculate the SAC.
This is where the profile of the dive is stored. the LogID references back to the Items table ItemID.
This is where all the lists are stored including the 5 Custom lists. They have a type field linked back into the Items table.
All the computer alarms that have been indicated. LogID references ItemID in the Items table. It has the name, depth and time of the event.
I have inserted a query within the database, and SDM didn't complain about it. Then I open the database from within Excel, store the results of my query into a worksheet, then I have a number of other worksheets to calculate a few things and filter it the way I want. The output is my Dive Log here. To create the query in the database, just open it, (enter the password) and create a new query, change the view into SQL mode and delete everything in the window. Then paste this into the window
SELECT Items.i_custom11 AS [Dive No], Format([StartTime],"dd/mm/yyyy") AS
[Date], Items.t_custom3 AS Location, Items.t_custom4 AS Site,
Format([StartTime],"Short Time") AS [Time In], Format([EndTime],"Short Time") AS
[Time Out], IIf([d_custom1]=0,"",(Format(Int([d_custom1]/60/60/24),"00")) & ":"
& (Format(Int((([d_custom1]/60/60/24)-Int([d_custom1]/60/60/24))*24),"00")) &
":" & (Format((((([d_custom1]/60/60/24)-Int([d_custom1]/60/60/24))*24)-Int((([d_custom1]/60/60/24)-Int([d_custom1]/60/60/24))*24))*60,"00")))
AS SI, Round([d_custom9],1) AS Depth, Round([Distance]/60) AS Duration,
[Starting Pressure], IIf([EndPressure]>0,Round([EndPressure]/1000),Round([d_custom14]/1000))
AS [End Pressure], Round([d_custom5]) AS Weight, Items.i_custom13 AS [Air Temp],
Items.i_custom15 AS [Surface Temp], Items.i_custom14 AS [Bottom Temp],
Items.t_custom10 AS Vis, Items.t_custom8 AS Buddy, IIf([Duration]=0,0,(Round((([Starting
Size]/(([d_custom10]/10)+1)/([Distance]/60)),2))) AS SAC, " " AS [Accumulated
Time], Items.t_custom12 AS CUSTOM1, Items.t_custom13 AS CUSTOM2, IIf([Items].[i_custom8]=0,21,IIf([Items].[i_custom8]>99,[GasChanges].[OxygenMix],[Items].[i_custom8]))
AS [O2%], " " AS Spare1, " " AS Spare2, Items.t_custom6 AS [Boat Name],
IIf([cylindersize]>0,[cylindersize],[d_custom11]) AS [Tank Size],
[Tank WP], Round([d_custom10],2) AS [Avg Depth], " " AS Spare3, Year([StartTime])
AS [Year], Items.UserId AS [User]
FROM Items LEFT JOIN GasChanges ON Items.ItemID = GasChanges.LogId
WHERE (((Items.i_custom11)>0) AND ((Items.b_custom2)=False))
ORDER BY Items.i_custom11 DESC;
This will set up all the field names and calculations etc, Click on Run and you will see it contains all the information you would require. Feel free to modify. Let me know if there are any errors or if I can help in any way.
My Excel workbook (see NOTE below) (there is a lot of VBA code in the workbook, there is also some minor errors in the workbook as well, I am sure you can work them out.) has some samples on how you can access the data automatically and calculate statistics and other information. It has a settings sheet where you set up where the database lives. The first time you open the workbook you might get a VBA error, just click on END and make sure the database is in the location under the setting tab.
Some settings are in the dm.ini file C:\Program Files\Suunto\Suunto Dive Manager 3\dm.ini this is where you tell SDM where to find the database. You can update this from the excel worksheet "settings". The headings to the 5 CUSTOM fields are also stored here. You can also change them if you want. I actually write the password back into the ini file. This is so I don't forget it. I use it in the database connection.
The database by default is D9.mdb and its usually stored in the All_Users profile under Application Data Suunto, C:\Documents and Settings\All Users\Application Data\Suunto\d9.mdb, or in the C:\Program Files\Suunto\Suunto Dive Manager 3 folder, I have renamed mine and placed it in My Documents, it makes it easy to backup.
I am not sure if this is going to work first time for you, as it took me quite a while to debug the VBA code and get it all running, but if you have a little bit of knowhow you will get it to work.
NOTE: Excel 2007 xlsm files are actually zip files with a structure that Excel knows and uses, just save as file.xlsm.