mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	VPMB: Reset ceiling pressures at start of planned dive
We do not want to remember max_bottom_ceiling_pressure from the previous planned dive - it makes the Boyle's law compensation incorrect if the previous planned dive was a deeper deep-to-shallow multi-level dive. E.g. Plan these dives (without applying this patch) with VPM-B nominal conservatism: Plan 30 m for 20 min (total run time = 28 min) Now plan 100 m for 20 min, followed by 70 m @ 23 min and 70 m at 30 min Re-plan 30 m for 20 min (total run time = 50 min) With this change, the re-planned dive run time is 28 min, as it should be. We probably don't have to reset first_ceiling_pressure too, but it's cleaner if we do. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									28c1dc754d
								
							
						
					
					
						commit
						899427079e
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -992,6 +992,7 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
 | 
				
			||||||
		diveplan->surface_pressure = SURFACE_PRESSURE;
 | 
							diveplan->surface_pressure = SURFACE_PRESSURE;
 | 
				
			||||||
	displayed_dive.surface_pressure.mbar = diveplan->surface_pressure;
 | 
						displayed_dive.surface_pressure.mbar = diveplan->surface_pressure;
 | 
				
			||||||
	clear_deco(displayed_dive.surface_pressure.mbar / 1000.0);
 | 
						clear_deco(displayed_dive.surface_pressure.mbar / 1000.0);
 | 
				
			||||||
 | 
						max_bottom_ceiling_pressure.mbar = first_ceiling_pressure.mbar = 0;
 | 
				
			||||||
	create_dive_from_plan(diveplan, is_planner);
 | 
						create_dive_from_plan(diveplan, is_planner);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Do we want deco stop array in metres or feet?
 | 
						// Do we want deco stop array in metres or feet?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue