kopia lustrzana https://github.com/projecthorus/chasemapper
Fixed to relative bearings
rodzic
4f1730078f
commit
fa7fdd3dc3
|
@ -96,12 +96,15 @@ class Bearings(object):
|
|||
'lat': position['lat'],
|
||||
'lon': position['lon'],
|
||||
'alt': position['alt'],
|
||||
'heading': position['heading'],
|
||||
'heading_valid': position['heading_valid'],
|
||||
'speed': position['speed'],
|
||||
'position_valid': True # Should we be taking this from upstream somewhere?
|
||||
}
|
||||
|
||||
# Only gate through the heading if it is valid.
|
||||
if position['heading_valid']:
|
||||
'heading': position['heading']
|
||||
|
||||
# Mark position as invalid if we have zero lat/lon values
|
||||
if (_car_pos['lat'] == 0.0) and (_car_pos['lon'] == 0.0):
|
||||
_car_pos['position_valid'] = False
|
||||
|
|
|
@ -103,7 +103,7 @@ def parse_config_file(filename):
|
|||
chase_config['max_bearing_age'] = config.getint('bearings', 'max_bearing_age')*60 # Convert to seconds
|
||||
if chase_config['max_bearing_age'] < 60:
|
||||
chase_config['max_bearing_age'] = 60 # Make sure this number is something sane, otherwise things will break
|
||||
chase_config['car_speed_gate'] = config.getfloat('bearings', 'car_speed_gate')*3.6 # Convert to m/s
|
||||
chase_config['car_speed_gate'] = config.getfloat('bearings', 'car_speed_gate')/3.6 # Convert to m/s
|
||||
chase_config['bearing_length'] = config.getfloat('bearings', 'bearing_length')
|
||||
chase_config['bearing_weight'] = config.getfloat('bearings', 'bearing_weight')
|
||||
chase_config['bearing_color'] = config.get('bearings', 'bearing_color')
|
||||
|
|
|
@ -108,7 +108,7 @@ function addBearing(timestamp, bearing, live){
|
|||
}
|
||||
|
||||
if (live == true){
|
||||
$("#bearing_table").tabulator("setData", [{id:1, bearing: bearing_store[timestamp].true_bearing.toFixed(0), confidence: bearing_store[timestamp].confidence.toFixed(0)}]);
|
||||
$("#bearing_table").tabulator("setData", [{id:1, bearing: bearing_store[timestamp].raw_bearing.toFixed(0), confidence: bearing_store[timestamp].confidence.toFixed(0)}]);
|
||||
$("#bearing_table").show();
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue