Update Distances_model : change "round" to "ceil"
I propose change "round" to "ceil" (Round fractions up). Because I work on an export plugin in EDI file (IARU REGTEST1), the rounding is systematically higher: "For the amateur bands up to 10 GHz inclusive, points will be scored on the basis of one point per kilometer, i.e. the calculated distance in kilometers will be truncated to an integer value and 1 km will be added. " (excerpt from VHF_Handbook_V9.01)
这个提交包含在:
父节点
6d0e86ce55
当前提交
07c710194e
共有 1 个文件被更改,包括 4 次插入 和 4 次删除
|
|
@ -256,13 +256,13 @@ class Distances_model extends CI_Model
|
|||
|
||||
switch ($measurement_base) {
|
||||
case 'M':
|
||||
return round(6371*$ca/1.609344);
|
||||
return ceil(6371*$ca/1.609344);
|
||||
case 'K':
|
||||
return round(6371*$ca);
|
||||
return ceil(6371*$ca);
|
||||
case 'N':
|
||||
return round(6371*$ca/1.852);
|
||||
return ceil(6371*$ca/1.852);
|
||||
default:
|
||||
return round(6371*$ca);
|
||||
return ceil(6371*$ca);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
正在加载…
在新工单中引用