[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.
这个提交包含在:
Peter Goodhall 2021-03-30 17:41:56 +01:00
父节点 e3ba7411aa
当前提交 4c9ba52a9b

查看文件

@ -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