<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Thanks for this, I did some work on cobalt import earlier. Will take a look of what new info you have figured out once back in the north.<br><br>miika<br><br></div><div><br>On 15 Jan 2015, at 04:14, Rainer Mohr <<a href="mailto:mail@divelogs.de">mail@divelogs.de</a>> wrote:<br><br></div><blockquote type="cite"><div>
  

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  
  
    Gentlemen,<br>
    <br>
    Atomic Aquatics provides a (windows) software called "Atomic
    Logbook" to download the dives from the Cobalt and Cobalt 2<br>
    Thanks to Jef who sent me an example file, I could write an import
    for <a href="http://divelogs.de">divelogs.de</a> and would like to share my findings with you, in
    case you want to write an import for it too...<br>
    <br>
    The software saves its data in an SQlite database at
    C:\ProgramData\AtomicsAquatics\Cobalt-Logbook\Cobalt.db<br>
    <br>
    To get a list of all dives, fire the following SQL:<br>
    <br>
    <blockquote>SELECT Dive.Id, strftime('%Y-%m-%d',Dive.DiveStartTime)
      as date, strftime('%H:%M',Dive.DiveStartTime) as time, place.Data
      AS place, site.Data AS site, weather.Data AS weather, viz.Data AS
      viz, buddy.Data AS buddy, notes.Data as notes,<br>
      LogPeriod AS samplerate, Temperature, SurfacePressure,
      (SurfHours*60+SurfMinutes)*60 AS si, Units, Segments,
      MaxDepthPressure,
      round((MaxDepthPressure-SurfacePressure)*0.99*0.01,1) AS MaxDepth,
      DiveMinutes<br>
      FROM Dive<br>
      LEFT JOIN (SELECT Items.DiveId, Data FROM Items INNER JOIN List ON
      Items.Value1= List.Id WHERE Items.type=0) place ON Dive.Id =
      place.DiveId<br>
      LEFT JOIN (SELECT Items.DiveId, Data FROM Items INNER JOIN List ON
      Items.Value1= List.Id WHERE Items.type=1) site ON Dive.Id =
      site.DiveId<br>
      LEFT JOIN (SELECT Items.DiveId, Data FROM Items INNER JOIN List ON
      Items.Value1= List.Id WHERE Items.type=2) weather ON Dive.Id =
      weather.DiveId<br>
      LEFT JOIN (SELECT Items.DiveId, Data FROM Items INNER JOIN List ON
      Items.Value1= List.Id WHERE Items.type=3) viz ON Dive.Id =
      viz.DiveId<br>
      LEFT JOIN (SELECT Items.DiveId, Data FROM Items INNER JOIN List ON
      Items.Value1= List.Id WHERE Items.type=4) buddy ON Dive.Id =
      buddy.DiveId<br>
      LEFT JOIN (SELECT DiveId, Data FROM List WHERE Type=5) notes ON
      Dive.Id = notes.DiveId<br>
    </blockquote>
    <br>
    To get all *used* gas mixes (there are always at least three tanks,
    even if not actually used) with start- and endpressure of each tank,
    fire:<br>
    <br>
    <blockquote>SELECT max(gaspressure) as startpress, min(gaspressure)
      as endpress, gasmix, tankpressure, tanksize, O2, he    <br>
      FROM TrackPoints<br>
      LEFT JOIN GasMixes ON TrackPoints.GasMix = GasMixNumber AND
      TrackPoints.DiveId = GasMixes.DiveId<br>
      WHERE TrackPoints.DiveId = {the_dives_id} AND gaspressure > 0<br>
      GROUP BY GasMix<br>
    </blockquote>
    <br>
    Here, the Tanksizes are somewhat stupid.<br>
    If your tankpressure == 0 then the tanksize is "tenths of a liter",
    so 100 will give you a 10 liter tank<br>
    If the tankpressure > 0, then the tanksize is cuft with the
    workingpressure "tankpressure", so will need to convert to liters if
    needed in metric.<br>
    <br>
    To get the profile data from a dive fire:<br>
    <br>
    <blockquote>SELECT round((depthpressure-{SurfacePressure_from_dive})*0.99*0.01,1)
      as depth, Temperature, GasPressure, GasMix, O2, He, runtime FROM
      `TrackPoints` WHERE DiveId = {the_dives_id} Order by runtime <br>
    </blockquote>
    <br>
    if you need any further info, shoot...<br>
    <br>
    Regards,<br>
    Rainer<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
  

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>subsurface mailing list</span><br><span><a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a></span><br><span><a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a></span><br></div></blockquote></body></html>