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

Ublox add UBX-RXM-RTCM for RTCM input status #21595

Merged
merged 3 commits into from
Jun 9, 2023

Conversation

AlexKlimaj
Copy link
Member

@AlexKlimaj AlexKlimaj commented May 15, 2023

This PR adds support for the UBX-RXM-RTCM message which gives feedback on whether the ublox module is using the RTCM data that is being sent to it.

Requires PX4/PX4-GPSDrivers#130

I also discovered a bug in the uavcan rtcm publisher. When the mavlink stream goes down there is a chance that a second instance of the gps_inject_data topic is created. When that happens the uavcan publisher isn't setup to handle switching streams.

I mirrored the gps driver instance switching logic but discovered it will get stuck on a non existing gps_inject_data instance.

@julianoes Can you take a look?

nsh> gps status
INFO  [gps] Main GPS
INFO  [gps] protocol: UBX
INFO  [gps] status: OK, port: /dev/ttyS0, baudrate: 921600
INFO  [gps] sat info: disabled
INFO  [gps] rate reading:                  925 B/s
INFO  [gps] rate position:                1.00 Hz
INFO  [gps] rate velocity:                1.00 Hz
INFO  [gps] rate publication:             1.00 Hz
INFO  [gps] rate RTCM injection:         40.02 Hz
 sensor_gps
    timestamp: 244102098 (0.781204 seconds ago)
    timestamp_sample: 0
    time_utc_usec: 1684174039124558
    device_id: 11141125 (Type: 0xAA, SERIAL:0 (0x00))
    lat: 406203100
    lon: -1118287492
    alt: 1433548
    alt_ellipsoid: 1414764
    s_variance_m_s: 0.76600
    c_variance_rad: 2.39044
    eph: 6.32000
    epv: 10.58200
    hdop: 1.12000
    vdop: 1.75000
    noise_per_ms: 72
    jamming_indicator: 13
    vel_m_s: 0.18500
    vel_n_m_s: -0.00900
    vel_e_m_s: 0.18500
    vel_d_m_s: -0.06700
    cog_rad: 5.42557
    timestamp_time_relative: 0
    heading: nan
    heading_offset: -1.57080
    heading_accuracy: 0.00000
    rtcm_injection_rate: 40.01656
    automatic_gain_control: 0
    fix_type: 4
    jamming_state: 2
    spoofing_state: 1
    vel_ned_valid: True
    satellites_used: 11
    selected_rtcm_instance: 0
    rtcm_crc_failed: False
    rtcm_msg_used: 2

@dagar
Copy link
Member

dagar commented May 15, 2023

Nice!

@AlexKlimaj AlexKlimaj changed the title Ublox add UBX-RXM-RTCM for RTCM input status [WIP] Ublox add UBX-RXM-RTCM for RTCM input status May 16, 2023
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-may-16-2023/32137/1

julianoes
julianoes previously approved these changes May 17, 2023
Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct!

@AlexKlimaj
Copy link
Member Author

I think we need to rework the instance switching logic to avoid the bug I ran into. @dagar suggested we always subscribe to both but only use one.

@junwoo091400 junwoo091400 added the Drivers 🔧 Sensors, Actuators, etc label May 17, 2023
@AlexKlimaj AlexKlimaj changed the title [WIP] Ublox add UBX-RXM-RTCM for RTCM input status Ublox add UBX-RXM-RTCM for RTCM input status May 17, 2023
@AlexKlimaj AlexKlimaj requested a review from julianoes May 17, 2023 17:05
julianoes
julianoes previously approved these changes May 17, 2023
@AlexKlimaj
Copy link
Member Author

GPS submodule PR is in. Submodule now points to the most recent commit in the GPS main branch.

julianoes
julianoes previously approved these changes Jun 7, 2023
Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get it in.

@julianoes
Copy link
Contributor

I cleaned up the commits, rebased on top of main and force-pushed. I'll merge it if CI doesn't look worse than main.

@julianoes
Copy link
Contributor

I assume CI is unrelated.

@julianoes julianoes merged commit c3db4f5 into PX4:main Jun 9, 2023
81 of 83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Drivers 🔧 Sensors, Actuators, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants