mirror of
				https://github.com/kemenril/iR-APRSISD.git
				synced 2025-03-05 20:51:35 -08:00 
			
		
		
		
	Adding fix for the negative altitude problem. Only tested in positive
altitudes, but doesn't seem to break anything else, and probably works.
This commit is contained in:
		
							parent
							
								
									299cea7aff
								
							
						
					
					
						commit
						ac181cff5f
					
				|  | @ -231,7 +231,7 @@ def parsePlacemark(Placemark): | ||||||
| 		#Altitude needs to be in feet above sea-level | 		#Altitude needs to be in feet above sea-level | ||||||
| 		# what we get instead is a string with a number of meters | 		# what we get instead is a string with a number of meters | ||||||
| 		# at the beginning. | 		# at the beginning. | ||||||
| 		elevation       = re.sub(r'^(\d+\.?\d+)\s*m.*',r'\1',extended['Elevation']) | 		elevation       = re.sub(r'^(-?\d+\.?\d+)\s*m.*',r'\1',extended['Elevation']) | ||||||
| 		elevation       = float(elevation) * 3.2808399 | 		elevation       = float(elevation) * 3.2808399 | ||||||
| 	if 'Velocity' in extended: | 	if 'Velocity' in extended: | ||||||
| 		#Velocity in knots, according to APRS. | 		#Velocity in knots, according to APRS. | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue