Changed the absolute latitude limit for visible satellites to 81.2 degrees

This commit is contained in:
Klaus Schmidinger 2013-10-30 10:11:55 +01:00
parent 26fbb921f5
commit 83a8d5a561
2 changed files with 5 additions and 4 deletions

View File

@ -8032,7 +8032,7 @@ Video Disk Recorder Revision History
the last replayed recording (if any) by pressing Ok repeatedly in the Recordings
menu.
2013-10-29: Version 2.1.3
2013-10-30: Version 2.1.3
- Changed the return value of cPositioner::HorizonLongitude() to 0 in case the
latitude of the antenna location is beyond +/-81 degrees.
@ -8046,3 +8046,4 @@ Video Disk Recorder Revision History
because it broke things for the "TechniSat AirStar 2" DVB-T card.
- The LIRC remote control now connects to the socket even if it doesn't yet exist when
VDR is started (thanks to Lars Hanisch).
- Changed the absolute latitude limit for visible satellites to 81.2 degrees.

View File

@ -7,7 +7,7 @@
* For an explanation (in German) of the theory behind the calculations see
* http://www.vdr-portal.de/board17-developer/board97-vdr-core/p1154305-grundlagen-und-winkelberechnungen-f%C3%BCr-h-h-diseqc-motor-antennenanlagen
*
* $Id: positioner.c 3.3 2013/10/20 09:30:03 kls Exp $
* $Id: positioner.c 3.4 2013/10/30 09:56:34 kls Exp $
*/
#include "positioner.h"
@ -15,7 +15,7 @@
#include "config.h"
#define SAT_EARTH_RATIO 0.1513 // the Earth's radius, divided by the distance from the Earth's center to the satellite
#define SAT_VISIBILITY_LAT 810 // the absolute latitude beyond which no satellite can be seen (degrees * 10)
#define SAT_VISIBILITY_LAT 812 // the absolute latitude beyond which no satellite can be seen (degrees * 10)
#define RAD(x) ((x) * M_PI / 1800)
#define DEG(x) ((x) * 1800 / M_PI)
@ -68,7 +68,7 @@ int cPositioner::CalcLongitude(int HourAngle)
int cPositioner::HorizonLongitude(ePositionerDirection Direction)
{
double Delta;
if (abs(Setup.SiteLat) < SAT_VISIBILITY_LAT)
if (abs(Setup.SiteLat) <= SAT_VISIBILITY_LAT)
Delta = acos(SAT_EARTH_RATIO / cos(RAD(Setup.SiteLat)));
else
Delta = 0;