Skip to content

as_angles parameter in the init function have no effect in tilt.py on the estimate method #138

@rezder

Description

@rezder

The code documentation indicate that is should and it use work like that.

ahrs/ahrs/filters/tilt.py

Lines 304 to 306 in c83bd11

>>> tilt = Tilt(as_angles=True)
>>> tilt.estimate(acc=acc_data, mag=mag_data)
array([ 76.15281566 -24.66891862 146.02634429])

self.as_angles is never used in the code anywhere.
self.representation is never used in the estimate method only the function parameter.

My best guess is you want insert "angles" in self.representation when as_angles is True in the init function
and you want to use self.representation as default to the representation parameter in the estimate
method.

Found the problem when a test of mine failed after upgrade.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions