kopia lustrzana https://github.com/projecthorus/chasemapper
Change imperial1 to imperial
rodzic
5fa599e0e2
commit
7561641615
|
@ -216,10 +216,10 @@ bearing_custom_color = #FF0000
|
||||||
|
|
||||||
[units]
|
[units]
|
||||||
|
|
||||||
# unitselection allows choice of metric - the default or imperial1 - horizontal miles and feet for short distances, horizontal miles per hour, vertical feet, vertical feet per minute
|
# unitselection allows choice of metric - the default or imperial - horizontal miles and feet for short distances, horizontal miles per hour, vertical feet, vertical feet per minute
|
||||||
|
|
||||||
unitselection = metric
|
unitselection = metric
|
||||||
# unitselection = imperial1
|
#unitselection = imperial
|
||||||
|
|
||||||
# Sensible choice of unit selection (all thresholds set in metric)
|
# Sensible choice of unit selection (all thresholds set in metric)
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ function add_new_balloon(data){
|
||||||
|
|
||||||
function updateSummaryDisplay(){
|
function updateSummaryDisplay(){
|
||||||
|
|
||||||
if (chase_config['unitselection'] == "imperial1") {updateSummaryDisplayImperial1() ; return ; } // else do everything in metric
|
if (chase_config['unitselection'] == "imperial") {updateSummaryDisplayImperial() ; return ; } // else do everything in metric
|
||||||
// Update the 'Payload Summary' display.
|
// Update the 'Payload Summary' display.
|
||||||
var _summary_update = {id:1};
|
var _summary_update = {id:1};
|
||||||
// See if there is any payload data.
|
// See if there is any payload data.
|
||||||
|
@ -153,7 +153,7 @@ function updateSummaryDisplay(){
|
||||||
$("#summary_table").tabulator("redraw", true);
|
$("#summary_table").tabulator("redraw", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function updateSummaryDisplayImperial1(){
|
function updateSummaryDisplayImperial(){
|
||||||
|
|
||||||
// Update the 'Payload Summary' display.
|
// Update the 'Payload Summary' display.
|
||||||
var _summary_update = {id:1};
|
var _summary_update = {id:1};
|
||||||
|
@ -228,7 +228,7 @@ function handleTelemetry(data){
|
||||||
|
|
||||||
// Update Chase Car Speed
|
// Update Chase Car Speed
|
||||||
if (document.getElementById("showCarSpeed").checked){
|
if (document.getElementById("showCarSpeed").checked){
|
||||||
if (chase_config['unitselection'] == "imperial1") {
|
if (chase_config['unitselection'] == "imperial") {
|
||||||
$("#chase_car_speed").text( (chase_car_position.speed*3.6*0.621371).toFixed(0) + " mph");
|
$("#chase_car_speed").text( (chase_car_position.speed*3.6*0.621371).toFixed(0) + " mph");
|
||||||
} else {
|
} else {
|
||||||
$("#chase_car_speed").text( (chase_car_position.speed*3.6).toFixed(0) + " kph");
|
$("#chase_car_speed").text( (chase_car_position.speed*3.6).toFixed(0) + " kph");
|
||||||
|
|
|
@ -156,7 +156,7 @@ function telemetryTableDialog(e, row){
|
||||||
// Initialise tables
|
// Initialise tables
|
||||||
function initTables(){
|
function initTables(){
|
||||||
// Telemetry data table
|
// Telemetry data table
|
||||||
if (chase_config['unitselection'] == "imperial1") {initTablesImperial1() ; return ; } // else do everything in metric
|
if (chase_config['unitselection'] == "imperial") {initTablesImperial() ; return ; } // else do everything in metric
|
||||||
$("#telem_table").tabulator({
|
$("#telem_table").tabulator({
|
||||||
layout:"fitData",
|
layout:"fitData",
|
||||||
layoutColumnsOnNewData:true,
|
layoutColumnsOnNewData:true,
|
||||||
|
@ -212,8 +212,8 @@ function initTables(){
|
||||||
$("#bearing_table").hide();
|
$("#bearing_table").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialise tables in Imperial1 - Vertical velocity feet/min, Horizontal velocity Miles/hr, Range Miles then feet for Range < config setting
|
// Initialise tables in Imperial - Vertical velocity feet/min, Horizontal velocity Miles/hr, Range Miles then feet for Range < config setting
|
||||||
function initTablesImperial1(){
|
function initTablesImperial(){
|
||||||
// Telemetry data table
|
// Telemetry data table
|
||||||
$("#telem_table").tabulator({
|
$("#telem_table").tabulator({
|
||||||
layout:"fitData",
|
layout:"fitData",
|
||||||
|
@ -273,7 +273,7 @@ function initTablesImperial1(){
|
||||||
|
|
||||||
function updateTelemetryTable(){
|
function updateTelemetryTable(){
|
||||||
var telem_data = [];
|
var telem_data = [];
|
||||||
if (chase_config['unitselection'] == "imperial1") {updateTelemetryTableImperial1() ; return ; } // else do everything in metric
|
if (chase_config['unitselection'] == "imperial") {updateTelemetryTableImperial() ; return ; } // else do everything in metric
|
||||||
if (jQuery.isEmptyObject(balloon_positions)){
|
if (jQuery.isEmptyObject(balloon_positions)){
|
||||||
telem_data = [{callsign:'None'}];
|
telem_data = [{callsign:'None'}];
|
||||||
}else{
|
}else{
|
||||||
|
@ -313,7 +313,7 @@ function updateTelemetryTable(){
|
||||||
$("#telem_table").tabulator("setData", telem_data);
|
$("#telem_table").tabulator("setData", telem_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTelemetryTableImperial1(){
|
function updateTelemetryTableImperial(){
|
||||||
var telem_data = [];
|
var telem_data = [];
|
||||||
if (jQuery.isEmptyObject(balloon_positions)){
|
if (jQuery.isEmptyObject(balloon_positions)){
|
||||||
telem_data = [{callsign:'None'}];
|
telem_data = [{callsign:'None'}];
|
||||||
|
|
|
@ -259,7 +259,7 @@
|
||||||
map.addControl(new L.Control.Layers(map_layers));
|
map.addControl(new L.Control.Layers(map_layers));
|
||||||
|
|
||||||
// Add map scale.
|
// Add map scale.
|
||||||
if (chase_config['unitselection'] == "imperial1") { L.control.scale({imperial: true, metric: false}).addTo(map) ;}
|
if (chase_config['unitselection'] == "imperial") { L.control.scale({imperial: true, metric: false}).addTo(map) ;}
|
||||||
if (chase_config['unitselection'] == "metric") { L.control.scale({imperial: false, metric: true}).addTo(map) ;}
|
if (chase_config['unitselection'] == "metric") { L.control.scale({imperial: false, metric: true}).addTo(map) ;}
|
||||||
|
|
||||||
// Add sidebar to map (where all of our controls are!)
|
// Add sidebar to map (where all of our controls are!)
|
||||||
|
|
Ładowanie…
Reference in New Issue