Skip to content

Heads-up that this change has a subtle ripple effect for setGuidedModeWP callers that don't explicitly set #3727

Description

@meee1

Heads-up that this change has a subtle ripple effect for setGuidedModeWP callers that don't explicitly set
Locationwp.frame. Since Locationwp.frame defaults to 0 (= MAV_FRAME.GLOBAL, i.e. AMSL), the previously hardcoded
GLOBAL_RELATIVE_ALT_INT was silently normalizing those calls. With this fix in place, the same calls now go out as
AMSL on Copter, which can mean a commanded descent below ground if the caller was passing a relative altitude.

Quick grep of the affected sites in the repo:

  • Controls/FollowMe.cs:177 — Follow Me builds Locationwp with only id/alt/lat/lng
  • Utilities/httpserver.cs:740 and :776 — the /guided HTTP endpoints
  • Swarm/FollowPath.cs:50
  • ExtLibs/ExtGuided/ExtGuidedPlugin.cs:61
  • Plugins/example14-mass.cs:129

Each of these would need frame = (byte)MAV_FRAME.GLOBAL_RELATIVE_ALT (or whatever the intended frame actually is)
added to preserve pre-fix behavior. The FlyToHere path in FlightData.cs is fine since it threads GuidedMode.frame
through.

@robertlong13 @EosBandi @meee1

Originally posted by @MohammadAdib in #3718 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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