Fix up SAC calculations for ATM/bar confusion
We even documented that we did SAC in bar*l/min, but the "S" in SAC
stands for "Surface". So we should normalize SAC rate to surface
pressure, not one bar.
It's a tiny 1% difference, and doesn't actually matter in practice, but
it's noticeable when you want to explicitly test for SAC-rate by
creating a test-dive that averages exactly 10m. Suddenly you don't get
the round numbers you expect.
[ Side note: 10m is not _exactly_ one extra atmosphere according to our
calculations, but it's darn close in sea water: the standard salinity
of 1.03 kg/l together with the standard acceleration of 9.81m/s^2
gives an additional pressure of 1.01 bar, which is within a fraction
of a percent of one ATM.
Of course, divers have likely chosen that value exactly for the math
to come out that way, since the true average salinity of seawater is
actually slightly lower ]
So here's a few test-dives, along with the SAC rate fixup to make them
look right.
(There's also a one-liner to dive.c that makes the duration come out
right if the last sample has a non-zero depth, and the previous sample
did not: one of my original test-dives did the "average 10m depth" by
starting at 0 and ending at 20m, and dive.c got a tiny bit confused
about that ;)
[ The rationale for me testing our SAC rate calculations in the first
place was that on snorkkeli.net user "Poltsi" reported that our SAC rate
calculations differ from the ones that Suunto DM4 reports. So I wanted
to verify that we did things right.
Note that Poltsi reported differences larger than the difference of
BAR/ATM, so this is not the cause. I'll continue to look at this. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24 18:01:18 +00:00
|
|
|
<divelog program='subsurface' version='2'>
|
|
|
|
<settings>
|
|
|
|
</settings>
|
|
|
|
<dives>
|
|
|
|
<dive number='1' date='2013-02-24' time='09:26:04' duration='25:00 min'>
|
|
|
|
<location>SAC test dive 1</location>
|
|
|
|
<notes>SAC should be 20l/min (0.7063 cuft/min)
|
|
|
|
We have exactly 100 ATM of gas in a 10l cylinder, average 10m for 25min</notes>
|
2013-02-24 19:07:27 +00:00
|
|
|
<cylinder size='10.0 l' description='10l' start='202.6 bar' end='101.3 bar' />
|
Fix up SAC calculations for ATM/bar confusion
We even documented that we did SAC in bar*l/min, but the "S" in SAC
stands for "Surface". So we should normalize SAC rate to surface
pressure, not one bar.
It's a tiny 1% difference, and doesn't actually matter in practice, but
it's noticeable when you want to explicitly test for SAC-rate by
creating a test-dive that averages exactly 10m. Suddenly you don't get
the round numbers you expect.
[ Side note: 10m is not _exactly_ one extra atmosphere according to our
calculations, but it's darn close in sea water: the standard salinity
of 1.03 kg/l together with the standard acceleration of 9.81m/s^2
gives an additional pressure of 1.01 bar, which is within a fraction
of a percent of one ATM.
Of course, divers have likely chosen that value exactly for the math
to come out that way, since the true average salinity of seawater is
actually slightly lower ]
So here's a few test-dives, along with the SAC rate fixup to make them
look right.
(There's also a one-liner to dive.c that makes the duration come out
right if the last sample has a non-zero depth, and the previous sample
did not: one of my original test-dives did the "average 10m depth" by
starting at 0 and ending at 20m, and dive.c got a tiny bit confused
about that ;)
[ The rationale for me testing our SAC rate calculations in the first
place was that on snorkkeli.net user "Poltsi" reported that our SAC rate
calculations differ from the ones that Suunto DM4 reports. So I wanted
to verify that we did things right.
Note that Poltsi reported differences larger than the difference of
BAR/ATM, so this is not the cause. I'll continue to look at this. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24 18:01:18 +00:00
|
|
|
<divecomputer>
|
|
|
|
<depth max='10.0 m' mean='10.0 m' />
|
|
|
|
<sample time='0:00 min' depth='10.0 m' />
|
|
|
|
<sample time='5:00 min' depth='10.0 m' />
|
|
|
|
<sample time='10:00 min' depth='10.0 m' />
|
|
|
|
<sample time='15:00 min' depth='10.0 m' />
|
|
|
|
<sample time='20:00 min' depth='10.0 m' />
|
|
|
|
<sample time='25:00 min' depth='10.0 m' />
|
|
|
|
</divecomputer>
|
|
|
|
</dive>
|
|
|
|
<dive number='2' date='2013-02-24' time='10:26:04' duration='25:00 min'>
|
|
|
|
<location>SAC test dive 2</location>
|
|
|
|
<notes>SAC should be 20l/min (0.7063 cuft/min)
|
|
|
|
We have exactly 100 ATM of gas in a 10l cylinder, average 10m for 25min</notes>
|
2013-02-24 19:07:27 +00:00
|
|
|
<cylinder size='10.0 l' description='10l' start='202.6 bar' end='101.3 bar' />
|
Fix up SAC calculations for ATM/bar confusion
We even documented that we did SAC in bar*l/min, but the "S" in SAC
stands for "Surface". So we should normalize SAC rate to surface
pressure, not one bar.
It's a tiny 1% difference, and doesn't actually matter in practice, but
it's noticeable when you want to explicitly test for SAC-rate by
creating a test-dive that averages exactly 10m. Suddenly you don't get
the round numbers you expect.
[ Side note: 10m is not _exactly_ one extra atmosphere according to our
calculations, but it's darn close in sea water: the standard salinity
of 1.03 kg/l together with the standard acceleration of 9.81m/s^2
gives an additional pressure of 1.01 bar, which is within a fraction
of a percent of one ATM.
Of course, divers have likely chosen that value exactly for the math
to come out that way, since the true average salinity of seawater is
actually slightly lower ]
So here's a few test-dives, along with the SAC rate fixup to make them
look right.
(There's also a one-liner to dive.c that makes the duration come out
right if the last sample has a non-zero depth, and the previous sample
did not: one of my original test-dives did the "average 10m depth" by
starting at 0 and ending at 20m, and dive.c got a tiny bit confused
about that ;)
[ The rationale for me testing our SAC rate calculations in the first
place was that on snorkkeli.net user "Poltsi" reported that our SAC rate
calculations differ from the ones that Suunto DM4 reports. So I wanted
to verify that we did things right.
Note that Poltsi reported differences larger than the difference of
BAR/ATM, so this is not the cause. I'll continue to look at this. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24 18:01:18 +00:00
|
|
|
<divecomputer>
|
|
|
|
<depth max='20.0 m' mean='10.0 m' />
|
|
|
|
<sample time='0:00 min' depth='0.0 m' />
|
|
|
|
<sample time='12:30 min' depth='20.0 m' />
|
|
|
|
<sample time='25:00 min' depth='0.0 m' />
|
|
|
|
</divecomputer>
|
|
|
|
</dive>
|
|
|
|
<dive number='3' date='2013-02-24' time='11:26:04' duration='25:00 min'>
|
|
|
|
<location>SAC test dive 3</location>
|
|
|
|
<notes>SAC should be 20l/min (0.7063 cuft/min)
|
|
|
|
We have exactly 100 ATM of gas in 15l of cylinder, average 20m for 25min</notes>
|
2013-02-24 19:07:27 +00:00
|
|
|
<cylinder size='10.0 l' description='10l' start='202.6 bar' end='101.3 bar' />
|
|
|
|
<cylinder size='5.0 l' description='10l' start='202.6 bar' end='101.3 bar' />
|
Fix up SAC calculations for ATM/bar confusion
We even documented that we did SAC in bar*l/min, but the "S" in SAC
stands for "Surface". So we should normalize SAC rate to surface
pressure, not one bar.
It's a tiny 1% difference, and doesn't actually matter in practice, but
it's noticeable when you want to explicitly test for SAC-rate by
creating a test-dive that averages exactly 10m. Suddenly you don't get
the round numbers you expect.
[ Side note: 10m is not _exactly_ one extra atmosphere according to our
calculations, but it's darn close in sea water: the standard salinity
of 1.03 kg/l together with the standard acceleration of 9.81m/s^2
gives an additional pressure of 1.01 bar, which is within a fraction
of a percent of one ATM.
Of course, divers have likely chosen that value exactly for the math
to come out that way, since the true average salinity of seawater is
actually slightly lower ]
So here's a few test-dives, along with the SAC rate fixup to make them
look right.
(There's also a one-liner to dive.c that makes the duration come out
right if the last sample has a non-zero depth, and the previous sample
did not: one of my original test-dives did the "average 10m depth" by
starting at 0 and ending at 20m, and dive.c got a tiny bit confused
about that ;)
[ The rationale for me testing our SAC rate calculations in the first
place was that on snorkkeli.net user "Poltsi" reported that our SAC rate
calculations differ from the ones that Suunto DM4 reports. So I wanted
to verify that we did things right.
Note that Poltsi reported differences larger than the difference of
BAR/ATM, so this is not the cause. I'll continue to look at this. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24 18:01:18 +00:00
|
|
|
<divecomputer>
|
2013-02-24 19:07:27 +00:00
|
|
|
<depth max='40.0 m' mean='20.0 m' />
|
Fix up SAC calculations for ATM/bar confusion
We even documented that we did SAC in bar*l/min, but the "S" in SAC
stands for "Surface". So we should normalize SAC rate to surface
pressure, not one bar.
It's a tiny 1% difference, and doesn't actually matter in practice, but
it's noticeable when you want to explicitly test for SAC-rate by
creating a test-dive that averages exactly 10m. Suddenly you don't get
the round numbers you expect.
[ Side note: 10m is not _exactly_ one extra atmosphere according to our
calculations, but it's darn close in sea water: the standard salinity
of 1.03 kg/l together with the standard acceleration of 9.81m/s^2
gives an additional pressure of 1.01 bar, which is within a fraction
of a percent of one ATM.
Of course, divers have likely chosen that value exactly for the math
to come out that way, since the true average salinity of seawater is
actually slightly lower ]
So here's a few test-dives, along with the SAC rate fixup to make them
look right.
(There's also a one-liner to dive.c that makes the duration come out
right if the last sample has a non-zero depth, and the previous sample
did not: one of my original test-dives did the "average 10m depth" by
starting at 0 and ending at 20m, and dive.c got a tiny bit confused
about that ;)
[ The rationale for me testing our SAC rate calculations in the first
place was that on snorkkeli.net user "Poltsi" reported that our SAC rate
calculations differ from the ones that Suunto DM4 reports. So I wanted
to verify that we did things right.
Note that Poltsi reported differences larger than the difference of
BAR/ATM, so this is not the cause. I'll continue to look at this. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24 18:01:18 +00:00
|
|
|
<event time='17:00 min' name='gaschange' />
|
|
|
|
<sample time='0:00 min' depth='0.0 m' />
|
|
|
|
<sample time='5:00 min' depth='20.0 m' />
|
|
|
|
<sample time='10:00 min' depth='40.0 m' />
|
|
|
|
<sample time='15:00 min' depth='0.0 m' />
|
|
|
|
<sample time='20:00 min' depth='40.0 m' />
|
|
|
|
<sample time='25:00 min' depth='0.0 m' />
|
|
|
|
</divecomputer>
|
|
|
|
</dive>
|
2013-02-24 19:07:27 +00:00
|
|
|
<dive number='4' date='2013-02-24' time='12:26:04' duration='30:00 min'>
|
|
|
|
<location>SAC test dive 4</location>
|
2013-02-24 18:50:18 +00:00
|
|
|
<notes>SAC should be 20l/min (0.7063 cuft/min)
|
|
|
|
This adds a 5-minute surface time to the middle of the dive.
|
|
|
|
We have exactly 100 ATM of gas in 15l of cylinder, average 20m for 25min</notes>
|
2013-02-24 19:07:27 +00:00
|
|
|
<cylinder size='10.0 l' description='10l' start='202.6 bar' end='101.3 bar' />
|
|
|
|
<cylinder size='5.0 l' description='10l' start='202.6 bar' end='101.3 bar' />
|
2013-02-24 18:50:18 +00:00
|
|
|
<divecomputer>
|
2013-02-24 19:07:27 +00:00
|
|
|
<depth max='40.0 m' mean='16.666 m' />
|
2013-02-24 18:50:18 +00:00
|
|
|
<event time='22:00 min' name='gaschange' />
|
|
|
|
<sample time='0:00 min' depth='0.0 m' />
|
|
|
|
<sample time='5:00 min' depth='20.0 m' />
|
|
|
|
<sample time='10:00 min' depth='40.0 m' />
|
|
|
|
<sample time='15:00 min' depth='0.0 m' />
|
|
|
|
<sample time='20:00 min' depth='0.0 m' />
|
|
|
|
<sample time='25:00 min' depth='40.0 m' />
|
|
|
|
<sample time='30:00 min' depth='0.0 m' />
|
|
|
|
</divecomputer>
|
|
|
|
</dive>
|
2013-02-24 19:07:27 +00:00
|
|
|
<dive number='5' date='2013-02-24' time='13:26:04' duration='25:00 min'>
|
|
|
|
<location>SAC test dive 5</location>
|
|
|
|
<notes>SAC should be 20l/min (0.7063 cuft/min)
|
|
|
|
This verifies that it works without any sample data too.
|
|
|
|
We have exactly 100 ATM of gas in 15l of cylinder, average 20m for 25min</notes>
|
|
|
|
<cylinder size='10.0 l' description='10l' start='202.6 bar' end='101.3 bar' />
|
|
|
|
<divecomputer>
|
|
|
|
<depth max='13.5 m' mean='10.0 m' />
|
|
|
|
</divecomputer>
|
|
|
|
</dive>
|
Fix up SAC calculations for ATM/bar confusion
We even documented that we did SAC in bar*l/min, but the "S" in SAC
stands for "Surface". So we should normalize SAC rate to surface
pressure, not one bar.
It's a tiny 1% difference, and doesn't actually matter in practice, but
it's noticeable when you want to explicitly test for SAC-rate by
creating a test-dive that averages exactly 10m. Suddenly you don't get
the round numbers you expect.
[ Side note: 10m is not _exactly_ one extra atmosphere according to our
calculations, but it's darn close in sea water: the standard salinity
of 1.03 kg/l together with the standard acceleration of 9.81m/s^2
gives an additional pressure of 1.01 bar, which is within a fraction
of a percent of one ATM.
Of course, divers have likely chosen that value exactly for the math
to come out that way, since the true average salinity of seawater is
actually slightly lower ]
So here's a few test-dives, along with the SAC rate fixup to make them
look right.
(There's also a one-liner to dive.c that makes the duration come out
right if the last sample has a non-zero depth, and the previous sample
did not: one of my original test-dives did the "average 10m depth" by
starting at 0 and ending at 20m, and dive.c got a tiny bit confused
about that ;)
[ The rationale for me testing our SAC rate calculations in the first
place was that on snorkkeli.net user "Poltsi" reported that our SAC rate
calculations differ from the ones that Suunto DM4 reports. So I wanted
to verify that we did things right.
Note that Poltsi reported differences larger than the difference of
BAR/ATM, so this is not the cause. I'll continue to look at this. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24 18:01:18 +00:00
|
|
|
</dives>
|
|
|
|
</divelog>
|