Go to the documentation of this file.
18 #define SAT_EARTH_RATIO 0.1513 // the Earth's radius, divided by the distance from the Earth's center to the satellite
19 #define SAT_VISIBILITY_LAT 812 // the absolute latitude beyond which no satellite can be seen (degrees * 10)
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);
static void DestroyPositioner(void)
Destroys a previously created positioner.
#define SAT_VISIBILITY_LAT
static int NormalizeAngle(int Angle)
Normalizes the given Angle into the range -1800...1800.
int HardLimitLongitude(ePositionerDirection Direction) const
Returns the longitude of the positioner's hard limit in the given Direction.
virtual void GotoPosition(uint Number, int Longitude)
Move the dish to the satellite position stored under the given Number.
virtual int CurrentLongitude(void) const
Returns the longitude the dish currently points to.
static cPositioner * positioner
static cPositioner * GetPositioner(void)
Returns a previously created positioner.
virtual bool IsMoving(void) const
Returns true if the dish is currently moving as a result of a call to GotoPosition() or GotoAngle().
A steerable satellite dish generally points to the south on the northern hemisphere,...
virtual void GotoAngle(int Longitude)
Move the dish to the given angular position.
static int HorizonLongitude(ePositionerDirection Direction)
Returns the longitude of the satellite position that is just at the horizon when looking in the given...
static int CalcLongitude(int HourAngle)
Returns the longitude of the satellite position the dish points at when the positioner is moved to th...
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 CalcHourAngle(int Longitude)
Takes the longitude and latitude of the dish location from the system setup and the given Longitude t...
uint64_t Elapsed(void) const