AHRS full-screen mode added.

pull/578/head
Eric Westphal 2017-01-13 19:21:35 -05:00
rodzic 541ce527a9
commit ed49f2c270
4 zmienionych plików z 59 dodań i 41 usunięć

Wyświetl plik

@ -3,6 +3,7 @@
<p><strong>GPS</strong> shows position with estimated accuracy, ground track, ground speed, and geometric altitude. Location is displayed on a world map.</p>
<p><strong>Satellites</strong> shows the status of GNSS constellations, and lists all satellites that your receiver is tracking. Stratux uses Satellite Based Augmentation System (SBAS) and multi-GNSS solutions on supported receivers. GPS satellites are prefixed with "G", SBAS satellites such as WAAS or EGNOS are prefixed with "S", and Russian GLONASS satellites are prefixed with "R". A checkmark shows if each satellite is used in the current position solution. For each satellite, the elevation, azimuth, and signal strength are provided. A summary of total satellites is presented at the bottom of the table.</p>
<p><strong>AHRS</strong> reports heading, pressure altitude, pitch and roll, along with a graphical representation of movement. As of version v0.8, heading is derived from GPS track, and is provided in degrees true.</p>
<p>The AHRS graphical depiction is an artificial horizon with a heading readout at the bottom. The AHRS sensor orientation must be specified relative to the aircraft before use by pressing the "Calibrate AHRS Sensors" button in the "AHRS" section of the <strong>Settings</strong> page.</p>
<p>The AHRS graphical depiction is an artificial horizon with a heading readout at the bottom. The AHRS sensor orientation must be specified relative to the aircraft before use by pressing the "Calibrate AHRS Sensors" button in the "AHRS" section of the <strong>Settings</strong> page. This only has to be done once as long as the orientation of the AHRS sensor in the aircraft isn't changed.</p>
<p>For a fullscreen view of the attitude indicator, press the <strong>AHRS</strong> title; to see the GPS info again, press the <strong>AHRS</AHRS></strong> title again.</p>
<p class="text-warning">NOTE: This page is for reference only and must not be used for flight operations.</p>
</div>

Wyświetl plik

@ -1,5 +1,5 @@
<div class="col-sm-12">
<div class="col-sm-6">
<div class="col-sm-6 hider">
<div class="panel panel-default">
<div class="panel-heading"><span class="panel_label">GPS</span></div>
<div class="panel-body">
@ -18,13 +18,46 @@
<div class="row">
<strong class="col-xs-6 text-center">Location:</strong>
<strong class="col-xs-6 text-center">Track:</strong>
</div>
</div>
<div class="row">
<span class="col-xs-6 text-center">{{gps_lat}}, {{gps_lon}} &plusmn; {{gps_accuracy}} m <br> {{gps_alt}} &plusmn; {{gps_vert_accuracy}} ft @ {{gps_vert_speed}} ft/min</span>
<span class="col-xs-6 text-center">{{gps_track}}&deg; @ {{gps_speed}} KTS</span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading"><span ng-click="hideClick()" class="panel_label">AHRS</span></div>
<div class="panel-body">
<div class="row">
<span class="col-xs-12">
<div id="ahrs_display">
<object id="attitude_indicator" data="../img/ai.svg" type="image/svg+xml">
Your browser doesn't support svg.
</object>
</div>
</span>
</div>
<div class="separator"></div>
<div class="row">
<strong class="col-xs-3 text-center">Heading:</strong>
<strong class="col-xs-3 text-center">Pitch:</strong>
<strong class="col-xs-3 text-center">Roll:</strong>
<strong class="col-xs-3 text-center">P-Alt:</strong>
</div>
<div class="row">
<span class="col-xs-3 text-center">{{ahrs_heading}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_pitch}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_roll}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_alt}} ft</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="col-sm-6 hider">
<div class="panel panel-default">
<div class="panel-heading">
<span class="panel_label">Satellites</span>
@ -61,35 +94,6 @@
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading"><span class="panel_label">AHRS</span></div>
<div class="panel-body">
<div class="row">
<span class="col-xs-12">
<div id="ahrs_display">
<object id="attitude_indicator" data="../img/ai.svg" type="image/svg+xml">
Your browser doesn't support svg.
</object>
</div>
</span>
</div>
<div class="separator"></div>
<div class="row">
<strong class="col-xs-3 text-center">Heading:</strong>
<strong class="col-xs-3 text-center">Pitch:</strong>
<strong class="col-xs-3 text-center">Roll:</strong>
<strong class="col-xs-3 text-center">P-Alt:</strong>
</div>
<div class="row">
<span class="col-xs-3 text-center">{{ahrs_heading}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_pitch}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_roll}}&deg;</span>
<span class="col-xs-3 text-center">{{ahrs_alt}} ft</span>
</div>
</div>
</div>
</div>
</div>
<!--

Wyświetl plik

@ -56,7 +56,7 @@ ahrsRenderer.prototype = {
},
animate: function (t, pitch, roll, heading) {
var FPS = 80; // we assume we can maintain a certain frame rate
var FPS = 40; // we assume we can maintain a certain frame rate
var x_inc = ((pitch - this.pitch) / (FPS * t));
var y_inc = ((roll - this.roll) / (FPS * t));
if ((heading < this.heading) && (this.heading - heading) > 180) {

Wyświetl plik

@ -5,7 +5,8 @@ GPSCtrl.$inject = ['$rootScope', '$scope', '$state', '$http', '$interval']; // I
function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
$scope.$parent.helppage = 'plates/gps-help.html';
$scope.data_list = [];
$scope.isHidden = false;
var status = {};
var display_area_size = -1;
@ -16,7 +17,7 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
if (width !== display_area_size) {
display_area_size = width;
$scope.map_width = width;
$scope.map_height = width *0.5;
$scope.map_height = width;
}
return width;
}
@ -83,10 +84,10 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
$scope.gps_lat = status.Lat.toFixed(5); // result is string
$scope.gps_lon = status.Lng.toFixed(5); // result is string
$scope.gps_alt = Math.round(status.Alt);
$scope.gps_track = status.TrueCourse;
$scope.gps_speed = status.GroundSpeed;
$scope.gps_vert_speed = status.GPSVertVel.toFixed(1);
$scope.gps_alt = status.Alt.toFixed(1);
$scope.gps_track = status.TrueCourse.toFixed(1);
$scope.gps_speed = status.GroundSpeed.toFixed(1);
$scope.gps_vert_speed = status.GPSVertVel.toFixed(1);
// "LastGroundTrackTime":"0001-01-01T00:00:00Z"
@ -157,10 +158,10 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
}
var updateStatus = $interval(function () {
// refresh GPS/AHRS status once each 200 milliseconds (aka polling)
// refresh GPS/AHRS status once each 100 milliseconds (aka polling)
getStatus();
getSatellites();
}, (2 * 100), 0, false);
}, 100, 0, false);
$state.get('gps').onEnter = function () {
// everything gets handled correctly by the controller
@ -177,4 +178,16 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
ahrs.init();
ahrs.orientation(0, 0, 90);
$scope.hideClick = function() {
$scope.isHidden = !$scope.isHidden;
var disp = "block";
if ($scope.isHidden) {
disp = "none";
}
var hiders = document.querySelectorAll(".hider");
for (var i=0; i < hiders.length; i++) {
hiders[i].style.display = disp;
}
}
}