Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements in UAVCAN GNSS bridge #6980

Merged
merged 7 commits into from Apr 6, 2017

Conversation

Projects
None yet
3 participants
@pavel-kirienko
Copy link
Member

commented Apr 5, 2017

  • Added support for the new Fix2 data type. The bridge automatically switches from Fix to Fix2 depending on what is available on the bus.

  • Fixed time base conversion. PX4 uses UTC internally, whereas UAVCAN GNSS fix message may contain either UTC, GPS, or TAI time. Necessary conversion code has been added.

  • If there are no UAVCAN nodes that provide GNSS position data, the bridge will be broadcasting this data itself. Broadcasting stops automatically if another node that provides GNSS data is detected.

Changes have been tested on Pixracer.

@@ -43,25 +43,48 @@
#include <drivers/drv_hrt.h>
#include <systemlib/err.h>
#include <mathlib/mathlib.h>
#include <algorithm>

This comment has been minimized.

Copy link
@bkueng

bkueng Apr 6, 2017

Member

This cannot be used on NuttX

This comment has been minimized.

Copy link
@pavel-kirienko

pavel-kirienko Apr 6, 2017

Author Member

Fixed.

int res = _sub_fix.start(FixCbBinder(this, &UavcanGnssBridge::gnss_fix_sub_cb));
int res = _pub_fix2.init(uavcan::TransferPriority::MiddleLower);
if (res < 0) {
warnx("GNSS fix2 pub failed %i", res);

This comment has been minimized.

Copy link
@bkueng

bkueng Apr 6, 2017

Member

Please use PX4_{INFO,WARN,ERR}, warnx is deprecated.

This comment has been minimized.

Copy link
@pavel-kirienko

pavel-kirienko Apr 6, 2017

Author Member

Fixed.

@bkueng

bkueng approved these changes Apr 6, 2017

Copy link
Member

left a comment

Thanks

@LorenzMeier LorenzMeier merged commit 5788701 into master Apr 6, 2017

6 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/sitl/pr Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 17.831%
Details
semaphoreci The build passed on Semaphore.
Details

@dagar dagar deleted the uavcan_gnss_broadcasting branch Nov 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.