ArduPilot / ArduPilot/UAVLogViewer

Wind speed and direction preset doesn't work

Open
#423 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
258
Forks
296
PR merge metrics
No merged PRs in 30d

Description

Math functions wrap_360 and atan2 are not defined.
![EKF3_wind](https://github.com/user-attachments/assets/3bdd8e45-6b3b-4f2b-b53a-0799ad97919f)
Fix that worked for me, define these functions in /src/mavextra/mavextra.js:

```
window.atan2 = Math.atan2

window.wrap_360 = function (a) {
let w = a % 360
if (w < 0) w += 360
return w
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Open src/mavextra/mavextra.js and start by reproducing the wind speed and direction preset. Check the reported undefined wrap_360 and atan2 errors, then verify that the preset loads and displays wind speed and direction without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.