mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	VPM-B: Fix calculating Boyles compensation on gas change stops.
Previously we were calculating the compensation only on the deco stops, gas change stops appearing before the first deco stop were ommited. Signed-off-by: Jan Darowski <jan.darowski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									075221b4ef
								
							
						
					
					
						commit
						39794d3478
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -1168,6 +1168,11 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool | ||||||
| 				previous_point_time = clock; | 				previous_point_time = clock; | ||||||
| 				stopping = true; | 				stopping = true; | ||||||
| 
 | 
 | ||||||
|  | 				// Boyles Law compensation
 | ||||||
|  | 				if (first_stop_pressure == 0) | ||||||
|  | 					first_stop_pressure = depth_to_mbar(depth, &displayed_dive); | ||||||
|  | 				boyles_law(first_stop_pressure / 1000.0, depth_to_mbar(stoplevels[stopidx], &displayed_dive) / 1000.0); | ||||||
|  | 
 | ||||||
| 				/* Check we need to change cylinder.
 | 				/* Check we need to change cylinder.
 | ||||||
| 				 * We might not if the cylinder was chosen by the user | 				 * We might not if the cylinder was chosen by the user | ||||||
| 				 * or user has selected only to switch only at required stops. | 				 * or user has selected only to switch only at required stops. | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue