// uv转换为风速风向
uv2wind(u, v) {
const wsd = []
wsd[0] = Math.sqrt(u * u + v * v)
let dir = 270.0 - Math.atan2(v, u) * 180.0 / Math.PI
if (dir >= 360) dir = dir - 360
if (dir < 0) dir = dir + 360
wsd[1] = dir
return wsd
},
// 风速风向转为uv
wind2uv(speed, dir) {
const tmp = (270.0 - dir) * Math.PI / 180.0
const uv = []
uv[0] = speed * Math.cos(tmp)
uv[1] = speed * Math.sin(tmp)
return uv
},
03-16
1293
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-22
1147
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-28
1553
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-08
2246
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交