Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
b5ab11f7
Unverified
Commit
b5ab11f7
authored
Jul 13, 2018
by
Beat Küng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTK GPS: add Trimble MB-Two support
parent
3239118e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
11 deletions
+38
-11
GPSManager.cc
src/GPS/GPSManager.cc
+11
-2
GPSManager.h
src/GPS/GPSManager.h
+1
-1
GPSProvider.cc
src/GPS/GPSProvider.cc
+11
-4
GPSProvider.h
src/GPS/GPSProvider.h
+9
-1
LinkManager.cc
src/comm/LinkManager.cc
+1
-1
USBBoardInfo.json
src/comm/USBBoardInfo.json
+2
-1
GeneralSettings.qml
src/ui/preferences/GeneralSettings.qml
+1
-1
GPSRTKIndicator.qml
src/ui/toolbar/GPSRTKIndicator.qml
+2
-0
No files found.
src/GPS/GPSManager.cc
View file @
b5ab11f7
...
...
@@ -26,13 +26,22 @@ GPSManager::~GPSManager()
disconnectGPS
();
}
void
GPSManager
::
connectGPS
(
const
QString
&
device
)
void
GPSManager
::
connectGPS
(
const
QString
&
device
,
const
QString
&
gps_type
)
{
RTKSettings
*
rtkSettings
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
rtkSettings
();
GPSProvider
::
GPSType
type
;
if
(
gps_type
.
contains
(
"trimble"
,
Qt
::
CaseInsensitive
))
{
type
=
GPSProvider
::
GPSType
::
trimble
;
qCDebug
(
RTKGPSLog
)
<<
"Connecting Trimble device"
;
}
else
{
type
=
GPSProvider
::
GPSType
::
u_blox
;
qCDebug
(
RTKGPSLog
)
<<
"Connecting U-blox device"
;
}
disconnectGPS
();
_requestGpsStop
=
false
;
_gpsProvider
=
new
GPSProvider
(
device
,
true
,
rtkSettings
->
surveyInAccuracyLimit
()
->
rawValue
().
toDouble
(),
rtkSettings
->
surveyInMinObservationDuration
()
->
rawValue
().
toInt
(),
_requestGpsStop
);
_gpsProvider
=
new
GPSProvider
(
device
,
t
ype
,
t
rue
,
rtkSettings
->
surveyInAccuracyLimit
()
->
rawValue
().
toDouble
(),
rtkSettings
->
surveyInMinObservationDuration
()
->
rawValue
().
toInt
(),
_requestGpsStop
);
_gpsProvider
->
start
();
//create RTCM device
...
...
src/GPS/GPSManager.h
View file @
b5ab11f7
...
...
@@ -28,7 +28,7 @@ public:
GPSManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
GPSManager
();
void
connectGPS
(
const
QString
&
device
);
void
connectGPS
(
const
QString
&
device
,
const
QString
&
gps_type
);
void
disconnectGPS
(
void
);
bool
connected
(
void
)
const
{
return
_gpsProvider
&&
_gpsProvider
->
isRunning
();
}
...
...
src/GPS/GPSProvider.cc
View file @
b5ab11f7
...
...
@@ -16,6 +16,7 @@
#include <QDebug>
#include "Drivers/src/ubx.h"
#include "Drivers/src/ashtech.h"
#include "Drivers/src/gps_helper.h"
#include "definitions.h"
...
...
@@ -53,7 +54,7 @@ void GPSProvider::run()
_serial
->
setFlowControl
(
QSerialPort
::
NoFlowControl
);
unsigned
int
baudrate
;
GPS
DriverUBX
*
gpsDriver
=
nullptr
;
GPS
Helper
*
gpsDriver
=
nullptr
;
while
(
!
_requestStop
)
{
...
...
@@ -62,8 +63,13 @@ void GPSProvider::run()
gpsDriver
=
nullptr
;
}
gpsDriver
=
new
GPSDriverUBX
(
GPSDriverUBX
::
Interface
::
UART
,
&
callbackEntry
,
this
,
&
_reportGpsPos
,
_pReportSatInfo
);
baudrate
=
0
;
// auto-configure
if
(
_type
==
GPSType
::
trimble
)
{
gpsDriver
=
new
GPSDriverAshtech
(
&
callbackEntry
,
this
,
&
_reportGpsPos
,
_pReportSatInfo
);
baudrate
=
115200
;
}
else
{
gpsDriver
=
new
GPSDriverUBX
(
GPSDriverUBX
::
Interface
::
UART
,
&
callbackEntry
,
this
,
&
_reportGpsPos
,
_pReportSatInfo
);
baudrate
=
0
;
// auto-configure
}
gpsDriver
->
setSurveyInSpecs
(
_surveyInAccMeters
*
10000
,
_surveryInDurationSecs
);
if
(
gpsDriver
->
configure
(
baudrate
,
GPSDriverUBX
::
OutputMode
::
RTCM
)
==
0
)
{
...
...
@@ -102,8 +108,9 @@ void GPSProvider::run()
qCDebug
(
RTKGPSLog
)
<<
"Exiting GPS thread"
;
}
GPSProvider
::
GPSProvider
(
const
QString
&
device
,
bool
enableSatInfo
,
double
surveyInAccMeters
,
int
surveryInDurationSecs
,
const
std
::
atomic_bool
&
requestStop
)
GPSProvider
::
GPSProvider
(
const
QString
&
device
,
GPSType
type
,
bool
enableSatInfo
,
double
surveyInAccMeters
,
int
surveryInDurationSecs
,
const
std
::
atomic_bool
&
requestStop
)
:
_device
(
device
)
,
_type
(
type
)
,
_requestStop
(
requestStop
)
,
_surveyInAccMeters
(
surveyInAccMeters
)
,
_surveryInDurationSecs
(
surveryInDurationSecs
)
...
...
src/GPS/GPSProvider.h
View file @
b5ab11f7
...
...
@@ -29,7 +29,14 @@ class GPSProvider : public QThread
{
Q_OBJECT
public:
GPSProvider
(
const
QString
&
device
,
bool
enableSatInfo
,
double
surveyInAccMeters
,
int
surveryInDurationSecs
,
const
std
::
atomic_bool
&
requestStop
);
enum
class
GPSType
{
u_blox
,
trimble
};
GPSProvider
(
const
QString
&
device
,
GPSType
type
,
bool
enableSatInfo
,
double
surveyInAccMeters
,
int
surveryInDurationSecs
,
const
std
::
atomic_bool
&
requestStop
);
~
GPSProvider
();
/**
...
...
@@ -57,6 +64,7 @@ private:
int
callback
(
GPSCallbackType
type
,
void
*
data1
,
int
data2
);
QString
_device
;
GPSType
_type
;
const
std
::
atomic_bool
&
_requestStop
;
double
_surveyInAccMeters
;
int
_surveryInDurationSecs
;
...
...
src/comm/LinkManager.cc
View file @
b5ab11f7
...
...
@@ -586,7 +586,7 @@ void LinkManager::_updateAutoConnectLinks(void)
if
(
_autoConnectSettings
->
autoConnectRTKGPS
()
->
rawValue
().
toBool
()
&&
!
_toolbox
->
gpsManager
()
->
connected
())
{
qCDebug
(
LinkManagerLog
)
<<
"RTK GPS auto-connected"
<<
portInfo
.
portName
().
trimmed
();
_autoConnectRTKPort
=
portInfo
.
systemLocation
();
_toolbox
->
gpsManager
()
->
connectGPS
(
portInfo
.
systemLocation
());
_toolbox
->
gpsManager
()
->
connectGPS
(
portInfo
.
systemLocation
()
,
boardName
);
}
break
;
#endif
...
...
src/comm/USBBoardInfo.json
View file @
b5ab11f7
...
...
@@ -27,7 +27,8 @@
{
"vendorID"
:
1027
,
"productID"
:
24577
,
"boardClass"
:
"SiK Radio", "name"
:
"SiK Radio", "comment"
:
"3DR Radio on FTDI"
},
{
"vendorID"
:
4292
,
"productID"
:
60000
,
"boardClass"
:
"SiK Radio", "name"
:
"SiK Radio", "comment"
:
"SILabs Radio"
},
{
"vendorID"
:
5446
,
"productID"
:
424
,
"boardClass"
:
"RTK GPS", "name"
:
"RTK GPS", "comment"
:
"Ublox RTK GPS"
},
{
"vendorID"
:
5446
,
"productID"
:
424
,
"boardClass"
:
"RTK GPS", "name"
:
"U-blox RTK GPS", "comment"
:
"U-blox RTK GPS"
},
{
"vendorID"
:
1317
,
"productID"
:
42151
,
"boardClass"
:
"RTK GPS", "name"
:
"Trimble RTK GPS", "comment"
:
"Trimble RTK GPS"
},
{
"vendorID"
:
8352
,
"productID"
:
16732
,
"boardClass"
:
"OpenPilot", "name"
:
"OpenPilot OPLink"
},
{
"vendorID"
:
8352
,
"productID"
:
16733
,
"boardClass"
:
"OpenPilot", "name"
:
"OpenPilot CC3D"
},
...
...
src/ui/preferences/GeneralSettings.qml
View file @
b5ab11f7
...
...
@@ -402,7 +402,7 @@ QGCView {
anchors.horizontalCenter
:
parent
.
horizontalCenter
columns
:
2
QGCLabel
{
text
:
qsTr
(
"
Survey in accuracy
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Survey in accuracy
(U-blox only)
"
)
}
FactTextField
{
Layout.preferredWidth
:
_valueFieldWidth
fact
:
QGroundControl
.
settingsManager
.
rtkSettings
.
surveyInAccuracyLimit
...
...
src/ui/toolbar/GPSRTKIndicator.qml
View file @
b5ab11f7
...
...
@@ -69,9 +69,11 @@ Item {
QGCLabel
{
// during survey-in show the current accuracy, after that show the final accuracy
text
:
QGroundControl
.
gpsRtk
.
valid
.
value
?
qsTr
(
"
Accuracy:
"
)
:
qsTr
(
"
Current Accuracy:
"
)
visible
:
QGroundControl
.
gpsRtk
.
currentAccuracy
.
value
>
0
}
QGCLabel
{
text
:
QGroundControl
.
gpsRtk
.
currentAccuracy
.
valueString
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
visible
:
QGroundControl
.
gpsRtk
.
currentAccuracy
.
value
>
0
}
QGCLabel
{
text
:
qsTr
(
"
Satellites:
"
)
}
QGCLabel
{
text
:
QGroundControl
.
gpsRtk
.
numSatellites
.
value
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment