Depth validation in planner
Robert C. Helling
helling at lmu.de
Wed Feb 13 02:56:39 PST 2013
On Wed, 13 Feb 2013, Sergey Starosek wrote:
> Hi,
> During testing I've accidentally entered depth of 1000m with 1min duration for the first segment. At this point application
> stops responding for a long time and consumes 100% CPU on one of the cores. Every focus change makes it even worse.
I think, it's calculating a very long deco. You can see it for a 400m
dive: For me it takes several seconds to come up with a plan to come out
of the water (which asks for about 3000 minutes of deco). So for your 1km
dive, we might have to wait longer than MAX_INT seconds.
I don't think this is a practical problem. But instead of polling the
tolerated depth in a loop one could compute the time on the stop (the
logarithm is your friend). Let's not do this in 3.0, but this should not
be too hard (a similar thing applies for the nofly time as I noted in an
earlier mail).
Maybe we should break out of the loop time_at_last_depth in planner.c if
the number of seconds is too big ("We dont do deco for longer than a
day!").
What worries me a bit more is that the plan that is shown in the notes is
cut off as it is longer than the buffer in planner.c (2000 bytes). Could
we extend this buffer size so we don't risk not showing a deco stop in a
plan? Does it hurt to increase this buffer size by say a factor of 10? I
mean, nobody is going to plan bounce dives to several hundret meters with
subsurface, but let's just make sure.
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
print "Just another Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
stupid .sig\n"; http://www.atdotde.de
More information about the subsurface
mailing list