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
09bde0c7
Commit
09bde0c7
authored
Apr 10, 2017
by
Don Gagne
Committed by
GitHub
Apr 10, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4955 from DonLakeFlyer/RTK
RTK fixes
parents
0dbb19aa
0077eebe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
17 deletions
+23
-17
GPSManager.cc
src/GPS/GPSManager.cc
+6
-11
GPSProvider.cc
src/GPS/GPSProvider.cc
+3
-3
RTCMMavlink.cc
src/GPS/RTCM/RTCMMavlink.cc
+11
-2
QGCLoggingCategory.cc
src/QGCLoggingCategory.cc
+1
-0
QGCLoggingCategory.h
src/QGCLoggingCategory.h
+1
-0
USBBoardInfo.json
src/comm/USBBoardInfo.json
+1
-1
No files found.
src/GPS/GPSManager.cc
View file @
09bde0c7
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#include "GPSManager.h"
#include "GPSManager.h"
#include
<QDebug>
#include
"QGCLoggingCategory.h"
GPSManager
::
GPSManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
GPSManager
::
GPSManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
,
toolbox
)
:
QGCTool
(
app
,
toolbox
)
...
@@ -35,26 +35,21 @@ void GPSManager::connectGPS(const QString& device)
...
@@ -35,26 +35,21 @@ void GPSManager::connectGPS(const QString& device)
//create RTCM device
//create RTCM device
_rtcmMavlink
=
new
RTCMMavlink
(
*
_toolbox
);
_rtcmMavlink
=
new
RTCMMavlink
(
*
_toolbox
);
connect
(
_gpsProvider
,
SIGNAL
(
RTCMDataUpdate
(
QByteArray
)),
_rtcmMavlink
,
connect
(
_gpsProvider
,
&
GPSProvider
::
RTCMDataUpdate
,
_rtcmMavlink
,
&
RTCMMavlink
::
RTCMDataUpdate
);
SLOT
(
RTCMDataUpdate
(
QByteArray
)));
//test: connect to position update
//test: connect to position update
connect
(
_gpsProvider
,
SIGNAL
(
positionUpdate
(
GPSPositionMessage
)),
this
,
connect
(
_gpsProvider
,
&
GPSProvider
::
positionUpdate
,
this
,
&
GPSManager
::
GPSPositionUpdate
);
SLOT
(
GPSPositionUpdate
(
GPSPositionMessage
)));
connect
(
_gpsProvider
,
&
GPSProvider
::
satelliteInfoUpdate
,
this
,
&
GPSManager
::
GPSSatelliteUpdate
);
connect
(
_gpsProvider
,
SIGNAL
(
satelliteInfoUpdate
(
GPSSatelliteMessage
)),
this
,
SLOT
(
GPSSatelliteUpdate
(
GPSSatelliteMessage
)));
}
}
void
GPSManager
::
GPSPositionUpdate
(
GPSPositionMessage
msg
)
void
GPSManager
::
GPSPositionUpdate
(
GPSPositionMessage
msg
)
{
{
qDebug
(
"GPS: got position update: alt=%i, long=%i, lat=%i"
,
qCDebug
(
RTKGPSLog
)
<<
QString
(
"GPS: got position update: alt=%1, long=%2, lat=%3"
).
arg
(
msg
.
position_data
.
alt
).
arg
(
msg
.
position_data
.
lon
).
arg
(
msg
.
position_data
.
lat
);
msg
.
position_data
.
alt
,
msg
.
position_data
.
lon
,
msg
.
position_data
.
lat
);
}
}
void
GPSManager
::
GPSSatelliteUpdate
(
GPSSatelliteMessage
msg
)
void
GPSManager
::
GPSSatelliteUpdate
(
GPSSatelliteMessage
msg
)
{
{
q
Debug
(
"GPS: got satellite info update, %i satellites"
,
(
int
)
msg
.
satellite_data
.
count
);
q
CDebug
(
RTKGPSLog
)
<<
QString
(
"GPS: got satellite info update, %1 satellites"
).
arg
(
(
int
)
msg
.
satellite_data
.
count
);
}
}
void
GPSManager
::
cleanup
()
void
GPSManager
::
cleanup
()
...
...
src/GPS/GPSProvider.cc
View file @
09bde0c7
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include "GPSProvider.h"
#include "GPSProvider.h"
#include "QGCLoggingCategory.h"
#define GPS_RECEIVE_TIMEOUT 1200
#define GPS_RECEIVE_TIMEOUT 1200
...
@@ -96,7 +97,7 @@ void GPSProvider::run()
...
@@ -96,7 +97,7 @@ void GPSProvider::run()
}
}
}
}
}
}
q
Debug
(
)
<<
"Exiting GPS thread"
;
q
CDebug
(
RTKGPSLog
)
<<
"Exiting GPS thread"
;
}
}
GPSProvider
::
GPSProvider
(
const
QString
&
device
,
bool
enableSatInfo
,
const
std
::
atomic_bool
&
requestStop
)
GPSProvider
::
GPSProvider
(
const
QString
&
device
,
bool
enableSatInfo
,
const
std
::
atomic_bool
&
requestStop
)
...
@@ -165,8 +166,7 @@ int GPSProvider::callback(GPSCallbackType type, void *data1, int data2)
...
@@ -165,8 +166,7 @@ int GPSProvider::callback(GPSCallbackType type, void *data1, int data2)
case
GPSCallbackType
:
:
surveyInStatus
:
case
GPSCallbackType
:
:
surveyInStatus
:
{
{
SurveyInStatus
*
status
=
(
SurveyInStatus
*
)
data1
;
SurveyInStatus
*
status
=
(
SurveyInStatus
*
)
data1
;
qInfo
(
"Survey-in status: %is cur accuracy: %imm valid: %i active: %i"
,
qCDebug
(
RTKGPSLog
)
<<
QString
(
"Survey-in status: %1s cur accuracy: %2mm valid: %3 active: %4"
).
arg
(
status
->
duration
).
arg
(
status
->
mean_accuracy
).
arg
((
int
)(
status
->
flags
&
1
)).
arg
((
int
)((
status
->
flags
>>
1
)
&
1
));
status
->
duration
,
status
->
mean_accuracy
,
(
int
)(
status
->
flags
&
1
),
(
int
)((
status
->
flags
>>
1
)
&
1
));
}
}
break
;
break
;
...
...
src/GPS/RTCM/RTCMMavlink.cc
View file @
09bde0c7
...
@@ -41,16 +41,25 @@ void RTCMMavlink::RTCMDataUpdate(QByteArray message)
...
@@ -41,16 +41,25 @@ void RTCMMavlink::RTCMDataUpdate(QByteArray message)
memcpy
(
&
mavlinkRtcmData
.
data
,
message
.
data
(),
message
.
size
());
memcpy
(
&
mavlinkRtcmData
.
data
,
message
.
data
(),
message
.
size
());
sendMessageToVehicle
(
mavlinkRtcmData
);
sendMessageToVehicle
(
mavlinkRtcmData
);
}
else
{
}
else
{
//we need to fragment
// We need to fragment
static
uint8_t
sequenceId
=
0
;
// Sequence id is used to indicate that the individual fragements belong to the same set
uint8_t
fragmentId
=
0
;
// Fragment id indicates the fragement within a set
int
start
=
0
;
int
start
=
0
;
while
(
start
<
message
.
size
())
{
while
(
start
<
message
.
size
())
{
int
length
=
std
::
min
(
message
.
size
()
-
start
,
maxMessageLength
);
int
length
=
std
::
min
(
message
.
size
()
-
start
,
maxMessageLength
);
mavlinkRtcmData
.
flags
=
1
;
//fragmented
mavlinkRtcmData
.
flags
=
1
;
// LSB set indicates messsage is fragmented
mavlinkRtcmData
.
flags
|=
fragmentId
++
<<
1
;
// Next 2 bits are fragment id
mavlinkRtcmData
.
flags
|=
sequenceId
++
<<
3
;
// Next 5 bits are sequence id
mavlinkRtcmData
.
len
=
length
;
mavlinkRtcmData
.
len
=
length
;
memcpy
(
&
mavlinkRtcmData
.
data
,
message
.
data
()
+
start
,
length
);
memcpy
(
&
mavlinkRtcmData
.
data
,
message
.
data
()
+
start
,
length
);
sendMessageToVehicle
(
mavlinkRtcmData
);
sendMessageToVehicle
(
mavlinkRtcmData
);
start
+=
length
;
start
+=
length
;
}
}
if
(
sequenceId
==
0x1F
)
{
sequenceId
=
0
;
}
}
}
}
}
...
...
src/QGCLoggingCategory.cc
View file @
09bde0c7
...
@@ -22,6 +22,7 @@ QGC_LOGGING_CATEGORY(MissionCommandsLog, "MissionCommandsLog")
...
@@ -22,6 +22,7 @@ QGC_LOGGING_CATEGORY(MissionCommandsLog, "MissionCommandsLog")
QGC_LOGGING_CATEGORY
(
MissionItemLog
,
"MissionItemLog"
)
QGC_LOGGING_CATEGORY
(
MissionItemLog
,
"MissionItemLog"
)
QGC_LOGGING_CATEGORY
(
ParameterManagerLog
,
"ParameterManagerLog"
)
QGC_LOGGING_CATEGORY
(
ParameterManagerLog
,
"ParameterManagerLog"
)
QGC_LOGGING_CATEGORY
(
GeotaggingLog
,
"GeotaggingLog"
)
QGC_LOGGING_CATEGORY
(
GeotaggingLog
,
"GeotaggingLog"
)
QGC_LOGGING_CATEGORY
(
RTKGPSLog
,
"RTKGPSLog"
)
QGCLoggingCategoryRegister
*
_instance
=
NULL
;
QGCLoggingCategoryRegister
*
_instance
=
NULL
;
const
char
*
QGCLoggingCategoryRegister
::
_filterRulesSettingsGroup
=
"LoggingFilters"
;
const
char
*
QGCLoggingCategoryRegister
::
_filterRulesSettingsGroup
=
"LoggingFilters"
;
...
...
src/QGCLoggingCategory.h
View file @
09bde0c7
...
@@ -24,6 +24,7 @@ Q_DECLARE_LOGGING_CATEGORY(MissionCommandsLog)
...
@@ -24,6 +24,7 @@ Q_DECLARE_LOGGING_CATEGORY(MissionCommandsLog)
Q_DECLARE_LOGGING_CATEGORY
(
MissionItemLog
)
Q_DECLARE_LOGGING_CATEGORY
(
MissionItemLog
)
Q_DECLARE_LOGGING_CATEGORY
(
ParameterManagerLog
)
Q_DECLARE_LOGGING_CATEGORY
(
ParameterManagerLog
)
Q_DECLARE_LOGGING_CATEGORY
(
GeotaggingLog
)
Q_DECLARE_LOGGING_CATEGORY
(
GeotaggingLog
)
Q_DECLARE_LOGGING_CATEGORY
(
RTKGPSLog
)
/// @def QGC_LOGGING_CATEGORY
/// @def QGC_LOGGING_CATEGORY
/// This is a QGC specific replacement for Q_LOGGING_CATEGORY. It will register the category name into a
/// This is a QGC specific replacement for Q_LOGGING_CATEGORY. It will register the category name into a
...
...
src/comm/USBBoardInfo.json
View file @
09bde0c7
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
{
"vendorID"
:
1027
,
"productID"
:
24597
,
"boardClass"
:
"SiK Radio", "name"
:
"SiK Radio", "comment"
:
"3DR Radio"
},
{
"vendorID"
:
1027
,
"productID"
:
24597
,
"boardClass"
:
"SiK Radio", "name"
:
"SiK Radio", "comment"
:
"3DR Radio"
},
{
"vendorID"
:
4292
,
"productID"
:
600000
,
"boardClass"
:
"SiK Radio", "name"
:
"SiK Radio", "comment"
:
"SILabs Radio"
},
{
"vendorID"
:
4292
,
"productID"
:
600000
,
"boardClass"
:
"SiK Radio", "name"
:
"SiK Radio", "comment"
:
"SILabs Radio"
},
{
"vendorID"
:
546
,
"productID"
:
424
,
"boardClass"
:
"RTK GPS", "name"
:
"RTK GPS", "comment"
:
"Ublox RTK GPS"
},
{
"vendorID"
:
54
4
6
,
"productID"
:
424
,
"boardClass"
:
"RTK GPS", "name"
:
"RTK GPS", "comment"
:
"Ublox 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"
},
...
...
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