kopia lustrzana https://github.com/projecthorus/chasemapper
Hard code unit conversion constants
rodzic
264fd6502a
commit
feab5983af
|
@ -155,22 +155,8 @@ def parse_config_file(filename):
|
|||
# Unit Selection
|
||||
|
||||
chase_config['unitselection'] = config.get('units', 'unitselection', fallback='metric')
|
||||
chase_config['m_to_ft'] = config.get('units', 'm_to_ft', fallback = '3.28084')
|
||||
chase_config['km_to_miles'] = config.get('units', 'km_to_miles', fallback = '0.621371')
|
||||
chase_config['secs_to_mins'] = config.get('units', 'secs_to_mins', fallback = '0.016666')
|
||||
chase_config['ms_to_knots'] = config.get('units', 'ms_to_knots', fallback = '1.94384')
|
||||
chase_config['switch_miles_feet'] = config.get('units', 'switch_miles_feet', fallback = '400')
|
||||
|
||||
logging.info("Units: " + chase_config['unitselection'])
|
||||
logging.info("m_to_f: " + chase_config['m_to_ft'])
|
||||
logging.info("km_to_miles: " + chase_config['km_to_miles'])
|
||||
logging.info("secs_to_mins: " + chase_config['secs_to_mins'])
|
||||
logging.info("ms_to_knots: " + chase_config['ms_to_knots'])
|
||||
logging.info("switch_miles_feet: " + chase_config['switch_miles_feet'] + " metres")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for i in range(1,_profile_count+1):
|
||||
|
|
|
@ -221,14 +221,6 @@ bearing_custom_color = #FF0000
|
|||
unitselection = metric
|
||||
# unitselection = imperial1
|
||||
|
||||
|
||||
# Imperial conversion factors
|
||||
|
||||
m_to_ft = 3.28084
|
||||
km_to_miles = 0.621371
|
||||
secs_to_mins = 0.016666
|
||||
ms_to_knots = 1.94384
|
||||
|
||||
# Sensible choice of unit selection (all thresholds set in metric)
|
||||
|
||||
# This is the threshold for switching from miles to feet, set in meters.
|
||||
|
|
Ładowanie…
Reference in New Issue