[QRA] Check length of the gridsquare isn't greater than 6 chars
This fixes #934 as Cloudlog bearings only works for squares that are less than 6 chars.
这个提交包含在:
父节点
e3ba7411aa
当前提交
4c9ba52a9b
共有 1 个文件被更改,包括 7 次插入 和 5 次删除
|
|
@ -23,6 +23,7 @@ class Qra {
|
|||
|
||||
// calculate the bearing between two squares
|
||||
function bearing($tx, $rx, $unit = 'M') {
|
||||
if(strlen($tx) <= 6 && strlen($rx) <= 6) {
|
||||
$my = qra2latlong($tx);
|
||||
$stn = qra2latlong($rx);
|
||||
|
||||
|
|
@ -30,6 +31,7 @@ class Qra {
|
|||
|
||||
return $bearing;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Function: calculate the distance between two gridsqaures
|
||||
|
|
|
|||
正在加载…
在新工单中引用