18 #define SAT_EARTH_RATIO 0.1513
19 #define SAT_VISIBILITY_LAT 812
21 #define RAD(x) ((x) * M_PI / 1800)
22 #define DEG(x) ((x) * 1800 / M_PI)
63 double Delta =
RAD(HourAngle);
64 double Alpha = Delta - asin(sin(M_PI - Delta) * cos(Lat) *
SAT_EARTH_RATIO);
103 dsyslog(
"moving positioner to position %d, longitude %d", Number, Longitude);
110 dsyslog(
"moving positioner to longitude %d", Longitude);
A steerable satellite dish generally points to the south on the northern hemisphere,...
static cPositioner * GetPositioner(void)
Returns a previously created positioner.
static cPositioner * positioner
static void DestroyPositioner(void)
Destroys a previously created positioner.
void StartMovementTimer(int Longitude)
Starts a timer that estimates how long it will take to move the dish from the current position to the...
static int NormalizeAngle(int Angle)
Normalizes the given Angle into the range -1800...1800.
virtual bool IsMoving(void) const
Returns true if the dish is currently moving as a result of a call to GotoPosition() or GotoAngle().
static int CalcHourAngle(int Longitude)
Takes the longitude and latitude of the dish location from the system setup and the given Longitude t...
virtual int CurrentLongitude(void) const
Returns the longitude the dish currently points to.
static int CalcLongitude(int HourAngle)
Returns the longitude of the satellite position the dish points at when the positioner is moved to th...
virtual void GotoPosition(uint Number, int Longitude)
Move the dish to the satellite position stored under the given Number.
int HardLimitLongitude(ePositionerDirection Direction) const
Returns the longitude of the positioner's hard limit in the given Direction.
static int HorizonLongitude(ePositionerDirection Direction)
Returns the longitude of the satellite position that is just at the horizon when looking in the given...
virtual void GotoAngle(int Longitude)
Move the dish to the given angular position.
uint64_t Elapsed(void) const
void Set(int Ms=0)
Sets the timer.
#define SAT_VISIBILITY_LAT