mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merged in Oblivium/librepilot/LP-536_GNSS_improvements (pull request #444)
LP-536 GNSS improvements Approved-by: Lalanne Laurent <f5soh@free.fr> Approved-by: Brian Webb <webbbn@gmail.com> Approved-by: Alessio Morale <alessiomorale@gmail.com> Approved-by: Philippe Renon <philippe_renon@yahoo.fr> Approved-by: Jan NIJS <dr.oblivium@gmail.com>
This commit is contained in:
commit
56661850ab
@ -105,30 +105,52 @@ void updateGpsSettings(__attribute__((unused)) UAVObjEvent *ev);
|
||||
// the new location with Set = true.
|
||||
#define GPS_HOMELOCATION_SET_DELAY 5000
|
||||
|
||||
#define GPS_LOOP_DELAY_MS 6
|
||||
// PIOS serial port receive buffer for GPS is set to 32 bytes for the minimal and 128 bytes for the full version.
|
||||
// GPS_READ_BUFFER is defined a few lines below in this file.
|
||||
//
|
||||
// 57600 bps = 5760 bytes per second
|
||||
//
|
||||
// For 32 bytes buffer: this is a maximum of 5760/32 = 180 buffers per second
|
||||
// that is 1/180 = 0.0056 seconds per packet
|
||||
// We must never wait more than 5ms since packet was last drained or it may overflow
|
||||
//
|
||||
// For 128 bytes buffer: this is a maximum of 5760/128 = 45 buffers per second
|
||||
// that is 1/45 = 0.022 seconds per packet
|
||||
// We must never wait more than 22ms since packet was last drained or it may overflow
|
||||
|
||||
// There are two delays in play for the GPS task:
|
||||
// - GPS_BLOCK_ON_NO_DATA_MS is the time to block while waiting to receive serial data from the GPS
|
||||
// - GPS_LOOP_DELAY_MS is used for a context switch initiated by calling vTaskDelayUntil() to let other tasks run
|
||||
//
|
||||
// The delayMs time is not that critical. It should not be too high so that maintenance actions within this task
|
||||
// are run often enough.
|
||||
// GPS_LOOP_DELAY_MS on the other hand, should be less then 5.55 ms. A value set too high will cause data to be dropped.
|
||||
|
||||
#define GPS_LOOP_DELAY_MS 5
|
||||
#define GPS_BLOCK_ON_NO_DATA_MS 20
|
||||
|
||||
#ifdef PIOS_GPS_SETS_HOMELOCATION
|
||||
// Unfortunately need a good size stack for the WMM calculation
|
||||
#define STACK_SIZE_BYTES 1024
|
||||
#define STACK_SIZE_BYTES 1024
|
||||
#else
|
||||
#if defined(PIOS_GPS_MINIMAL)
|
||||
#define GPS_READ_BUFFER 32
|
||||
#define GPS_READ_BUFFER 32
|
||||
|
||||
#ifdef PIOS_INCLUDE_GPS_NMEA_PARSER
|
||||
#define STACK_SIZE_BYTES 580 // NMEA
|
||||
#else
|
||||
#define STACK_SIZE_BYTES 440 // UBX
|
||||
#define STACK_SIZE_BYTES 580 // NMEA
|
||||
#else // PIOS_INCLUDE_GPS_NMEA_PARSER
|
||||
#define STACK_SIZE_BYTES 440 // UBX
|
||||
#endif // PIOS_INCLUDE_GPS_NMEA_PARSER
|
||||
#else
|
||||
#define STACK_SIZE_BYTES 650
|
||||
#else // PIOS_GPS_MINIMAL
|
||||
#define STACK_SIZE_BYTES 650
|
||||
#endif // PIOS_GPS_MINIMAL
|
||||
#endif // PIOS_GPS_SETS_HOMELOCATION
|
||||
|
||||
#ifndef GPS_READ_BUFFER
|
||||
#define GPS_READ_BUFFER 128
|
||||
#define GPS_READ_BUFFER 128
|
||||
#endif
|
||||
|
||||
#define TASK_PRIORITY (tskIDLE_PRIORITY + 1)
|
||||
#define TASK_PRIORITY (tskIDLE_PRIORITY + 1)
|
||||
|
||||
// ****************
|
||||
// Private variables
|
||||
@ -284,14 +306,7 @@ MODULE_INITCALL(GPSInitialize, GPSStart);
|
||||
|
||||
static void gpsTask(__attribute__((unused)) void *parameters)
|
||||
{
|
||||
// 57600 baud = 5760 bytes per second
|
||||
// PIOS serial buffers appear to be 32 bytes long
|
||||
// that is a maximum of 5760/32 = 180 buffers per second
|
||||
// that is 1/180 = 0.005555556 seconds per packet
|
||||
// we must never wait more than 5ms since packet was last drained or it may overflow
|
||||
// 100ms is way slow too, considering we do everything possible to make the sensor data as contemporary as possible
|
||||
portTickType xDelay = 5 / portTICK_RATE_MS;
|
||||
uint32_t timeNowMs = xTaskGetTickCount() * portTICK_RATE_MS;
|
||||
uint32_t timeNowMs = xTaskGetTickCount() * portTICK_RATE_MS;
|
||||
|
||||
#ifdef PIOS_GPS_SETS_HOMELOCATION
|
||||
portTickType homelocationSetDelay = 0;
|
||||
@ -353,8 +368,8 @@ static void gpsTask(__attribute__((unused)) void *parameters)
|
||||
|
||||
uint16_t cnt;
|
||||
int res;
|
||||
// This blocks the task until there is something on the buffer (or 100ms? passes)
|
||||
cnt = PIOS_COM_ReceiveBuffer(gpsPort, c, GPS_READ_BUFFER, xDelay);
|
||||
// This blocks the task until there is something in the buffer (or GPS_BLOCK_ON_NO_DATA_MS passes)
|
||||
cnt = PIOS_COM_ReceiveBuffer(gpsPort, c, GPS_READ_BUFFER, GPS_BLOCK_ON_NO_DATA_MS);
|
||||
res = PARSER_INCOMPLETE;
|
||||
if (cnt > 0) {
|
||||
PERF_TIMED_SECTION_START(counterParse);
|
||||
@ -416,7 +431,7 @@ static void gpsTask(__attribute__((unused)) void *parameters)
|
||||
//
|
||||
// if (the fix is good) {
|
||||
if ((gpspositionsensor.PDOP < gpsSettings.MaxPDOP) && (gpspositionsensor.Satellites >= gpsSettings.MinSatellites) &&
|
||||
(gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
|
||||
((gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) || (gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS)) &&
|
||||
(gpspositionsensor.Latitude != 0 || gpspositionsensor.Longitude != 0)) {
|
||||
AlarmsClear(SYSTEMALARMS_ALARM_GPS);
|
||||
#ifdef PIOS_GPS_SETS_HOMELOCATION
|
||||
@ -436,7 +451,7 @@ static void gpsTask(__attribute__((unused)) void *parameters)
|
||||
}
|
||||
#endif
|
||||
// else if (we are at least getting what might be usable GPS data to finish a flight with) {
|
||||
} else if ((gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
|
||||
} else if (((gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) || (gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS)) &&
|
||||
(gpspositionsensor.Latitude != 0 || gpspositionsensor.Longitude != 0)) {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_GPS, SYSTEMALARMS_ALARM_WARNING);
|
||||
// else data is probably not good enough to fly
|
||||
|
@ -173,8 +173,35 @@ int parse_ubx_stream(uint8_t *rx, uint16_t len, char *gps_rx_buffer, GPSPosition
|
||||
#if defined(PIOS_GPS_MINIMAL)
|
||||
restart_state = RESTART_NO_ERROR;
|
||||
#else
|
||||
restart_state = RESTART_WITH_ERROR;
|
||||
/* UBX-NAV-SVINFO (id 30) and UBX-NAV-SAT (id 35) packets are NOT critical to the navigation.
|
||||
Their only use is to update the nice GPS constellation widget in the GCS.
|
||||
These packets become very large when a lot of SV (Space Vehicles) are tracked. (8 + 12 * <number of SV>) bytes
|
||||
|
||||
In the case of 3 simultaneously enabled GNSS, it is easy to reach the currently defined tracking limit of 32 SV.
|
||||
The memory taken up by this is 8 + 12 * 32 = 392 bytes
|
||||
|
||||
The NEO-M8N has been seen to send out information for more than 32 SV. This causes overflow errors.
|
||||
We will ignore these informational packets if they become too large.
|
||||
The downside of this is no more constellation updates in the GCS when we reach the limit.
|
||||
|
||||
An alternative fix could be to increment the maximum number of satellites: MAX_SVS and UBX_CFG_GNSS_NUMCH_VER8 in UBX.h
|
||||
This would use extra memory for little gain. Both fixes can be combined.
|
||||
|
||||
Tests indicate that, once we reach this amount of tracked SV, the NEO-M8N module positioning output
|
||||
becomes jittery (in time) and therefore less accurate.
|
||||
|
||||
The recommendation is to limit the maximum number of simultaneously used GNSS to a value of 2.
|
||||
This will help keep the number of tracked satellites in line.
|
||||
*/
|
||||
if ((ubx->header.class == 0x01) && ((ubx->header.id == 0x30) || (ubx->header.id == 0x35))) {
|
||||
restart_state = RESTART_NO_ERROR;
|
||||
} else {
|
||||
restart_state = RESTART_WITH_ERROR;
|
||||
}
|
||||
#endif
|
||||
// We won't see the end of the packet. Which means it is useless to do any further processing.
|
||||
// Therefore scan for the start of the next packet.
|
||||
proto_state = START;
|
||||
break;
|
||||
} else {
|
||||
if (ubx->header.len == 0) {
|
||||
@ -337,7 +364,7 @@ static void parse_ubx_nav_sol(struct UBXPacket *ubx, GPSPositionSensorData *GpsP
|
||||
GpsPosition->Status = GPSPOSITIONSENSOR_STATUS_FIX2D;
|
||||
break;
|
||||
case STATUS_GPSFIX_3DFIX:
|
||||
GpsPosition->Status = GPSPOSITIONSENSOR_STATUS_FIX3D;
|
||||
GpsPosition->Status = (sol->flags & STATUS_FLAGS_DIFFSOLN) ? GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS : GPSPOSITIONSENSOR_STATUS_FIX3D;
|
||||
break;
|
||||
default: GpsPosition->Status = GPSPOSITIONSENSOR_STATUS_NOFIX;
|
||||
}
|
||||
@ -399,10 +426,18 @@ static void parse_ubx_nav_pvt(struct UBXPacket *ubx, GPSPositionSensorData *GpsP
|
||||
GpsPosition->Longitude = pvt->lon;
|
||||
GpsPosition->Satellites = pvt->numSV;
|
||||
GpsPosition->PDOP = pvt->pDOP * 0.01f;
|
||||
|
||||
if (pvt->flags & PVT_FLAGS_GNSSFIX_OK) {
|
||||
GpsPosition->Status = pvt->fixType == PVT_FIX_TYPE_3D ?
|
||||
GPSPOSITIONSENSOR_STATUS_FIX3D : GPSPOSITIONSENSOR_STATUS_FIX2D;
|
||||
} else {
|
||||
switch (pvt->fixType) {
|
||||
case PVT_FIX_TYPE_2D:
|
||||
GpsPosition->Status = GPSPOSITIONSENSOR_STATUS_FIX2D;
|
||||
break;
|
||||
case PVT_FIX_TYPE_3D:
|
||||
GpsPosition->Status = (pvt->flags & PVT_FLAGS_DIFFSOLN) ? GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS : GPSPOSITIONSENSOR_STATUS_FIX3D;
|
||||
break;
|
||||
default: GpsPosition->Status = GPSPOSITIONSENSOR_STATUS_NOFIX;
|
||||
}
|
||||
} else { // fix is not valid so we make sure to treat is as NOFIX
|
||||
GpsPosition->Status = GPSPOSITIONSENSOR_STATUS_NOFIX;
|
||||
}
|
||||
|
||||
|
@ -450,7 +450,7 @@ static void Run(void)
|
||||
// positionData.Status, positionData.Satellites, (uint32_t)positionData.Altitude);
|
||||
|
||||
// GPS Status
|
||||
if (positionData.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) {
|
||||
if ((positionData.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) || (positionData.Status == GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS)) {
|
||||
msg[OSDMSG_GPS_STAT] = OSDMSG_GPS_STAT_FIX;
|
||||
} else {
|
||||
msg[OSDMSG_GPS_STAT] = OSDMSG_GPS_STAT_NOFIX;
|
||||
|
@ -104,7 +104,7 @@ static filterResult filter(__attribute__((unused)) stateFilter *self, stateEstim
|
||||
|
||||
// check if we have a valid GPS signal (not checked by StateEstimation istelf)
|
||||
if ((gpsdata.PDOP < this->settings.MaxPDOP) && (gpsdata.Satellites >= this->settings.MinSatellites) &&
|
||||
(gpsdata.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
|
||||
((gpsdata.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) || (gpsdata.Status == GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS)) &&
|
||||
(gpsdata.Latitude != 0 || gpsdata.Longitude != 0)) {
|
||||
int32_t LLAi[3] = {
|
||||
gpsdata.Latitude,
|
||||
|
@ -382,6 +382,7 @@ static void uavoFrSKYSensorHubBridgeTask(__attribute__((unused)) void *parameter
|
||||
status = 300;
|
||||
break;
|
||||
case GPSPOSITIONSENSOR_STATUS_FIX3D:
|
||||
case GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS:
|
||||
if (hl_set == HOMELOCATION_SET_TRUE) {
|
||||
status = 500;
|
||||
} else {
|
||||
@ -419,7 +420,8 @@ static void uavoFrSKYSensorHubBridgeTask(__attribute__((unused)) void *parameter
|
||||
msg_length += frsky_pack_temperature_02((vdop * 256 + hdop), shub_global->serial_buf + msg_length);
|
||||
|
||||
if (gpsPosData.Status == GPSPOSITIONSENSOR_STATUS_FIX2D ||
|
||||
gpsPosData.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) {
|
||||
gpsPosData.Status == GPSPOSITIONSENSOR_STATUS_FIX3D ||
|
||||
gpsPosData.Status == GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS) {
|
||||
msg_length += frsky_pack_gps(
|
||||
gpsPosData.Heading,
|
||||
gpsPosData.Latitude,
|
||||
|
@ -357,6 +357,7 @@ uint16_t build_GPS_message(struct hott_gps_message *msg)
|
||||
msg->gps_fix_char = '2';
|
||||
break;
|
||||
case GPSPOSITIONSENSOR_STATUS_FIX3D:
|
||||
case GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS:
|
||||
msg->gps_fix_char = '3';
|
||||
break;
|
||||
default:
|
||||
|
@ -320,6 +320,7 @@ static void mavlink_send_position()
|
||||
gps_fix_type = 2;
|
||||
break;
|
||||
case GPSPOSITIONSENSOR_STATUS_FIX3D:
|
||||
case GPSPOSITIONSENSOR_STATUS_FIX3DDGNSS:
|
||||
gps_fix_type = 3;
|
||||
break;
|
||||
}
|
||||
|
162
ground/gcs/src/plugins/gpsdisplay/flatearthwidget.cpp
Normal file
162
ground/gcs/src/plugins/gpsdisplay/flatearthwidget.cpp
Normal file
@ -0,0 +1,162 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file flatearthwidget.cpp
|
||||
* @author The LibrePilot Team, http://www.librepilot.org Copyright (C) 2017.
|
||||
* Edouard Lafargue Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup FlatEarthWidget FlatEarth Widget Plugin
|
||||
* @{
|
||||
* @brief A widget for visualizing a location on a flat map of the world.
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "flatearthwidget.h"
|
||||
#include <QtSvg/QSvgRenderer>
|
||||
#include <QtSvg/QGraphicsSvgItem>
|
||||
#include <math.h> /* fabs */
|
||||
|
||||
#define MARKER_SIZE 40.0
|
||||
|
||||
FlatEarthWidget::FlatEarthWidget(QWidget *parent) : QGraphicsView(parent)
|
||||
{
|
||||
// Disable scrollbars to prevent an "always updated loop"
|
||||
this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
// Show the whole world by default
|
||||
zoomedin = false;
|
||||
|
||||
// Set initial location
|
||||
oldLat = oldLon = 0;
|
||||
|
||||
// Draw the earth
|
||||
earthScene = new QGraphicsScene(this);
|
||||
QPixmap earthpix(":/gpsgadget/images/flatEarth.jpg");
|
||||
earthPixmapItem = earthScene->addPixmap(earthpix);
|
||||
this->setScene(earthScene);
|
||||
|
||||
// Draw the marker
|
||||
marker = new QGraphicsSvgItem();
|
||||
QSvgRenderer *renderer = new QSvgRenderer();
|
||||
renderer->load(QString(":/gpsgadget/images/marker.svg"));
|
||||
marker->setSharedRenderer(renderer);
|
||||
earthScene->addItem(marker);
|
||||
}
|
||||
|
||||
FlatEarthWidget::~FlatEarthWidget()
|
||||
{
|
||||
delete earthScene;
|
||||
earthScene = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Refresh the map on first showing
|
||||
*/
|
||||
void FlatEarthWidget::showEvent(QShowEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
||||
refreshMap();
|
||||
}
|
||||
|
||||
/*
|
||||
* Refresh the map while resizing the widget
|
||||
*/
|
||||
void FlatEarthWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
||||
refreshMap();
|
||||
}
|
||||
|
||||
/*
|
||||
* Toggle zoom state on mouse click event
|
||||
*/
|
||||
void FlatEarthWidget::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
||||
// toggle zoom state and refresh the map
|
||||
zoomedin = !zoomedin;
|
||||
refreshMap();
|
||||
}
|
||||
|
||||
/*
|
||||
* Update the position of the marker on the map
|
||||
*/
|
||||
void FlatEarthWidget::setPosition(double lat, double lon, bool forceUpdate)
|
||||
{
|
||||
/* Only perform this expensive graphics operation if the position has changed enough
|
||||
to be visible on the map. Or if an update is requested by force.
|
||||
*/
|
||||
if (fabs(oldLat - lat) > 0.1 || fabs(oldLon - lon) > 0.1 || forceUpdate) {
|
||||
double wscale = this->sceneRect().width() / 360;
|
||||
double hscale = this->sceneRect().height() / 180;
|
||||
QPointF opd = QPointF((lon + 180) * wscale - marker->boundingRect().width() * marker->scale() / 2,
|
||||
(90 - lat) * hscale - marker->boundingRect().height() * marker->scale() / 2);
|
||||
marker->setTransform(QTransform::fromTranslate(opd.x(), opd.y()), false);
|
||||
|
||||
// Center the map on the uav position
|
||||
if (zoomedin) {
|
||||
this->centerOn(marker);
|
||||
}
|
||||
}
|
||||
oldLat = lat;
|
||||
oldLon = lon;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update the scale of the map
|
||||
*/
|
||||
void FlatEarthWidget::refreshMap(void)
|
||||
{
|
||||
double markerScale;
|
||||
|
||||
if (zoomedin) {
|
||||
// Hide the marker
|
||||
marker->setVisible(false);
|
||||
|
||||
// Zoom the map to it's native resolution
|
||||
this->resetTransform();
|
||||
|
||||
// Center the map on the uav position
|
||||
this->centerOn(marker);
|
||||
|
||||
// Rescale the marker dimensions to keep the same appearance in both zoom levels
|
||||
markerScale = MARKER_SIZE / 100.0 * (double)this->rect().width() / (double)(earthPixmapItem->boundingRect().width());
|
||||
marker->setScale(markerScale);
|
||||
|
||||
// Show the marker again
|
||||
marker->setVisible(true);
|
||||
} else {
|
||||
// Hide the marker
|
||||
marker->setVisible(false);
|
||||
|
||||
// Fit the whole world
|
||||
this->fitInView(earthPixmapItem, Qt::KeepAspectRatio);
|
||||
|
||||
// Rescale the marker dimensions to keep the same appearance in both zoom levels
|
||||
markerScale = MARKER_SIZE / 100.0;
|
||||
marker->setScale(markerScale);
|
||||
|
||||
// Show the marker again
|
||||
marker->setVisible(true);
|
||||
}
|
||||
// force an update of the marker position
|
||||
this->setPosition(oldLat, oldLon, true);
|
||||
}
|
56
ground/gcs/src/plugins/gpsdisplay/flatearthwidget.h
Normal file
56
ground/gcs/src/plugins/gpsdisplay/flatearthwidget.h
Normal file
@ -0,0 +1,56 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file flatearthwidget.h
|
||||
* @author The LibrePilot Team, http://www.librepilot.org Copyright (C) 2017.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup FlatEarthWidget FlatEarth Widget Plugin
|
||||
* @{
|
||||
* @brief A widget for visualizing a location on a flat map of the world.
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef FLATEARTHWIDGET_H_
|
||||
#define FLATEARTHWIDGET_H_
|
||||
|
||||
#include <QGraphicsView>
|
||||
class QGraphicsSvgItem;
|
||||
|
||||
class FlatEarthWidget : public QGraphicsView {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FlatEarthWidget(QWidget *parent = 0);
|
||||
~FlatEarthWidget();
|
||||
void setPosition(double, double, bool forceUpdate = false);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *event);
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
|
||||
private:
|
||||
bool zoomedin;
|
||||
double oldLat, oldLon;
|
||||
|
||||
QGraphicsScene *earthScene;
|
||||
QGraphicsPixmapItem *earthPixmapItem;
|
||||
QGraphicsSvgItem *marker;
|
||||
|
||||
void refreshMap(void);
|
||||
};
|
||||
#endif /* FLATEARTHWIDGET_H_ */
|
@ -65,7 +65,7 @@ GpsConstellationWidget::GpsConstellationWidget(QWidget *parent) : QGraphicsView(
|
||||
QFontDatabase::addApplicationFont(":/gpsgadget/font/digital-7.ttf");
|
||||
|
||||
// Now create 'maxSatellites' satellite icons which we will move around on the map:
|
||||
for (int i = 0; i < MAX_SATTELITES; i++) {
|
||||
for (int i = 0; i < MAX_SATELLITES; i++) {
|
||||
satellites[i][0] = 0;
|
||||
satellites[i][1] = 0;
|
||||
satellites[i][2] = 0;
|
||||
@ -112,7 +112,7 @@ void GpsConstellationWidget::resizeEvent(QResizeEvent *event)
|
||||
|
||||
void GpsConstellationWidget::updateSat(int index, int prn, int elevation, int azimuth, int snr)
|
||||
{
|
||||
if (index >= MAX_SATTELITES) {
|
||||
if (index >= MAX_SATELLITES) {
|
||||
// A bit of error checking never hurts.
|
||||
return;
|
||||
}
|
||||
|
@ -47,13 +47,13 @@ public slots:
|
||||
private slots:
|
||||
|
||||
private:
|
||||
static const int MAX_SATTELITES = 16;
|
||||
int satellites[MAX_SATTELITES][4];
|
||||
static const int MAX_SATELLITES = 24;
|
||||
int satellites[MAX_SATELLITES][4];
|
||||
QGraphicsScene *scene;
|
||||
QSvgRenderer *renderer;
|
||||
QGraphicsSvgItem *world;
|
||||
QGraphicsSvgItem *satIcons[MAX_SATTELITES];
|
||||
QGraphicsSimpleTextItem *satTexts[MAX_SATTELITES];
|
||||
QGraphicsSvgItem *satIcons[MAX_SATELLITES];
|
||||
QGraphicsSimpleTextItem *satTexts[MAX_SATELLITES];
|
||||
|
||||
QPointF polarToCoord(int elevation, int azimuth);
|
||||
|
||||
|
@ -9,6 +9,7 @@ include(gpsdisplay_dependencies.pri)
|
||||
include(../../libs/qwt/qwt.pri)
|
||||
|
||||
HEADERS += \
|
||||
flatearthwidget.h \
|
||||
gpsdisplayplugin.h \
|
||||
gpsconstellationwidget.h \
|
||||
gpsparser.h \
|
||||
@ -23,6 +24,7 @@ HEADERS += \
|
||||
gpsdisplaygadgetoptionspage.h
|
||||
|
||||
SOURCES += \
|
||||
flatearthwidget.cpp \
|
||||
gpsdisplayplugin.cpp \
|
||||
gpsconstellationwidget.cpp \
|
||||
gpsparser.cpp \
|
||||
|
@ -2,7 +2,8 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @file gpsdisplaywidget.cpp
|
||||
* @author Edouard Lafargue Copyright (C) 2010.
|
||||
* @author The LibrePilot Team, http://www.librepilot.org Copyright (C) 2017.
|
||||
* Edouard Lafargue Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup GPSGadgetPlugin GPS Gadget Plugin
|
||||
@ -45,19 +46,6 @@
|
||||
GpsDisplayWidget::GpsDisplayWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
// Not elegant, just load the image for now
|
||||
QGraphicsScene *fescene = new QGraphicsScene(this);
|
||||
QPixmap earthpix(":/gpsgadget/images/flatEarth.png");
|
||||
fescene->addPixmap(earthpix);
|
||||
flatEarth->setScene(fescene);
|
||||
marker = new QGraphicsSvgItem();
|
||||
QSvgRenderer *renderer = new QSvgRenderer();
|
||||
renderer->load(QString(":/gpsgadget/images/marker.svg"));
|
||||
marker->setSharedRenderer(renderer);
|
||||
fescene->addItem(marker);
|
||||
double scale = earthpix.width() / (marker->boundingRect().width() * 20);
|
||||
marker->setScale(scale);
|
||||
}
|
||||
|
||||
GpsDisplayWidget::~GpsDisplayWidget()
|
||||
@ -81,7 +69,7 @@ void GpsDisplayWidget::setDateTime(double date, double time)
|
||||
dstring2.sprintf("%06.0f", time);
|
||||
dstring2.insert(dstring2.length() - 2, ":");
|
||||
dstring2.insert(dstring2.length() - 5, ":");
|
||||
time_value->setText(dstring1 + " " + dstring2 + " GMT");
|
||||
time_value->setText(dstring1 + " " + dstring2 + " UTC");
|
||||
}
|
||||
|
||||
void GpsDisplayWidget::setFixType(const QString &fixtype)
|
||||
@ -94,6 +82,8 @@ void GpsDisplayWidget::setFixType(const QString &fixtype)
|
||||
fix_value->setText("2D");
|
||||
} else if (fixtype == "Fix3D") {
|
||||
fix_value->setText("3D");
|
||||
} else if (fixtype == "Fix3DDGNSS") {
|
||||
fix_value->setText("3D/DGNSS");
|
||||
} else {
|
||||
fix_value->setText("Unknown");
|
||||
}
|
||||
@ -117,7 +107,6 @@ void GpsDisplayWidget::setSVs(int sv)
|
||||
|
||||
temp.append(QString::number(sv));
|
||||
status_value->setText(temp);
|
||||
status_value->adjustSize();
|
||||
}
|
||||
|
||||
void GpsDisplayWidget::setDOP(double hdop, double vdop, double pdop)
|
||||
@ -157,10 +146,5 @@ void GpsDisplayWidget::setPosition(double lat, double lon, double alt)
|
||||
str3.sprintf("%.2f m", alt);
|
||||
coord_value_3->setText(str3);
|
||||
|
||||
// Now place the marker:
|
||||
double wscale = flatEarth->sceneRect().width() / 360;
|
||||
double hscale = flatEarth->sceneRect().height() / 180;
|
||||
QPointF opd = QPointF((lon + 180) * wscale - marker->boundingRect().width() * marker->scale() / 2,
|
||||
(90 - lat) * hscale - marker->boundingRect().height() * marker->scale() / 2);
|
||||
marker->setTransform(QTransform::fromTranslate(opd.x(), opd.y()), false);
|
||||
flatEarth->setPosition(lat, lon);
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @file gpsdisplaywidget.h
|
||||
* @author Edouard Lafargue Copyright (C) 2010.
|
||||
* @author The LibrePilot Team, http://www.librepilot.org Copyright (C) 2017.
|
||||
* Edouard Lafargue Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup GPSGadgetPlugin GPS Gadget Plugin
|
||||
@ -32,9 +33,6 @@
|
||||
#include "gpsdisplaygadgetconfiguration.h"
|
||||
#include "gpsconstellationwidget.h"
|
||||
#include "uavobject.h"
|
||||
#include <QGraphicsView>
|
||||
#include <QtSvg/QSvgRenderer>
|
||||
#include <QtSvg/QGraphicsSvgItem>
|
||||
|
||||
class Ui_GpsDisplayWidget;
|
||||
|
||||
@ -56,6 +54,5 @@ private slots:
|
||||
|
||||
private:
|
||||
GpsConstellationWidget *gpsConstellation;
|
||||
QGraphicsSvgItem *marker;
|
||||
};
|
||||
#endif /* GPSDISPLAYWIDGET_H_ */
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>609</width>
|
||||
<width>664</width>
|
||||
<height>606</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -47,164 +47,15 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="1,0" columnstretch="1,0">
|
||||
<item row="1" column="1">
|
||||
<widget class="GpsSnrWidget" name="gpsSnrWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>140</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>236</red>
|
||||
<green>236</green>
|
||||
<blue>236</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>237</red>
|
||||
<green>237</green>
|
||||
<blue>237</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>236</red>
|
||||
<green>236</green>
|
||||
<blue>236</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>237</red>
|
||||
<green>237</green>
|
||||
<blue>237</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>236</red>
|
||||
<green>236</green>
|
||||
<blue>236</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>236</red>
|
||||
<green>236</green>
|
||||
<blue>236</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Displays the SNR for each detected sat. GPS satellites are shown in green, GLONASS in cyan, BeiDou in red, Galileo in magenta and SBAS/QZSS in orange. Satellite number (PRN) is displayed inside the bar. Sat SNR is displayed above (in dBHz)</p></body></html></string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,1">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="GpsConstellationWidget" name="gpsSky">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>400</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="backgroundBrush">
|
||||
<brush brushstyle="NoBrush">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<layout class="QVBoxLayout" name="infoVerticalLayout" stretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="1,0,0">
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="infoVerticalLayout" stretch="0,0,0,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -238,6 +89,24 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="coord_value">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
@ -249,60 +118,48 @@
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>6</width>
|
||||
<height>0</height>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="coord_value_2">
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>6</width>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="alt_label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Alt :</string>
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_15">
|
||||
<spacer name="horizontalSpacer_23">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
@ -312,30 +169,10 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="coord_value_3">
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_16">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<spacer name="verticalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -351,7 +188,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="infoHorizontalLayout2" stretch="0,0,1,0,0,0,1">
|
||||
<layout class="QHBoxLayout" name="infoHorizontalLayout2" stretch="0,0,1,0,0,0,0,1">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -380,14 +217,39 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="speed_value">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_19">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>6</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
@ -429,6 +291,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="bear_value">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
@ -436,6 +310,81 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>6</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="alt_label">
|
||||
<property name="text">
|
||||
<string>Altitude (AMSL):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_15">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>6</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="coord_value_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_16">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>6</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
@ -459,24 +408,171 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="GpsConstellationWidget" name="gpsSky">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>600</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="backgroundBrush">
|
||||
<brush brushstyle="NoBrush">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="FlatEarthWidget" name="flatEarth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>90</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1440</width>
|
||||
<height>720</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>170</red>
|
||||
<green>255</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>240</red>
|
||||
<green>34</green>
|
||||
<blue>223</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>170</red>
|
||||
<green>255</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>240</red>
|
||||
<green>34</green>
|
||||
<blue>223</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>240</red>
|
||||
<green>34</green>
|
||||
<blue>223</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>240</red>
|
||||
<green>34</green>
|
||||
<blue>223</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="cursor" stdset="0">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string extracomment="Location of GCS on the Earth"><html><head/><body><p>Location of the UAV on the Earth</p><p>Click to toggle zoomlevel.</p></body></html></string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="optimizationFlags">
|
||||
<set>QGraphicsView::DontAdjustForAntialiasing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,0,0,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<layout class="QHBoxLayout" name="infoHorizontalLayout3" stretch="0,0,1,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>4</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="infoHorizontalLayout3" stretch="0,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
@ -502,36 +598,32 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="dop_value">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0 / 0 / 0</string>
|
||||
<string notr="true">0 / 0 / 0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_24">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>6</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>4</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_7">
|
||||
<property name="orientation">
|
||||
@ -543,13 +635,13 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>4</height>
|
||||
<height>6</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="infoHorizontalLayout4" stretch="0,0,1,0,0,0,0,0,0,0">
|
||||
<layout class="QHBoxLayout" name="infoHorizontalLayout4" stretch="0,0,1,0,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -578,12 +670,30 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="status_value">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
@ -596,7 +706,7 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>6</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -642,41 +752,24 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<widget class="QLabel" name="fix_value">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>6</width>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="fix_value">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_19">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
@ -696,21 +789,62 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="infoHorizontalLayout5" stretch="0,0">
|
||||
<layout class="QHBoxLayout" name="infoHorizontalLayout5" stretch="0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="datetime_label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Date & time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_22">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>6</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="time_value">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
@ -723,7 +857,7 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>6</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -732,159 +866,188 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<spacer name="verticalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Ignored</enum>
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>4</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout2" stretch="0,0,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<widget class="Line" name="line2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>9</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="connectButton">
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="disconnectButton">
|
||||
<property name="text">
|
||||
<string>Disconnect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>9</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGraphicsView" name="flatEarth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>191</width>
|
||||
<height>95</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>191</width>
|
||||
<height>95</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string extracomment="Location of GCS on the Earth"><html><head/><body><p>Location of GCS on the Earth</p></body></html></string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="optimizationFlags">
|
||||
<set>QGraphicsView::DontAdjustForAntialiasing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_14">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Signal to Noise Ratio</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="GpsSnrWidget" name="gpsSnrWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>236</red>
|
||||
<green>236</green>
|
||||
<blue>236</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>237</red>
|
||||
<green>237</green>
|
||||
<blue>237</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>236</red>
|
||||
<green>236</green>
|
||||
<blue>236</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>237</red>
|
||||
<green>237</green>
|
||||
<blue>237</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>236</red>
|
||||
<green>236</green>
|
||||
<blue>236</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>236</red>
|
||||
<green>236</green>
|
||||
<blue>236</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Displays the SNR for each detected satellite.</p> <ul><li> GPS satellites are shown in green</li><li> GLONASS in cyan</li><li> BeiDou in red</li><li> Galileo in magenta </li><li> SBAS/QZSS in orange <li></ul><p> Satellite SNR is displayed above (in dBHz ) <br/> Satellite number (PRN) is displayed below the bar. </p></body></html></string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="dataStreamGroupBox">
|
||||
@ -905,32 +1068,60 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||
</property>
|
||||
<property name="lineWrapMode">
|
||||
<enum>QTextEdit::WidgetWidth</enum>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="connectButton">
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="disconnectButton">
|
||||
<property name="text">
|
||||
<string>Disconnect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||
</property>
|
||||
<property name="lineWrapMode">
|
||||
<enum>QTextEdit::WidgetWidth</enum>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -949,6 +1140,11 @@
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>gpssnrwidget.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>FlatEarthWidget</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>flatearthwidget.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -1,4 +1,33 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file gpssnrwidget.cpp
|
||||
* @author The LibrePilot Team, http://www.librepilot.org Copyright (C) 2017.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2014.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup GpsSnrWidget GpsSnr Widget Plugin
|
||||
* @{
|
||||
* @brief A widget for visualizing Signal to Noise Ratio information for known SV
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "gpssnrwidget.h"
|
||||
#include <QGraphicsRectItem>
|
||||
#include <QFontMetrics>
|
||||
|
||||
GpsSnrWidget::GpsSnrWidget(QWidget *parent) :
|
||||
QGraphicsView(parent)
|
||||
@ -6,25 +35,34 @@ GpsSnrWidget::GpsSnrWidget(QWidget *parent) :
|
||||
scene = new QGraphicsScene(this);
|
||||
setScene(scene);
|
||||
|
||||
// Now create 'maxSatellites' satellite icons which we will move around on the map:
|
||||
for (int i = 0; i < MAX_SATTELITES; i++) {
|
||||
// Create 'maxSatellites' signal to noise level bars:
|
||||
for (int i = 0; i < MAX_SATELLITES; i++) {
|
||||
satellites[i][0] = 0;
|
||||
satellites[i][1] = 0;
|
||||
satellites[i][2] = 0;
|
||||
satellites[i][3] = 0;
|
||||
|
||||
// draw empty SNR bars and hide them for now
|
||||
boxes[i] = new QGraphicsRectItem();
|
||||
boxes[i]->setBrush(QColor("Green"));
|
||||
scene->addItem(boxes[i]);
|
||||
boxes[i]->hide();
|
||||
|
||||
satTexts[i] = new QGraphicsSimpleTextItem("##", boxes[i]);
|
||||
// draw PRN numbers
|
||||
QFont prnFont("Digital-7", 14); // font size 14 points
|
||||
satTexts[i] = new QGraphicsSimpleTextItem("###", boxes[i]);
|
||||
satTexts[i]->setBrush(QColor("Black"));
|
||||
satTexts[i]->setFont(QFont("Courier"));
|
||||
satTexts[i]->setFont(prnFont);
|
||||
|
||||
// Determine the dimensions (in pixels) of a piece of prn reference text.
|
||||
// This is used to make the scaling independent from the width of the actual prn text.
|
||||
QFontMetrics fm(prnFont);
|
||||
prnReferenceTextRect = fm.boundingRect("###");
|
||||
|
||||
// draw SNR levels
|
||||
satSNRs[i] = new QGraphicsSimpleTextItem("##", boxes[i]);
|
||||
satSNRs[i]->setBrush(QColor("Black"));
|
||||
satSNRs[i]->setFont(QFont("Courier"));
|
||||
satSNRs[i]->setFont(QFont("Arial"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +76,7 @@ void GpsSnrWidget::showEvent(QShowEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
scene->setSceneRect(0, 0, this->viewport()->width(), this->viewport()->height());
|
||||
for (int index = 0; index < MAX_SATTELITES; index++) {
|
||||
for (int index = 0; index < MAX_SATELLITES; index++) {
|
||||
drawSat(index);
|
||||
}
|
||||
}
|
||||
@ -47,14 +85,14 @@ void GpsSnrWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
scene->setSceneRect(0, 0, this->viewport()->width(), this->viewport()->height());
|
||||
for (int index = 0; index < MAX_SATTELITES; index++) {
|
||||
for (int index = 0; index < MAX_SATELLITES; index++) {
|
||||
drawSat(index);
|
||||
}
|
||||
}
|
||||
|
||||
void GpsSnrWidget::updateSat(int index, int prn, int elevation, int azimuth, int snr)
|
||||
{
|
||||
if (index >= MAX_SATTELITES) {
|
||||
if (index >= MAX_SATELLITES) {
|
||||
// A bit of error checking never hurts.
|
||||
return;
|
||||
}
|
||||
@ -68,17 +106,50 @@ void GpsSnrWidget::updateSat(int index, int prn, int elevation, int azimuth, int
|
||||
drawSat(index);
|
||||
}
|
||||
|
||||
#define PRN_TEXTAREA_HEIGHT 20
|
||||
#define SIDE_MARGIN 15
|
||||
#define HIGH_SAT_AGING_CYCLES 10
|
||||
|
||||
void GpsSnrWidget::drawSat(int index)
|
||||
{
|
||||
if (index >= MAX_SATTELITES) {
|
||||
static int satsToShow = MAX_SATELLITES;
|
||||
static int lastNrVisibleSats = 0;
|
||||
static int highSatelliteCountAge = 0;
|
||||
bool heightLimited = false;
|
||||
|
||||
if (index >= MAX_SATELLITES) {
|
||||
// A bit of error checking never hurts.
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
Set the maximum number of satellites in the SNR widget based on the number
|
||||
of satellites previously seen.
|
||||
This code implements an aging timer to prevent flapping between different scales.
|
||||
|
||||
There is a known issue: the current implementation can not differentiate between
|
||||
multiple sources of GPS information. For example a flight controller and a GPS mouse.
|
||||
|
||||
In this case, the scale will always be set to the scale necessary for the
|
||||
source with the highest number of satellites in view.
|
||||
*/
|
||||
if (index == 0) {
|
||||
if (lastNrVisibleSats > 16) {
|
||||
satsToShow = MAX_SATELLITES;
|
||||
highSatelliteCountAge = HIGH_SAT_AGING_CYCLES;
|
||||
} else if (highSatelliteCountAge > 0) {
|
||||
satsToShow = MAX_SATELLITES;
|
||||
--highSatelliteCountAge;
|
||||
} else {
|
||||
satsToShow = 16;
|
||||
}
|
||||
lastNrVisibleSats = 0;
|
||||
}
|
||||
|
||||
const int prn = satellites[index][0];
|
||||
const int snr = satellites[index][3];
|
||||
if (prn && snr) {
|
||||
boxes[index]->show();
|
||||
lastNrVisibleSats++;
|
||||
|
||||
// When using integer values, width and height are the
|
||||
// box width and height, but the left and bottom borders are drawn on the box,
|
||||
@ -88,16 +159,23 @@ void GpsSnrWidget::drawSat(int index)
|
||||
|
||||
// Casting to int rounds down, which is what I want.
|
||||
// Minus 2 to allow a pixel of white left and right.
|
||||
int availableWidth = (int)((scene->width() - 2) / MAX_SATTELITES);
|
||||
int availableWidth = (int)((scene->width() - 2 - 2 * SIDE_MARGIN) / satsToShow);
|
||||
|
||||
// 2 pixels, one on each side.
|
||||
// If there is no space, don't draw anything.
|
||||
if (availableWidth <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
boxes[index]->show();
|
||||
|
||||
// 2 pixels extra one on each side.
|
||||
qreal width = availableWidth - 2;
|
||||
// SNR = 1-99 (0 is special)..
|
||||
qreal height = int((scene->height() / 99) * snr + 0.5);
|
||||
// 1 for showing a pixel of white to the left.
|
||||
qreal x = availableWidth * index + 1;
|
||||
qreal height = int(((scene->height() - PRN_TEXTAREA_HEIGHT) / 99) * snr + 0.5);
|
||||
// 1 for showing a pixel of white extra to the left.
|
||||
qreal x = availableWidth * index + 1 + SIDE_MARGIN;
|
||||
// Rember, 0 is at the top.
|
||||
qreal y = scene->height() - height;
|
||||
qreal y = scene->height() - height - PRN_TEXTAREA_HEIGHT;
|
||||
// Compensate for the extra pixel for the border.
|
||||
boxes[index]->setRect(0, 0, width - 1, height - 1);
|
||||
boxes[index]->setPos(x, y);
|
||||
@ -122,6 +200,8 @@ void GpsSnrWidget::drawSat(int index)
|
||||
} else {
|
||||
boxes[index]->setBrush(QColor("Green"));
|
||||
}
|
||||
|
||||
// Add leading 0 to PRN numbers to make them at least two digits wide
|
||||
QString prnString = QString().number(prn);
|
||||
if (prnString.length() == 1) {
|
||||
prnString = "0" + prnString;
|
||||
@ -129,22 +209,35 @@ void GpsSnrWidget::drawSat(int index)
|
||||
satTexts[index]->setText(prnString);
|
||||
QRectF textRect = satTexts[index]->boundingRect();
|
||||
|
||||
// Reposition PRN number below the bar and rescale to fit the available space
|
||||
QTransform matrix;
|
||||
qreal scale = 0.85 * (boxRect.width() / textRect.width());
|
||||
qreal scale = 0.85 * (boxRect.width() / prnReferenceTextRect.width());
|
||||
|
||||
// Limit the maximum PRN text height to PRN_TEXTAREA_HEIGHT
|
||||
if ((prnReferenceTextRect.height() * scale) > (PRN_TEXTAREA_HEIGHT)) {
|
||||
scale = (PRN_TEXTAREA_HEIGHT) / prnReferenceTextRect.height();
|
||||
heightLimited = true;
|
||||
}
|
||||
|
||||
matrix.translate(boxRect.width() / 2, boxRect.height());
|
||||
matrix.scale(scale, scale);
|
||||
matrix.translate(-textRect.width() / 2, -textRect.height());
|
||||
matrix.translate(-textRect.width() / 2, 0);
|
||||
satTexts[index]->setTransform(matrix, false);
|
||||
|
||||
|
||||
// Add leading 0 to SNR values to make them at least two digits wide
|
||||
QString snrString = QString().number(snr);
|
||||
if (snrString.length() == 1) { // Will probably never happen!
|
||||
if (snrString.length() == 1) {
|
||||
snrString = "0" + snrString;
|
||||
}
|
||||
satSNRs[index]->setText(snrString);
|
||||
textRect = satSNRs[index]->boundingRect();
|
||||
|
||||
// Reposition SNR value above the bar and rescale to fit the available space
|
||||
matrix.reset();
|
||||
scale = 0.85 * (boxRect.width() / textRect.width());
|
||||
textRect = satSNRs[index]->boundingRect();
|
||||
if (!heightLimited) {
|
||||
scale = 0.85 * (boxRect.width() / prnReferenceTextRect.width());
|
||||
}
|
||||
matrix.translate(boxRect.width() / 2, 0);
|
||||
matrix.scale(scale, scale);
|
||||
matrix.translate(-textRect.width() / 2, -textRect.height());
|
||||
|
@ -1,8 +1,35 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file gpssnrwidget.h
|
||||
* @author The LibrePilot Team, http://www.librepilot.org Copyright (C) 2017.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2014.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup GpsSnrWidget GpsSnr Widget Plugin
|
||||
* @{
|
||||
* @brief A widget for visualizing Signal to Noise Ratio information for known SV
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GPSSNRWIDGET_H
|
||||
#define GPSSNRWIDGET_H
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QGraphicsRectItem>
|
||||
class QGraphicsRectItem;
|
||||
|
||||
class GpsSnrWidget : public QGraphicsView {
|
||||
Q_OBJECT
|
||||
@ -16,12 +43,13 @@ public slots:
|
||||
void updateSat(int index, int prn, int elevation, int azimuth, int snr);
|
||||
|
||||
private:
|
||||
static const int MAX_SATTELITES = 16;
|
||||
int satellites[MAX_SATTELITES][4];
|
||||
static const int MAX_SATELLITES = 24;
|
||||
int satellites[MAX_SATELLITES][4];
|
||||
QGraphicsScene *scene;
|
||||
QGraphicsRectItem *boxes[MAX_SATTELITES];
|
||||
QGraphicsSimpleTextItem *satTexts[MAX_SATTELITES];
|
||||
QGraphicsSimpleTextItem *satSNRs[MAX_SATTELITES];
|
||||
QGraphicsRectItem *boxes[MAX_SATELLITES];
|
||||
QGraphicsSimpleTextItem *satTexts[MAX_SATELLITES];
|
||||
QGraphicsSimpleTextItem *satSNRs[MAX_SATELLITES];
|
||||
QRectF prnReferenceTextRect;
|
||||
|
||||
void drawSat(int index);
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
flatEarth.png image used from: http://www.shadedrelief.com/natural3/pages/textures.html
|
||||
|
||||
Terms of Use
|
||||
|
||||
All Natural Earth III data (and images) found on this website are in the public domain. You may use the data in any manner, including modifying the content and design, electronic dissemination, and offset printing. The author, Tom Patterson, renounces all financial claim to the data and invites you to use it for personal, educational, and commercial purposes.
|
||||
|
||||
No permission is needed to use Natural Earth III. Crediting the author is unnecessary. However, if you wish to cite the data source, simply use: Tom Patterson, www.shadedrelief.com.
|
||||
|
||||
The author provides Natural Earth III as a public service and is not responsible for any problems relating to accuracy, content, design, and how it is used.
|
||||
|
||||
|
BIN
ground/gcs/src/plugins/gpsdisplay/images/flatEarth.jpg
Normal file
BIN
ground/gcs/src/plugins/gpsdisplay/images/flatEarth.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 155 KiB |
Binary file not shown.
Before Width: | Height: | Size: 28 KiB |
@ -23,7 +23,7 @@
|
||||
<stop
|
||||
id="stop4514"
|
||||
offset="0"
|
||||
style="stop-color:#ce00e0;stop-opacity:1" />
|
||||
style="stop-color:#ee2eff;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4516"
|
||||
offset="1"
|
||||
@ -1595,7 +1595,7 @@
|
||||
cx="569.28571"
|
||||
transform="translate(0.08444214,2.2540576e-8)"
|
||||
id="path3712-3"
|
||||
style="fill:url(#linearGradient3859-7-2);fill-opacity:1;stroke:#8d029a;stroke-width:1.56471384;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
style="fill:url(#linearGradient3859-7-2);fill-opacity:1;stroke:#b503c6;stroke-width:1.56471384;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<circle
|
||||
r="20.714285"
|
||||
cy="195.93361"
|
||||
@ -1613,7 +1613,7 @@
|
||||
r="20.714285"
|
||||
cy="195.93361"
|
||||
cx="569.28571"
|
||||
style="fill:#ce00e0;fill-opacity:1;stroke:#8d029a;stroke-width:1.56471384;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:#ee2eff;fill-opacity:1;stroke:#b503c6;stroke-width:1.56471384;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path3891-0"
|
||||
transform="translate(0.08444214,2.2540576e-8)" />
|
||||
<circle
|
||||
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
@ -13,7 +13,7 @@
|
||||
height="266.91373"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="marker.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
@ -33,18 +33,20 @@
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4481878"
|
||||
inkscape:cx="88.375982"
|
||||
inkscape:cx="-13.475449"
|
||||
inkscape:cy="166.06585"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="928"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:snap-object-midpoints="true" />
|
||||
inkscape:snap-object-midpoints="true"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
@ -64,23 +66,47 @@
|
||||
transform="translate(-81.1701,-431.51432)">
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="color:#000000;fill:none;stroke:#ff0405;stroke-width:62.96201527;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
style="color:#000000;fill:none;stroke:#ce0001;stroke-width:31.48100763;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="path2987"
|
||||
sodipodi:cx="132.45686"
|
||||
sodipodi:cy="133.45686"
|
||||
sodipodi:rx="132.45686"
|
||||
sodipodi:ry="133.45686"
|
||||
d="M 264.91373,133.45686 A 132.45686,133.45686 0 1 1 0,133.45686 A 132.45686,133.45686 0 1 1 264.91373,133.45686 z"
|
||||
d="M 264.91373,133.45686 A 132.45686,133.45686 0 0 1 132.45686,266.91373 132.45686,133.45686 0 0 1 0,133.45686 132.45686,133.45686 0 0 1 132.45686,0 132.45686,133.45686 0 0 1 264.91373,133.45686 Z"
|
||||
transform="matrix(0.63530368,0,0,0.63530368,130.16715,480.18555)" />
|
||||
<path
|
||||
style="fill:none;stroke:#ff0405;stroke-width:40;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 214.31748,698.42805 L 214.31748,431.51432"
|
||||
id="path3757"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3759"
|
||||
d="M 347.77435,564.97118 L 80.860621,564.97118"
|
||||
style="fill:none;stroke:#ff0405;stroke-width:40;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ce0001;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4145"
|
||||
width="54.996197"
|
||||
height="40.42382"
|
||||
x="82.551125"
|
||||
y="544.75928" />
|
||||
<rect
|
||||
y="544.75928"
|
||||
x="290.39709"
|
||||
height="40.42382"
|
||||
width="56.377232"
|
||||
id="rect4147"
|
||||
style="opacity:1;fill:#ce0001;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ce0001;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4149"
|
||||
width="41.676338"
|
||||
height="56.305683"
|
||||
x="193.47931"
|
||||
y="431.51431" />
|
||||
<rect
|
||||
y="642.12238"
|
||||
x="193.47931"
|
||||
height="56.305683"
|
||||
width="41.676338"
|
||||
id="rect4151"
|
||||
style="opacity:1;fill:#ce0001;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<circle
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ce0001;fill-opacity:1;fill-rule:nonzero;stroke:#ce0001;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="path4170"
|
||||
cx="214.31749"
|
||||
cy="564.97119"
|
||||
r="9.8541069" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 4.5 KiB |
@ -1,7 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/gpsgadget">
|
||||
<file>images/gpsEarth.svg</file>
|
||||
<file>images/flatEarth.png</file>
|
||||
<file>images/flatEarth.jpg</file>
|
||||
<file>images/marker.svg</file>
|
||||
<file>font/digital-7.ttf</file>
|
||||
</qresource>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The LibrePilot Project
|
||||
* Copyright (C) 2016-2017 The LibrePilot Project
|
||||
* Contact: http://www.librepilot.org
|
||||
*
|
||||
* This file is part of LibrePilot GCS.
|
||||
@ -117,6 +117,7 @@ function position() {
|
||||
switch(gpsPositionSensor.status) {
|
||||
case GPSPositionSensor.Status.Fix2D:
|
||||
case GPSPositionSensor.Status.Fix3D:
|
||||
case GPSPositionSensor.Status.Fix3DDGNSS:
|
||||
return gpsPosition();
|
||||
case GPSPositionSensor.Status.NoFix:
|
||||
case GPSPositionSensor.Status.NoGPS:
|
||||
@ -222,7 +223,7 @@ function isGpsNotInitialised() {
|
||||
}
|
||||
|
||||
function isGpsStatusFix3D() {
|
||||
return (gpsPositionSensor.status == GPSPositionSensor.Status.Fix3D);
|
||||
return ((gpsPositionSensor.status == GPSPositionSensor.Status.Fix3D) || (gpsPositionSensor.status == GPSPositionSensor.Status.Fix3DDGNSS));
|
||||
}
|
||||
|
||||
function isOplmConnected() {
|
||||
@ -276,7 +277,7 @@ function gpsAltitude() {
|
||||
}
|
||||
|
||||
function gpsStatus() {
|
||||
var gpsStatusText = ["NO GPS", "NO FIX", "2D", "3D"];
|
||||
var gpsStatusText = ["NO GPS", "NO FIX", "2D", "3D", "3D"];
|
||||
|
||||
if (gpsStatusText.length != GPSPositionSensor.GPSPositionSensorConstants.StatusCount) {
|
||||
console.log("uav.js: gpsStatus() do not match gpsPositionSensor.status uavo");
|
||||
|
@ -9,7 +9,7 @@
|
||||
<field name="Options" units="" type="uint16" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<telemetryflight acked="false" updatemode="onchange" period="0"/>
|
||||
<logging updatemode="manual" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<xml>
|
||||
<object name="GPSPositionSensor" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>Raw GPS data from @ref GPSModule.</description>
|
||||
<field name="Status" units="" type="enum" elements="1" options="NoGPS,NoFix,Fix2D,Fix3D"/>
|
||||
<field name="Status" units="" type="enum" elements="1" options="NoGPS,NoFix,Fix2D,Fix3D,Fix3DDGNSS"/>
|
||||
<field name="Latitude" units="degrees x 10^-7" type="int32" elements="1"/>
|
||||
<field name="Longitude" units="degrees x 10^-7" type="int32" elements="1"/>
|
||||
<field name="Altitude" units="meters" type="float" elements="1"/>
|
||||
|
@ -2,10 +2,10 @@
|
||||
<object name="GPSSatellites" singleinstance="true" settings="false" category="Sensors">
|
||||
<description>Contains information about the GPS satellites in view from @ref GPSModule.</description>
|
||||
<field name="SatsInView" units="" type="int8" elements="1"/>
|
||||
<field name="PRN" units="" type="uint8" elements="16"/>
|
||||
<field name="Elevation" units="degrees" type="int8" elements="16"/>
|
||||
<field name="Azimuth" units="degrees" type="int16" elements="16"/>
|
||||
<field name="SNR" units="" type="int8" elements="16"/>
|
||||
<field name="PRN" units="" type="uint8" elements="24"/>
|
||||
<field name="Elevation" units="degrees" type="int8" elements="24"/>
|
||||
<field name="Azimuth" units="degrees" type="int16" elements="24"/>
|
||||
<field name="SNR" units="" type="int8" elements="24"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="10000"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user