• Welcome to ScubaBoard


  1. Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

    Benefits of registering include

    • Ability to post and comment on topics and discussions.
    • A Free photo gallery to share your dive photos with the world.
    • You can make this box go away

    Joining is quick and easy. Login or Register now by clicking on the button

Perdix AI recorded incorrect Surface Interval for dive

Discussion in 'Computers, Gauges, Watches and Analyzers' started by ATJ, Sep 8, 2019.

  1. ATJ

    ATJ Barracuda

    # of Dives: 1,000 - 2,499
    Location: Sydney, NSW, Australia
    268
    139
    43
    Note: This is not a safety issue but rather incorrect data being written for a dive.

    I've had a medical issue that has prevented me from diving for a little over 6 weeks (my longest non diving period in a couple of decades). I finally got back in the water 48 days after my last dive.

    For the whole period I was off, my Perdix AI (and my Garmin Descent Mk1) reminded me of how long it was since I'd last dived.

    Here are photographs of the Perdix and the Descent about 50 minutes before I hit the water for a dive on Saturday.
    PerdixSI47days.jpg
    GarminSI47days.jpg

    They clocked over to 48 days by the time I was in the water ready to start the dive.

    Here's the dive log data for previous dive:
    PerdixDiveLog1711Times.jpg

    And here's the data for Saturday's dive:
    PerdixDiveLog1712Times.jpg

    The surface interval should be 48 days and 32 minutes (or 1152 hours and 32 minutes)

    But this is what the log says:
    PerdixDiveLog1712SI.jpg

    60 hours and 19 minutes.

    This same data is picked up by both Shearwater Desktop and Shearwater Cloud.

    My previous longest SI with the Perdix was 27 days but this was recorded correctly.

    I wonder if anyone else has seen this with really long Surface Intervals.
     
  2. guruboy

    guruboy Divemaster ScubaBoard Supporter

    4,965
    787
    113
    Looks like the surface interval in the log is saved in minutes as an unsigned 16bit number. The max value of such a number is 65535.

    Because your SI was so long, this counter rolled over back to 0 at some point.

    The actual time you stated would be 69,152 minutes.

    69,152 - 65535 = 3,617

    3,617 minutes = 60hrs and 17min

    BTW, 65535 minutes is about 45.51 days. It should be relatively straight forward fix to change the variable in question into an unsigned 32bit number instead.
     
    undrwater, tridacna and Peter Slater like this.
  3. ATJ

    ATJ Barracuda

    # of Dives: 1,000 - 2,499
    Location: Sydney, NSW, Australia
    268
    139
    43
    That's along the lines of what I was thinking but it displayed the correct surface interval immediately before the dive. That means that what is store internally for display is large enough and it must mess up at the time it is written to the log. I guess internally it is a 32bit number but the log takes 16bit and so the higher 16 bits are discarded.

    I've reported it to Shearwater and we'll see what they come back with.

    I would have to assume that loads of people with Perdix have had SI longer than 45 days and would have seen this before.
     
  4. dmaziuk

    dmaziuk Regular of the Pub

    6,340
    2,579
    113
    Assuming it's a 32-bit (capable) microprocessor inside.
     
  5. ATJ

    ATJ Barracuda

    # of Dives: 1,000 - 2,499
    Location: Sydney, NSW, Australia
    268
    139
    43
    It must be as it was correctly showing the SI on the screen. Or at the very least there are ways for it to store that long a surface interval.
     
  6. guruboy

    guruboy Divemaster ScubaBoard Supporter

    4,965
    787
    113
    Even if it’s not a 32bit processor it can still support 32bit variables.
     
  7. dmaziuk

    dmaziuk Regular of the Pub

    6,340
    2,579
    113
    ... but the required change becomes progressively less straightforward.
     
  8. dmaziuk

    dmaziuk Regular of the Pub

    6,340
    2,579
    113
    Yes but it's one thing to change all ints to unsigned and recompile and another: to program in e.g. a separate "hours" and "minutes" for displaying SI. (Assuming the former is a safe thing to do, of course.)
     
  9. guruboy

    guruboy Divemaster ScubaBoard Supporter

    4,965
    787
    113
    Not if the code is written well.
     
  10. dmaziuk

    dmaziuk Regular of the Pub

    6,340
    2,579
    113
    :rofl3::rofl3::rofl3:
     

Share This Page