Skip to content

180° heading flip at init!/reinit! #254

Description

@ufechner7
  • 180° heading flip at init!/reinit! for wings whose CAD-frame position
    sits only millimeters off the transform's rotation axis (e.g. the
    ram_air_kite OBJ-mesh wing once its tethers are pre-stretched beyond
    ~51 m of standoff): calc_R_t_to_w's tangent-frame azimuthal axis is
    derived from the wing position's tiny horizontal component, whose sign
    can flip from a millimeter-scale change, flipping the whole frame 180°;
    the existing degeneracy guard only caught exact zero. Widened to
    hypot(x, y) < 1e-2 * norm(pos) (within 0.57° of zenith) so the frame is
    deterministic near vertical.
  • apply_heading! cannot correct the flip above (or any other upstream
    twist) because its no-ref-points branch re-applied the azimuth/elevation
    rotation to Q_b_to_w, which apply_azimuth_elevation! had already
    rotated — the double-application cancelled the twist out of the measured
    heading, so the solved correction was ≈ 0. Now measures the current
    heading directly from the body's actual world orientation, so the solved
    delta always lands exactly on transform.heading regardless of any twist
    picked up earlier in the transform chain.

Fixed in StableAWEModels 1.0.4, but not here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions