From 47a57d039afe4fb69e55d244eda674cc311a992d Mon Sep 17 00:00:00 2001 From: "wanling040@gmail.com" Date: Wed, 27 Jul 2022 01:13:30 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20=E5=A4=A9=E6=B0=A3=E8=B3=87=E8=A8=8A?= =?UTF-8?q?=E6=9C=89=E7=84=A1=E8=B3=87=E6=96=99=E7=9A=84=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Quartz/Jobs/CalcPowerStationJob.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs b/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs index 3fb142b..31cfd0b 100644 --- a/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs +++ b/SolarPower/Quartz/Jobs/CalcPowerStationJob.cs @@ -636,8 +636,8 @@ namespace SolarPower.Quartz.Jobs if (powerStation.Coordinate != null) { var powerLocation = powerStation.Coordinate.Split(','); - double p1 = Convert.ToDouble(powerLocation[0]); - double p2 = Convert.ToDouble(powerLocation[1]); + double p1 = Convert.ToDouble(powerLocation[0].Replace("°", string.Empty)); + double p2 = Convert.ToDouble(powerLocation[1].Replace("°", string.Empty)); double dLat = Convert.ToDouble(Location.Lat); double dLon = Convert.ToDouble(Location.Lon); double x = Math.Pow(p1 - dLat, 2) ;