On Thu, May 29, 2014 at 6:53 PM, Dirk Hohndel <[email protected]> wrote: > On Thu, May 29, 2014 at 08:49:25PM +0200, Robert C. Helling wrote: >> >> On 29 May 2014, at 17:26, Dirk Hohndel <[email protected]> wrote: >> >> > I've been thinking about this... the planner could do a much better job >> > tracking tanks and gases. Right now this is a mess, left over from the old >> > planner code written for Subsurface 3. >> > >> > Instead of having create_dive_from_plan re-create the cylinders as it >> > parses the plan, it should use the cylinders that were added in the UI. >> > And then as it walks the plan, it should update the samples to include >> > cylinderpressure values for each segment, based on the SAC rate that was >> > set (and yes, this includes adding samples at time - 1 before every gas >> > switch. >> > >> > This requires a bit more tracking of data but at the same time should get >> > rid of quite a bit of awkward code that's there today and will give very >> > pleasing visualization of gas use during planning. If done right it will >> > even respond to changes to the cylinder type in the plan, etc. >> > >> > Robert, does that sound reasonable? >> > Is this something you'd like to tackle? Or should I add this to my TODO >> > list? >> >> indeed the problem is that the information is kept (at least in part) in >> several data structures (model (i.e. UI), struct dive, dive plan and in >> the deco part as well in a list of depth at which something happens). We >> should come up at least with a good decision which is the primary place >> that gets copied to the others. I have to admit I haven’t understood >> this model thing well enough to have an informed opinion if that is a >> good primary place as you seem to suggest. >> >> I am happy to look into that but it might take some time. So, if >> somebody else wants to look into that, great. If not, it’s one of the >> things on my todo list for the planner. > > Well, I took a first stab at moving the needle a bit. > Things are still way too convoluted. > But I think they are MUCH better. We no longer create gases / tanks in > multiple places. We no longer calculate gas consumption in multiple > places. We no longer have a bunch of "planner logic" in the Ui (well, > there's still SOME logic left there - I'll attack this next). > > One of the big steps forward is that now the profile while planning a dive > actually corresponds with the dive you are planning (I know, why is this > news? because until this patch it wasn't). Gas changes and accordingly the > ceilings should now be correct. > > I haven't had a chance to walk through all of Henrik's issues, but I think > this should address a couple of them as well.
Just got home to attack the planner and I read this, did I told you already today that I love you? :D > /D > _______________________________________________ > subsurface mailing list > [email protected] > http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface _______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
