Skip to content

Warning if ground AMSL differs from altitudes#191

Open
zarcell wants to merge 2 commits into
devfrom
warning-ground-amsl-drone-altitudes
Open

Warning if ground AMSL differs from altitudes#191
zarcell wants to merge 2 commits into
devfrom
warning-ground-amsl-drone-altitudes

Conversation

@zarcell
Copy link
Copy Markdown
Contributor

@zarcell zarcell commented May 12, 2026

Fixes #185.

@zarcell zarcell self-assigned this May 12, 2026
@zarcell zarcell linked an issue May 12, 2026 that may be closed by this pull request
@zarcell zarcell requested a review from ntamas May 12, 2026 11:05
Copy link
Copy Markdown
Contributor

@vasarhelyi vasarhelyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few small comments from a UI perspective, as an "outsider" to JS/TS code...

uav.errors.includes(UAVErrorCode.ON_GROUND) ||
uav.errors.includes(UAVErrorCode.MOTORS_RUNNING_WHILE_ON_GROUND)
) {
return true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would exclude drones that have some severe error. Basically any error code >= 128 (see https://docs.skybrush.io/public/skybrush-protocol-spec/latest/errors.html)

return false;
}

// Fall back to AHL only when the UAV does not provide a more explicit state.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What has the AHL got to do with our AMSL warning? It should not be related... Why do we need this extra possibility to return true? The on ground status codes are not enough?

return false;
}

return selectGroundAMSLWarning(state) ? Status.WARNING : Status.SUCCESS;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not disable further items in the show control panel, the warning is enough, this is not an error and there could be use cases when one wants to have a different AMSL on purpose.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning if ground AMSL differs from drone altitudes

2 participants