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 int CalcHourAngle(int Longitude)
Takes the longitude and latitude of the dish location from the system setup and the given Longitude t...
static int NormalizeAngle(int Angle)
Normalizes the given Angle into the range -1800...1800.
virtual void GotoPosition(uint Number, int Longitude)
Move the dish to the satellite position stored under the given Number.
static cPositioner * positioner
static cPositioner * GetPositioner(void)
Returns a previously created positioner.
A steerable satellite dish generally points to the south on the northern hemisphere, and to the north on the southern hemisphere (unless you're located directly on the equator, in which case the general direction is "up").
virtual void GotoAngle(int Longitude)
Move the dish to the given angular position.
virtual bool IsMoving(void) const
Returns true if the dish is currently moving as a result of a call to GotoPosition() or GotoAngle()...
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...
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 HorizonLongitude(ePositionerDirection Direction)
Returns the longitude of the satellite position that is just at the horizon when looking in the given...
int HardLimitLongitude(ePositionerDirection Direction) const
Returns the longitude of the positioner's hard limit in the given Direction.
#define SAT_VISIBILITY_LAT
static void DestroyPositioner(void)
Destroys a previously created positioner.
uint64_t Elapsed(void) const