debug: 天氣資訊有無資料的問題
This commit is contained in:
parent
b9f5567faf
commit
47a57d039a
@ -636,8 +636,8 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
if (powerStation.Coordinate != null)
|
if (powerStation.Coordinate != null)
|
||||||
{
|
{
|
||||||
var powerLocation = powerStation.Coordinate.Split(',');
|
var powerLocation = powerStation.Coordinate.Split(',');
|
||||||
double p1 = Convert.ToDouble(powerLocation[0]);
|
double p1 = Convert.ToDouble(powerLocation[0].Replace("°", string.Empty));
|
||||||
double p2 = Convert.ToDouble(powerLocation[1]);
|
double p2 = Convert.ToDouble(powerLocation[1].Replace("°", string.Empty));
|
||||||
double dLat = Convert.ToDouble(Location.Lat);
|
double dLat = Convert.ToDouble(Location.Lat);
|
||||||
double dLon = Convert.ToDouble(Location.Lon);
|
double dLon = Convert.ToDouble(Location.Lon);
|
||||||
double x = Math.Pow(p1 - dLat, 2) ;
|
double x = Math.Pow(p1 - dLat, 2) ;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user