mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
frontend: avoid division by zero
This commit is contained in:
@@ -2483,8 +2483,11 @@ double calcAzimuth(double SatLon, double SiteLat, double SiteLon, int Height_ove
|
|||||||
if (alfa_r_north < 0)
|
if (alfa_r_north < 0)
|
||||||
Azimuth = 180 + Deg(ATAN(alfa_ry / alfa_r_north));
|
Azimuth = 180 + Deg(ATAN(alfa_ry / alfa_r_north));
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if(alfa_r_north == 0)
|
||||||
|
alfa_r_north = 0.0001;;
|
||||||
Azimuth = Rev(360 + Deg(ATAN(alfa_ry / alfa_r_north)));
|
Azimuth = Rev(360 + Deg(ATAN(alfa_ry / alfa_r_north)));
|
||||||
|
}
|
||||||
return Azimuth;
|
return Azimuth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user