[PATCH] Visualisation of individual oxygen sensor data for CCR dives

Davide DB dbdavide at gmail.com
Wed Apr 12 01:27:17 PDT 2017


On 11 April 2017 at 23:44, Jef Driesen <jef at libdivecomputer.org> wrote:

>
> I'll need to look again at the old discussion, but if I remember
> correctly, your patch produced bogus results for some of the data I tested
> against. And that's why I wanted to double check with Shearwater. But so
> far I wasn't able to get any info from Shearwater. So yes, let's have
> another look
>

Maybe I'm really messing up things but reading Dirk email regarding his
contact at Shearwater "Perdix / Perdix AI info from Shearwater" it seems
that Perdix and Petrel devices don't carry O2 info via their protocol:


*Contents*
Block Offset

LOG_RECORD_TYPE_DIVE_SAMPLE (0x01)
0-1
Depth, in current units
2-3
Next Stop Depth, in current units
4-5
Time-To-Surface (TTS), minutes
6
Average PPO2 in ata (x100, e.g.  123=1.23)
7
Current gas percent O2
8
Current gas percent He
9
Next stop time, minutes (If Next Stop Depth is Zero, then this is the NDL
time in minutes. Note that NDL was offset 10 in the old Predator log
versions).
10
Battery voltage Note: Legacy use only. More precise value available at
offset  16
11
Misc. Statuses:
Bit 0: 1=gas switch needed, 0=not needed
Bit 1: 1=external PPO2, 0=internal PPO2
Bit 2: 1=high setpoint, 0=low setpoint
Bit 3: 1=SC mode, 0=CC mode
Bit 4: 0 = Closed Circuit, 1= Open Circuit
12
O2 Sensor 1 millivolts (only valid when external PPO2 monitoring enabled)
13
Water temperature (Celsius when metric, Fahrenheit when imperial)
14
O2 Sensor 2 millivolts (only valid when external PPO2 monitoring enabled)
15
O2 Sensor 3 millivolts(only valid when external PPO2 monitoring enabled)
16-17
Battery voltage * 100
18
Current ppo2 set point (only valid for CC mode)
19 - 20
For Log Version 7 and greater (below this field is unused):
Wireless AI sensor 1 (T2), most 4 bits are battery level . 0= battery
normal, 1= critical low, 2 = warning low
Rest 12 bits are sensor1 pressure/2 in psi

·         0xFFFF: not paired / no communication for 90 seconds

·         0xFFFE: no communication for 30 seconds


21
For Log Version 7 and greater (below this field is unused):
Gas time remain minutes of Wireless AI

·         0xFF not paired,

·         0xFE no communication,

·         0xFD not available in current mode,

·         0xFC not available because of DECO,

·         0xFB Tank size or max pressure haven’t been set up,

·         0-0xFA valid range

22
CNS percentage
23
Decompression Ceiling Depth (current units)
24
Gf99 (current Buhlmann percent Gradient)
25-26
@+5 (in minutes)
27 - 28
For Log Version 7 and greater (below this field is unused):
Wireless AI sensor 0 (T1), most 4 bits are battery level . 0= battery
normal, 1= critical low, 2 = warning low
Rest 12 bits are sensor0 pressure/2 in psi

·         0xFFFF: not paired / no communication for 90 seconds

·         0xFFFE: no communication for 30 seconds

29-30
For Log Version 7 and greater (below this field is unused):
Surface Air Consumption (SAC) in PSI/min.
Value is x100. E.g. 3245 = 32.45 PSI/min
31
Reserved for future use



They carry only a global pO2 (I guess it's the result PO2 from so called
voting logic hence used in all further calculation) and mV values for each
sensor. BTW individual mV 02 sensor graph was added in version 2.3.5:
https://www.shearwater.com/release-notes-firmware/shearwater-desktop-2-3-5-released/
<https://www.shearwater.com/release-notes-firmware/shearwater-desktop-2-3-5-released/>
Hence would be impossible to display single individual pO2.



> For the Shearwater Petrel CCR divers reading this: Can you supply us with
> some more data to test against? The Petrel protocol doesn't support memory
> dumps, so you'll need to dump the individual dives. You can do that with
> libdivecomputer' dctool:
>
> http://www.libdivecomputer.org/builds/stable/linux/dctool
>
> Execute with these options:
>
> ./dctool -v -l petrel.log -f petrel download -o dive.%n.bin -f raw
> /dev/rfcommX
>
> Send back the petrel.log and all the dive.*.bin files.
>
> Jef
>

Is there something equivalent for a Windows CCR user? :-)

Bye


PS
Dirk, I tried to link your email form the mailing list archives but I get
this error:

Error
*subsurface roster authentication failed.*

-- 
Davide
https://vimeo.com/bocio/videos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170412/a18ea783/attachment-0001.html>


More information about the subsurface mailing list