Merge pull request 'feat: 修改天气风速为m/s' (#56) from feature_dzc into test

Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/56
This commit is contained in:
2026-02-05 09:20:35 +00:00
2 changed files with 3 additions and 2 deletions
@@ -117,7 +117,8 @@ public class OpenMeteoWeatherProvider implements IWeatherProvider {
// 风速(m/s)
if (current.has("wind_speed_10m")) {
weatherData.setWindSpeed(current.get("wind_speed_10m").asDouble());
double windSpeedKmh = current.get("wind_speed_10m").asDouble();
weatherData.setWindSpeed(windSpeedKmh/3.6); // km/h -> m/s
}
// 风向(°)
@@ -198,7 +198,7 @@ public class QWeatherProvider implements IWeatherProvider {
// 风速(km/h 转换为 m/s)
if (now.has("windSpeed")) {
double windSpeedKmh = now.get("windSpeed").asDouble();
weatherData.setWindSpeed(windSpeedKmh / 3.6);
weatherData.setWindSpeed(windSpeedKmh / 3.6); // km/h -> m/s
}
// 风向