Unverified Commit b780e9d7 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #7145 from MatejFranceskin/pr-septentrio

Support for Septentrio base station RTK
parents 9765125d 240763af
...@@ -405,7 +405,8 @@ HEADERS += \ ...@@ -405,7 +405,8 @@ HEADERS += \
src/api/QGCOptions.h \ src/api/QGCOptions.h \
src/api/QGCSettings.h \ src/api/QGCSettings.h \
src/api/QmlComponentInfo.h \ src/api/QmlComponentInfo.h \
src/comm/MavlinkMessagesTimer.h src/comm/MavlinkMessagesTimer.h \
src/GPS/Drivers/src/base_station.h
SOURCES += \ SOURCES += \
src/api/QGCCorePlugin.cc \ src/api/QGCCorePlugin.cc \
...@@ -665,6 +666,7 @@ HEADERS += \ ...@@ -665,6 +666,7 @@ HEADERS += \
src/GPS/Drivers/src/rtcm.h \ src/GPS/Drivers/src/rtcm.h \
src/GPS/Drivers/src/ashtech.h \ src/GPS/Drivers/src/ashtech.h \
src/GPS/Drivers/src/ubx.h \ src/GPS/Drivers/src/ubx.h \
src/GPS/Drivers/src/sbf.h \
src/GPS/GPSManager.h \ src/GPS/GPSManager.h \
src/GPS/GPSPositionMessage.h \ src/GPS/GPSPositionMessage.h \
src/GPS/GPSProvider.h \ src/GPS/GPSProvider.h \
...@@ -853,6 +855,7 @@ SOURCES += \ ...@@ -853,6 +855,7 @@ SOURCES += \
src/GPS/Drivers/src/rtcm.cpp \ src/GPS/Drivers/src/rtcm.cpp \
src/GPS/Drivers/src/ashtech.cpp \ src/GPS/Drivers/src/ashtech.cpp \
src/GPS/Drivers/src/ubx.cpp \ src/GPS/Drivers/src/ubx.cpp \
src/GPS/Drivers/src/sbf.cpp \
src/GPS/GPSManager.cc \ src/GPS/GPSManager.cc \
src/GPS/GPSProvider.cc \ src/GPS/GPSProvider.cc \
src/GPS/RTCM/RTCMMavlink.cc \ src/GPS/RTCM/RTCMMavlink.cc \
......
Subproject commit 8828fb9ad3a2cad568feac2b46de7d6d3af32ca8 Subproject commit c0796efe5c99582aa877cde136e10fabe21be70a
...@@ -34,6 +34,9 @@ void GPSManager::connectGPS(const QString& device, const QString& gps_type) ...@@ -34,6 +34,9 @@ void GPSManager::connectGPS(const QString& device, const QString& gps_type)
if (gps_type.contains("trimble", Qt::CaseInsensitive)) { if (gps_type.contains("trimble", Qt::CaseInsensitive)) {
type = GPSProvider::GPSType::trimble; type = GPSProvider::GPSType::trimble;
qCDebug(RTKGPSLog) << "Connecting Trimble device"; qCDebug(RTKGPSLog) << "Connecting Trimble device";
} else if (gps_type.contains("septentrio", Qt::CaseInsensitive)) {
type = GPSProvider::GPSType::septentrio;
qCDebug(RTKGPSLog) << "Connecting Septentrio device";
} else { } else {
type = GPSProvider::GPSType::u_blox; type = GPSProvider::GPSType::u_blox;
qCDebug(RTKGPSLog) << "Connecting U-blox device"; qCDebug(RTKGPSLog) << "Connecting U-blox device";
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <QDebug> #include <QDebug>
#include "Drivers/src/ubx.h" #include "Drivers/src/ubx.h"
#include "Drivers/src/sbf.h"
#include "Drivers/src/ashtech.h" #include "Drivers/src/ashtech.h"
#include "Drivers/src/base_station.h" #include "Drivers/src/base_station.h"
#include "definitions.h" #include "definitions.h"
...@@ -81,6 +82,9 @@ void GPSProvider::run() ...@@ -81,6 +82,9 @@ void GPSProvider::run()
if (_type == GPSType::trimble) { if (_type == GPSType::trimble) {
gpsDriver = new GPSDriverAshtech(&callbackEntry, this, &_reportGpsPos, _pReportSatInfo); gpsDriver = new GPSDriverAshtech(&callbackEntry, this, &_reportGpsPos, _pReportSatInfo);
baudrate = 115200; baudrate = 115200;
} else if (_type == GPSType::septentrio) {
gpsDriver = new GPSDriverSBF(&callbackEntry, this, &_reportGpsPos, _pReportSatInfo, 5);
baudrate = 0; // auto-configure
} else { } else {
gpsDriver = new GPSDriverUBX(GPSDriverUBX::Interface::UART, &callbackEntry, this, &_reportGpsPos, _pReportSatInfo); gpsDriver = new GPSDriverUBX(GPSDriverUBX::Interface::UART, &callbackEntry, this, &_reportGpsPos, _pReportSatInfo);
baudrate = 0; // auto-configure baudrate = 0; // auto-configure
......
...@@ -32,7 +32,8 @@ public: ...@@ -32,7 +32,8 @@ public:
enum class GPSType { enum class GPSType {
u_blox, u_blox,
trimble trimble,
septentrio
}; };
GPSProvider(const QString& device, GPSProvider(const QString& device,
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
#include "vehicle_gps_position.h" #include "vehicle_gps_position.h"
#include "satellite_info.h" #include "satellite_info.h"
#define M_DEG_TO_RAD (M_PI / 180.0)
#define M_RAD_TO_DEG (180.0 / M_PI)
#define M_DEG_TO_RAD_F 0.01745329251994f #define M_DEG_TO_RAD_F 0.01745329251994f
#define M_RAD_TO_DEG_F 57.2957795130823f #define M_RAD_TO_DEG_F 57.2957795130823f
...@@ -61,11 +63,10 @@ public: ...@@ -61,11 +63,10 @@ public:
static void usleep(unsigned long usecs) { QThread::usleep(usecs); } static void usleep(unsigned long usecs) { QThread::usleep(usecs); }
}; };
static inline void usleep(unsigned long usecs) { static inline void gps_usleep(unsigned long usecs) {
Sleeper::usleep(usecs); Sleeper::usleep(usecs);
} }
typedef uint64_t gps_abstime; typedef uint64_t gps_abstime;
#include <QDateTime> #include <QDateTime>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
{ "vendorID": 5446, "productID": 424, "boardClass": "RTK GPS", "name": "U-blox RTK GPS", "comment": "U-blox RTK GPS (M8P)" }, { "vendorID": 5446, "productID": 424, "boardClass": "RTK GPS", "name": "U-blox RTK GPS", "comment": "U-blox RTK GPS (M8P)" },
{ "vendorID": 5446, "productID": 425, "boardClass": "RTK GPS", "name": "U-blox RTK GPS", "comment": "U-blox RTK GPS (F9P)" }, { "vendorID": 5446, "productID": 425, "boardClass": "RTK GPS", "name": "U-blox RTK GPS", "comment": "U-blox RTK GPS (F9P)" },
{ "vendorID": 1317, "productID": 42151, "boardClass": "RTK GPS", "name": "Trimble RTK GPS", "comment": "Trimble RTK GPS" }, { "vendorID": 1317, "productID": 42151, "boardClass": "RTK GPS", "name": "Trimble RTK GPS", "comment": "Trimble RTK GPS" },
{ "vendorID": 5418, "productID": 34240, "boardClass": "RTK GPS", "name": "Septentrio RTK GPS", "comment": "Septentrio RTK GPS" },
{ "vendorID": 8352, "productID": 16732, "boardClass": "OpenPilot", "name": "OpenPilot OPLink" }, { "vendorID": 8352, "productID": 16732, "boardClass": "OpenPilot", "name": "OpenPilot OPLink" },
{ "vendorID": 8352, "productID": 16733, "boardClass": "OpenPilot", "name": "OpenPilot CC3D" }, { "vendorID": 8352, "productID": 16733, "boardClass": "OpenPilot", "name": "OpenPilot CC3D" },
{ "vendorID": 8352, "productID": 16734, "boardClass": "OpenPilot", "name": "OpenPilot Revolution" }, { "vendorID": 8352, "productID": 16734, "boardClass": "OpenPilot", "name": "OpenPilot Revolution" },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment