Skip to content

Please, correct error in climb rate calculation. #10660

@and-sh

Description

@and-sh

Current Behavior

Manual climb rate does not match the one specified in the configurator.

Steps to Reproduce

Turn on althold. Measure climb rate. Check settings.

Expected behavior

Correct climb rate.

Suggested solution(s)

The problem is that on rcCommand deadband is applied twice.
First time in line 140
https://github.com/iNavFlight/inav/blob/master/src/main/navigation/navigation_multicopter.c#L140
second time in lines 149 and 153
https://github.com/iNavFlight/inav/blob/master/src/main/navigation/navigation_multicopter.c#L149
https://github.com/iNavFlight/inav/blob/master/src/main/navigation/navigation_multicopter.c#L153

You can fix it like this, for example.
Image
It is tested and work well.

Removing deadband from lines 151 and 149 is not correct, since applyDeadbandRescaled changes ThrottleIdleValue in rcCommand. And it again produce a mess.

Additional context

This problem was in all versions since 3.0.0. I didn't look further.

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