Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
4351b765
Commit
4351b765
authored
Jul 15, 2017
by
Don Gagne
Committed by
GitHub
Jul 15, 2017
Browse files
Merge pull request #5444 from DonLakeFlyer/BogusLatLon
Handle bogus lat/lon from ArduPilot
parents
bc4ee574
877b3cce
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/MissionManager/MissionController.cc
View file @
4351b765
...
@@ -158,7 +158,10 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque
...
@@ -158,7 +158,10 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque
qWarning
()
<<
"First item is not settings item"
;
qWarning
()
<<
"First item is not settings item"
;
return
;
return
;
}
}
settingsItem
->
setCoordinate
(
newMissionItems
[
0
]
->
coordinate
());
MissionItem
*
fakeHomeItem
=
newMissionItems
[
0
];
if
(
fakeHomeItem
->
coordinate
().
latitude
()
!=
0
||
fakeHomeItem
->
coordinate
().
longitude
()
!=
0
)
{
settingsItem
->
setCoordinate
(
fakeHomeItem
->
coordinate
());
}
i
=
1
;
i
=
1
;
}
}
...
...
src/Vehicle/Vehicle.cc
View file @
4351b765
...
@@ -681,8 +681,8 @@ void Vehicle::_handleGlobalPositionInt(mavlink_message_t& message)
...
@@ -681,8 +681,8 @@ void Vehicle::_handleGlobalPositionInt(mavlink_message_t& message)
mavlink_global_position_int_t
globalPositionInt
;
mavlink_global_position_int_t
globalPositionInt
;
mavlink_msg_global_position_int_decode
(
&
message
,
&
globalPositionInt
);
mavlink_msg_global_position_int_decode
(
&
message
,
&
globalPositionInt
);
// ArduPilot sends bogus GLOBAL_POSITION_INT messages with lat/lat
/alt 0/
0/0 even when it has not gps signal
// ArduPilot sends bogus GLOBAL_POSITION_INT messages with lat/lat
0/0 even when it has not gps signal
if
(
globalPositionInt
.
lat
==
0
&&
globalPositionInt
.
lon
==
0
&&
globalPositionInt
.
alt
==
0
)
{
if
(
globalPositionInt
.
lat
==
0
&&
globalPositionInt
.
lon
==
0
)
{
return
;
return
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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