|
|
@ -98,8 +98,19 @@ |
|
|
|
this.PullGroundData = pullGroundData; |
|
|
|
var value = this.PullGroundData[this.PullGroundData.length - 1]; |
|
|
|
var time = moment(value[3], "YYYYMMDD_HHmmss"); |
|
|
|
$('#longitude').val(value[0]); |
|
|
|
$('#latitude').val(value[1]); |
|
|
|
var type = $('.type-select span.active').attr('type'); |
|
|
|
if (type === 'decimal') { |
|
|
|
$('#longitude').val(value[0]); |
|
|
|
$('#latitude').val(value[1]); |
|
|
|
} else { |
|
|
|
$('#lng-degree').val(this.getLngLatDecimal(value[0]).degree); |
|
|
|
$('#lng-minute').val(this.getLngLatDecimal(value[0]).minute); |
|
|
|
$('#lng-second').val(this.getLngLatDecimal(value[0]).second.toFixed(2)); |
|
|
|
$('#lat-degree').val(this.getLngLatDecimal(value[1]).degree); |
|
|
|
$('#lat-minute').val(this.getLngLatDecimal(value[1]).minute); |
|
|
|
$('#lat-second').val(this.getLngLatDecimal(value[1]).second.toFixed(2)); |
|
|
|
} |
|
|
|
|
|
|
|
$('#height').val(value[2]); |
|
|
|
$("#release-date").datetimebox('setValue', moment(time).format('YYYY/MM/DD HH:mm')); |
|
|
|
}.bind(this)); |
|
|
@ -273,7 +284,7 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
this.GetCalcPramas = function (taskId) { |
|
|
|
var attr = $('.type-select span.active').attr('type'); |
|
|
|
var type = $('.type-select span.active').attr('type'); |
|
|
|
var lngDegree = $('#lng-degree').val(); |
|
|
|
var lngMinute = $('#lng-minute').val(); |
|
|
|
var lngSecond = $('#lng-second').val(); |
|
|
@ -282,8 +293,8 @@ |
|
|
|
var latSecond = $('#lat-second').val(); |
|
|
|
|
|
|
|
return { |
|
|
|
lon: attr === 'decimal' ? $('#longitude').val() : this.getLngLat(lngDegree, lngMinute, lngSecond), |
|
|
|
lat: attr === 'decimal' ? $('#latitude').val() : this.getLngLat(latDegree, latMinute, latSecond), |
|
|
|
lon: type === 'decimal' ? $('#longitude').val() : this.getLngLatDegree(lngDegree, lngMinute, lngSecond), |
|
|
|
lat: type === 'decimal' ? $('#latitude').val() : this.getLngLatDegree(latDegree, latMinute, latSecond), |
|
|
|
num: taskId, |
|
|
|
hgt: $('#height').val(), |
|
|
|
rlen: $('#time-length-input').val(), |
|
|
@ -295,14 +306,33 @@ |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
this.getLngLat = function (degree, minute, second) { |
|
|
|
this.getLngLatDegree = function (degree, minute, second) { |
|
|
|
var str = parseFloat(minute) + parseFloat(second / 60); |
|
|
|
var value = parseFloat(str / 60) + parseFloat(degree); |
|
|
|
return value; |
|
|
|
}; |
|
|
|
|
|
|
|
this.getLngLatDecimal = function (value) { |
|
|
|
var text = value.split("."); |
|
|
|
var degree = text[0]; |
|
|
|
|
|
|
|
var temp = "0." + text[1]; |
|
|
|
var temp = String(temp * 60); |
|
|
|
var str = temp.split("."); |
|
|
|
var minute = str[0]; |
|
|
|
|
|
|
|
temp = "0." + str[1]; |
|
|
|
temp = temp * 60; |
|
|
|
var second = temp; |
|
|
|
return { |
|
|
|
degree: degree, |
|
|
|
minute: minute, |
|
|
|
second: second |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
this.GetTaskParams = function (taskId) { |
|
|
|
var attr = $('.type-select span.active').attr('type'); |
|
|
|
var type = $('.type-select span.active').attr('type'); |
|
|
|
var lngDegree = $('#lng-degree').val(); |
|
|
|
var lngMinute = $('#lng-minute').val(); |
|
|
|
var lngSecond = $('#lng-second').val(); |
|
|
@ -313,8 +343,8 @@ |
|
|
|
return { |
|
|
|
taskId: taskId, |
|
|
|
region: 'bj', |
|
|
|
longitude: attr === 'decimal' ? $('#longitude').val() : this.getLngLat(lngDegree, lngMinute, lngSecond), |
|
|
|
latitude: attr === 'decimal' ? $('#latitude').val() : this.getLngLat(latDegree, latMinute, latSecond), |
|
|
|
longitude: type === 'decimal' ? $('#longitude').val() : this.getLngLatDegree(lngDegree, lngMinute, lngSecond), |
|
|
|
latitude: type === 'decimal' ? $('#latitude').val() : this.getLngLatDegree(latDegree, latMinute, latSecond), |
|
|
|
height: $('#height').val(), |
|
|
|
simulatedDuration: $('#time-length-input').val(), |
|
|
|
simulatedInterval: $('#interval-length-input').val(), |
|
|
|