Profile format documentation

3rd party extensions (phpDivingLog, dive computer downloader,...)
Post Reply
divinglog
Site Admin
Posts: 5844
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Profile format documentation

Post by divinglog »

Here is the updated documentation, how Diving Log stores the profile data. This refers to version 4.0.9 and above. There are 3 fields in the database, Profile, Profile2 and Profile3. Each profile is saved in numerical values as a string, containing several blocks of data.


The first (main) Profile is build of blocks of 12 numbers and contains this data:

Code: Select all

DDDDDCRASWEE

D: Depth (in meter with two decimals)
C: Deco (1 = yes, 0 = no)
R: RBT (Remaining Bottom Time warning)
A: Ascent warning
S: Decostop ignored
W: Work warning
E: Extra info (different for every computer)

Example: 004500010000
4.5 m, no deco, no RBT warning, ascanding too fast, no decostop ignored, no work, no extra info

The Profile2 is build of blocks of 11 numbers and contains this data:

Code: Select all

TTTFFFFIRRR

T: Temperature (in °C with one decimal)
F: Tank pressure 1 (in bar with one decimal)
I: Tank ID (0, 1, 2 ... 9)
R: RBT (in min)

Example: 25518051099
25.5 °C, 180.5 bar, Tank 1, 99 min RBT

The Profile3 is build of blocks of 14 numbers and contains this data:

Code: Select all

GGGGHHHHBBBCCC

G: Tank pressure 2 (in bar with one decimal)
H: Tank pressure 3 (in bar with one decimal)
B: Heart rate (in bpm)
C: Compass Bearing (in degree)

Example: 00000500120270
0 bar, 50 bar, 120 bpm, 270° compass course

The Profile4 is build of blocks of 9 numbers and contains this data:

Code: Select all

NNNTTTDDD

N = No Deco Limit (NDL). During deco it is zero or time to surface
T = Time on 1st deco stop (deepest)
D = Depth of 1st deco stop (deepest = deco ceiling)

Example: 000005006
0 min NDL, first stop 5 min at 6 meter

The Profile5 is build of blocks of 19 numbers and contains this data:

Code: Select all

AAABBBCCCOOOONNNNSS

A = ppO2 cell 1 (measured)
B = ppO2 cell 2 (measured)
C = ppO2 cell 3 (measured)
O = OTU
N = CNS
S = Setpoint

Example: 1121131141548026411
1.12 bar, 1.13 bar, 1.14 bar, OTU = 154.8, CNS = 26.4, Setpoint = 1.1

The sample rate (seconds between each record) of the profile entries is saved in the field "ProfileInt" in seconds. The ascent/descent rate profile is calculated dynamically and is not stored in the database. The following combinations of available profiles are possible:
  • No profile
  • Profile
  • Any combination of Profile and Profile2, Profile3, Profile4, Profile5
Last edited by divinglog on Fri Jul 18, 2008 19:36, edited 1 time in total.
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

do you have a sample logbook with this data in? So I can add them to phpDivinglog
divinglog
Site Admin
Posts: 5844
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

No problem, I just sent you an email with some example data.
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

divinglog wrote:No problem, I just sent you an email with some example data.
When exporting your logbook this gives an error in Mysql:

Code: Select all

SQL-query:

#
# Data for table 'profilePersonal'
#
INSERT INTO profilePersonal
VALUES ( 1, '', '', '', '', '', '', '', '', '', '', '', NULL , NULL , , '', '', '', '' ) ;

MySQL retourneerde: Documentatie
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '', '', '', '')' at line 1 
divinglog
Site Admin
Posts: 5844
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

The error is because no personal information is entered. Simply enter some dummy data oder uncheck the "Personal" table before exporting and it should work. I'll take a look at the MySQL export and see why the dump file isn't working with empty personal data.
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

divinglog wrote:The error is because no personal information is entered.
I noticed alread
I'll take a look at the MySQL export and see why the dump file isn't working with empty personal data.
I think it is just nice that the mysql export works also without personal information.
divinglog
Site Admin
Posts: 5844
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Profile format documentation

Post by divinglog »

I've updated the first post to document the new Profile4 and Profile5 format.
Post Reply