mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
Check position subscriber before force-send flag when sending GPS global origin stream
This commit is contained in:
committed by
Daniel Agar
parent
539f874325
commit
fe48de6240
@@ -77,7 +77,8 @@ private:
|
|||||||
{
|
{
|
||||||
vehicle_local_position_s vehicle_local_position{};
|
vehicle_local_position_s vehicle_local_position{};
|
||||||
|
|
||||||
if (_force_next_send || _vehicle_local_position_sub.update(&vehicle_local_position)) {
|
if ((_vehicle_local_position_sub.updated() || _force_next_send)
|
||||||
|
&& _vehicle_local_position_sub.copy(&vehicle_local_position)) {
|
||||||
if (vehicle_local_position.xy_global && vehicle_local_position.z_global) {
|
if (vehicle_local_position.xy_global && vehicle_local_position.z_global) {
|
||||||
|
|
||||||
static constexpr double LLA_MIN_DIFF = 0.0000001; // ~11.132 mm at the equator
|
static constexpr double LLA_MIN_DIFF = 0.0000001; // ~11.132 mm at the equator
|
||||||
|
|||||||
Reference in New Issue
Block a user