Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wind_est_replay: report scale instead of inverse_scale #23182

Merged
merged 1 commit into from
May 24, 2024

Conversation

bresch
Copy link
Member

@bresch bresch commented May 24, 2024

Solved Problem

This script returns the scale state but in reality, it is the inverse of the airspeed scale factor.

Solution

The estimator internally estimates the scale inverse, but the interface should be the scale as "airspeed_corrected = scale * airspeed" to be consistent with the reported tas_scale_raw and the ASPD_SCALE_X params.

float get_tas_scale() { return 1.f / math::constrain(_state(INDEX_TAS_SCALE), 0.1f, 10.0f); }

The estimator internally estimates the scale inverse, but the interface
should be the scale as "airspeed_corrected = scale * airspeed"
@bresch bresch merged commit ccbcbbe into main May 24, 2024
87 of 93 checks passed
@bresch bresch deleted the pr-wind_est_replay_scale_inverse branch May 24, 2024 15:25
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.

1 participant