diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php
index 3407248ef..2245a45e1 100644
--- a/application/views/view_log/qso.php
+++ b/application/views/view_log/qso.php
@@ -180,7 +180,19 @@
COL_VUCC_GRIDS != null) { ?>
| Gridsquare (Multi): |
- COL_VUCC_GRIDS; ?> |
+
+ COL_VUCC_GRIDS, ',')) {
+ echo "";
+ }
+ echo $row->COL_VUCC_GRIDS;
+ if (!str_contains($row->COL_VUCC_GRIDS, ',')) {
+ echo " ";
+ echo "";
+ }
+ echo " station_gridsquare."\',\'".$row->COL_VUCC_GRIDS.")'>";
+ ?>
+ |
qra->distance($row->station_gridsquare, $row->COL_VUCC_GRIDS, $measurement_base, $row->COL_ANT_PATH ?? null);
@@ -859,53 +871,63 @@
COL_GRIDSQUARE != null && strlen($row->COL_GRIDSQUARE) >= 4) {
- $stn_loc = $this->qra->qra2latlong(trim($row->COL_GRIDSQUARE));
- if($stn_loc[0] != 0) {
- $lat = $stn_loc[0];
- $lng = $stn_loc[1];
- }
- } elseif($row->COL_VUCC_GRIDS != null) {
- $grids = explode(",", $row->COL_VUCC_GRIDS);
- if (count($grids) == 2) {
- $grid1 = $this->qra->qra2latlong(trim($grids[0]));
- $grid2 = $this->qra->qra2latlong(trim($grids[1]));
+ if($row->COL_GRIDSQUARE != null && strlen($row->COL_GRIDSQUARE) >= 4) {
+ $stn_loc = $this->qra->qra2latlong(trim($row->COL_GRIDSQUARE));
+ if($stn_loc[0] != 0) {
+ $lat = $stn_loc[0];
+ $lng = $stn_loc[1];
+ }
+ } else if ($row->COL_VUCC_GRIDS != null) {
+ $grids = explode(",", $row->COL_VUCC_GRIDS);
+ if (count($grids) == 2) {
+ $grid1 = $this->qra->qra2latlong(trim($grids[0]));
+ $grid2 = $this->qra->qra2latlong(trim($grids[1]));
- $coords[]=array('lat' => $grid1[0],'lng'=> $grid1[1]);
- $coords[]=array('lat' => $grid2[0],'lng'=> $grid2[1]);
+ $coords[]=array('lat' => $grid1[0],'lng'=> $grid1[1]);
+ $coords[]=array('lat' => $grid2[0],'lng'=> $grid2[1]);
- $midpoint = $this->qra->get_midpoint($coords);
- $lat = $midpoint[0];
- $lng = $midpoint[1];
- }
- if (count($grids) == 4) {
- $grid1 = $this->qra->qra2latlong(trim($grids[0]));
- $grid2 = $this->qra->qra2latlong(trim($grids[1]));
- $grid3 = $this->qra->qra2latlong(trim($grids[2]));
- $grid4 = $this->qra->qra2latlong(trim($grids[3]));
+ $midpoint = $this->qra->get_midpoint($coords);
+ $lat = $midpoint[0];
+ $lng = $midpoint[1];
+ } else if (count($grids) == 4) {
+ $grid1 = $this->qra->qra2latlong(trim($grids[0]));
+ $grid2 = $this->qra->qra2latlong(trim($grids[1]));
+ $grid3 = $this->qra->qra2latlong(trim($grids[2]));
+ $grid4 = $this->qra->qra2latlong(trim($grids[3]));
- $coords[]=array('lat' => $grid1[0],'lng'=> $grid1[1]);
- $coords[]=array('lat' => $grid2[0],'lng'=> $grid2[1]);
- $coords[]=array('lat' => $grid3[0],'lng'=> $grid3[1]);
- $coords[]=array('lat' => $grid4[0],'lng'=> $grid4[1]);
+ $coords[]=array('lat' => $grid1[0],'lng'=> $grid1[1]);
+ $coords[]=array('lat' => $grid2[0],'lng'=> $grid2[1]);
+ $coords[]=array('lat' => $grid3[0],'lng'=> $grid3[1]);
+ $coords[]=array('lat' => $grid4[0],'lng'=> $grid4[1]);
- $midpoint = $this->qra->get_midpoint($coords);
- $lat = $midpoint[0];
- $lng = $midpoint[1];
- }
- } else {
- if(isset($row->lat)) {
- $lat = $row->lat;
- } else {
+ $midpoint = $this->qra->get_midpoint($coords);
+ $lat = $midpoint[0];
+ $lng = $midpoint[1];
+ } else {
+ if(isset($row->lat)) {
+ $lat = $row->lat;
+ } else {
$lat = 0;
- }
-
- if(isset($row->long)) {
- $lng = $row->long;
- } else {
+ }
+ if(isset($row->long)) {
+ $lng = $row->long;
+ } else {
$lng = 0;
- }
- }
+ }
+ }
+ } else {
+ if(isset($row->lat)) {
+ $lat = $row->lat;
+ } else {
+ $lat = 0;
+ }
+
+ if(isset($row->long)) {
+ $lng = $row->long;
+ } else {
+ $lng = 0;
+ }
+ }
?>