Skip to content

CoarseOrientation.uavcan: ANGLE_MULTIPLIER constant mismatches NORM comment #79

@huangfuluya

Description

@huangfuluya

In https://github.com/dronecan/DSDL/blob/master/uavcan/CoarseOrientation.uavcan, the comment states:

 Where NORM is 12, because it:
  - Fits the maximum range of a signed 5 bit integer
  - Allows to exactly represent the following angles:
    0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, and negatives

However the constant value is:
float32 ANGLE_MULTIPLIER = 4.7746482927568605
which equals 15 / pi, not 12 / pi (12 / pi ≈ 3.8197).
So the comment and constant are inconsistent. It looks like the intended NORM is 15, which is the max positive value of signed 5‑bit and maps π rad to 15 with 15‑degree increments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions