So I just pushed a commit that adds a TestPlan test. This one creates the plan we discussed here before and runs Bühlmann against it, both in imperial and in metric mode.
The test then makes sure we have the right gas switch depths (so the imperial test fails right now since we only change to oxygen at 10ft, not at 20ft as we should). The thing that bothers me is that the plan that I create with the test is different from the plan that Subsurface creates when I set up the same preferences, etc. I must be missing one (or more?) parameter that influences the plan, but even after staring at this for quite a while and trying to print out useful debugging information, I fail to see what triggers the difference. Granted, the differences are small, but the thing is, there shouldn't BE a difference. Here's what I get from the test: <dive date='1970-01-01' time='00:00:00' duration='105:00 min'> <cylinder o2='15.0%' he='45.0%' /> <cylinder o2='36.0%' /> <cylinder o2='100.0%' /> <divecomputer> <depth mean='30.716 m' /> <event time='35:09 min' type='11' value='36' name='gaschange' cylinder='1' o2='36.0%' /> <event time='69:21 min' type='11' value='100' name='gaschange' cylinder='2' o2='100.0%' /> <sample time='0:00 min' depth='0.0 m' /> <sample time='3:26 min' depth='79.0 m' /> <sample time='30:00 min' depth='79.0 m' /> <sample time='35:08 min' depth='33.0 m' /> <sample time='35:09 min' depth='33.0 m' /> <sample time='36:08 min' depth='33.0 m' /> <sample time='37:08 min' depth='24.0 m' /> <sample time='39:00 min' depth='24.0 m' /> <sample time='39:20 min' depth='21.0 m' /> <sample time='41:00 min' depth='21.0 m' /> <sample time='41:20 min' depth='18.0 m' /> <sample time='45:00 min' depth='18.0 m' /> <sample time='45:20 min' depth='15.0 m' /> <sample time='50:00 min' depth='15.0 m' /> <sample time='50:20 min' depth='12.0 m' /> <sample time='58:00 min' depth='12.0 m' /> <sample time='58:20 min' depth='9.0 m' /> <sample time='69:00 min' depth='9.0 m' /> <sample time='69:20 min' depth='6.0 m' /> <sample time='69:21 min' depth='6.0 m' /> <sample time='70:20 min' depth='6.0 m' /> <sample time='70:22 min' depth='6.0 m' /> <sample time='103:00 min' depth='6.0 m' /> <sample time='105:00 min' depth='0.0 m' /> </divecomputer> </dive> And this is from Subsurface. All preferences removed and then UI changed to match the data in the test: <dive number='1' date='2015-07-05' time='10:17:33' duration='108:00 min'> <cylinder o2='15.0%' he='45.0%' /> <cylinder o2='36.0%' /> <cylinder o2='100.0%' /> <divecomputer model='planned dive'> <depth max='79.0 m' mean='30.196 m' /> <event time='35:09 min' type='11' value='36' name='gaschange' cylinder='1' o2='36.0%' /> <event time='71:21 min' type='11' value='100' name='gaschange' cylinder='2' o2='100.0%' /> <sample time='0:00 min' depth='0.0 m' /> <sample time='3:26 min' depth='79.0 m' /> <sample time='30:00 min' depth='79.0 m' /> <sample time='35:08 min' depth='33.0 m' /> <sample time='35:09 min' depth='33.0 m' /> <sample time='36:08 min' depth='33.0 m' /> <sample time='37:08 min' depth='24.0 m' /> <sample time='39:00 min' depth='24.0 m' /> <sample time='39:20 min' depth='21.0 m' /> <sample time='42:00 min' depth='21.0 m' /> <---- first difference, one minute longer than in the test <sample time='42:20 min' depth='18.0 m' /> <sample time='46:00 min' depth='18.0 m' /> <sample time='46:20 min' depth='15.0 m' /> <sample time='51:00 min' depth='15.0 m' /> <sample time='51:20 min' depth='12.0 m' /> <sample time='59:00 min' depth='12.0 m' /> <sample time='59:20 min' depth='9.0 m' /> <sample time='71:00 min' depth='9.0 m' /> <---- second stop that's a minute longer <sample time='71:20 min' depth='6.0 m' /> <sample time='71:21 min' depth='6.0 m' /> <sample time='72:20 min' depth='6.0 m' /> <sample time='72:22 min' depth='6.0 m' /> <sample time='106:00 min' depth='6.0 m' /> <---- third one that's a minute longer <sample time='108:00 min' depth='0.0 m' /> </divecomputer> </dive> I pushed this as is, hoping that someone else will spot what I'm doing differently that causes that discrepancy. /D _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
