ArduPilot / ArduPilot/UAVLogViewer
Wind speed and direction preset doesn't work
- 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.

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