Skip to content

Commit

Permalink
Merge pull request #756 from PepperJo/showheightWGS84
Browse files Browse the repository at this point in the history
Website: Add height above ellipsoid
  • Loading branch information
cyoung authored May 15, 2020
2 parents 8859b26 + 5974fd2 commit cf28a07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/plates/gps.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@
</div>
<div class="row">
<span class="col-xs-6 text-center">{{gps_lat}}, {{gps_lon}} &plusmn; {{gps_horizontal_accuracy}} m <br>
{{gps_alt}} &plusmn; {{gps_vertical_accuracy}} ft @ {{gps_vert_speed}} ft/min</span>
<b>Altitude MSL:</b> <br>
{{gps_alt}} &plusmn; {{gps_vertical_accuracy}} ft @ {{gps_vert_speed}} ft/min <br>
<b>Height WGS-84 ellipsoid:</b> <br>
{{ gps_height_above_ellipsoid }} ft
</span>
<span class="col-xs-6 text-center">{{gps_track}}&deg; @ {{gps_speed}} KTS</span>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions web/plates/js/gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,15 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
$scope.gps_lat = situation.GPSLatitude.toFixed(5); // result is string
$scope.gps_lon = situation.GPSLongitude.toFixed(5); // result is string
$scope.gps_alt = situation.GPSAltitudeMSL.toFixed(1);
$scope.gps_height_above_ellipsoid = situation.GPSHeightAboveEllipsoid.toFixed(1);
$scope.gps_track = situation.GPSTrueCourse.toFixed(1);
$scope.gps_speed = situation.GPSGroundSpeed.toFixed(1);
$scope.gps_vert_speed = situation.GPSVerticalSpeed.toFixed(1);
if ($scope.gps_lat == 0 && $scope.gps_lon == 0) {
$scope.gps_lat = "--";
$scope.gps_lon = "--";
$scope.gps_alt = "--";
$scope.gps_height_above_ellipsoid = "--";
$scope.gps_track = "--";
$scope.gps_speed = "--";
$scope.gps_vert_speed = "--";
Expand Down

0 comments on commit cf28a07

Please sign in to comment.