debug: 天氣資訊有無資料的問題

This commit is contained in:
wanling040@gmail.com 2022-07-27 01:13:30 +08:00
parent b9f5567faf
commit 47a57d039a

View File

@ -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) ;