Skip to content

Commit

Permalink
Merge pull request #9 from phl0/fixQrbCalc
Browse files Browse the repository at this point in the history
Minor layout beauty :)
  • Loading branch information
AndreasK79 authored Feb 16, 2022
2 parents 4210a80 + e77675c commit d8efed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions application/controllers/Qrbcalc.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function calculate() {

$data['result'] = $this->qra->bearing($locator1, $locator2, $measurement_base);
$data['distance'] = $this->qra->distance($locator1, $locator2, $measurement_base) . $var_dist;
$data['bearing'] = $this->qra->get_bearing($locator1, $locator2) . "º ";
$data['bearing'] = $this->qra->get_bearing($locator1, $locator2) . "º";
$latlng1 = $this->qra->qra2latlong($locator1);
$latlng2 = $this->qra->qra2latlong($locator2);
$latlng1[0] = number_format((float)$latlng1[0], 3, '.', '');;
Expand All @@ -62,4 +62,4 @@ public function calculate() {
header('Content-Type: application/json');
echo json_encode($data);
}
}
}
4 changes: 2 additions & 2 deletions application/views/interface_assets/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ function calculateQrb(form) {
var result = "<h5>Negative latitudes are south of the equator, negative longitudes are west of Greenwich. <br/>";
result += ' ' + locator1.toUpperCase() + ' Latitude = ' + html['latlng1'][0] + ' Longitude = ' + html['latlng1'][1] + '<br/>';
result += ' ' + locator2.toUpperCase() + ' Latitude = ' + html['latlng2'][0] + ' Longitude = ' + html['latlng2'][1] + '<br/>';
result += 'Distance between ' + locator1.toUpperCase() + ' and ' + locator2.toUpperCase() + ' is ' + html['distance'] + '. and ';
result += 'the bearing is ' + html['bearing'] + '.</h5>';
result += 'Distance between ' + locator1.toUpperCase() + ' and ' + locator2.toUpperCase() + ' is ' + html['distance'] + '.<br />';
result += 'The bearing is ' + html['bearing'] + '.</h5>';

$(".qrbResult").html(result);
newpath(html['latlng1'], html['latlng2'], locator1, locator2);
Expand Down

0 comments on commit d8efed4

Please sign in to comment.