Skip to content

[Bug] Incorrect ADSB Heading #24780

@qtweng

Description

@qtweng

Describe the bug

ADSB heading angle handling is incorrect. Transponder report message reference states heading is [-pi, pi] where 0 is north.
Currently, the driver code adds pi to the heading angle before wrapping to pi causing 0 heading to be south in the uorb message. This is reconciled in adsb conflict handling by adding 180 deg and in adsb vehicle mavlink msg by adding pi.

To Reproduce

  1. Flash drone with transponder report enabled in dds_topics.yaml
  2. Prepare drone with adsb receiver
  3. Connect companion computer through uxrce
  4. Observe angle difference between qgroundcontrol GUI and TransponderReport message

Expected behavior

When obtaining heading from ADSB, heading should be 0 when vehicle is pointing north.

Screenshot / Media

No response

Flight Log

No response

Software Version

1.15.2

Flight controller

Cube Orange Plus

Vehicle type

Fixed Wing

How are the different components wired up (including port information)

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions