With the onset of summer vacation, for many residents of large cities, life gradually moves out of town. One of the IT attributes of suburban life is the presence of satellite television. Someone is trying to install and configure the antenna on their own, by analogy with the neighboring ones, someone uses the services of installers, someone calculates the installation parameters with a ruler on Google Maps.
For those who are trying to independently install and configure satellite TV, I want to provide a service to
Geonames.ru that helps determine which way to send a satellite dish.
The logic of operation is as follows - the user selects a satellite operator or a specific satellite, then determines the antenna installation point on the map, based on this data, the service calculates the direction and other installation parameters.
')

During the development process, it turned out that similar services already exist abroad, the most popular of which is
Dishpointer.com , which is used, among other things, by installers. I tried to make my service oriented to Russian-speaking and less technically trained users, in fact, for housewives.
Next, I will tell how the necessary parameters are calculated in the service and what difficulties I had to face during the development process.
In order to install the plate yourself it is necessary to define several parameters:
- Direction in the horizontal plane (azimuth)
- Vertical direction (elevation angle)
- Converter rotation angle
True and magnetic azimuths
The true azimuth is used to lay the direction on the map, in which the X axis runs parallel to the equator (parallel), and the Y axis - the meridian passing from the south pole to the north pole.
True azimuth is calculated by the formula
k = PI/180;
a = * k;
b = * k;
c = * k;
= (PI+arctan(tan(bc)/sin(a)))/k;
Magnetic azimuth also focuses on the magnetic poles of the Earth, which do not coincide with the geographical and is necessary to determine the direction of the magnetic compass. In addition, the magnetic poles change over time, and so-called
magnetic anomalies can also affect the compass needle.
In this regard, geodesists for each year are calculated tables of magnetic declination (deviations of the magnetic azimuth from the true) for each "cemetery" geographical coordinates (180 * 360 = 6480 possible values). Thus, to obtain a magnetic azimuth, it is necessary to add or subtract the value of the magnetic declination for the given coordinates to the true azimuth.
As the source of the magnetic declination table in Geonames.ru service, the magdec.bgl file for 2012 is used - this is the binary declination table for the flight simulator Microsoft Flight Simulator 2004.
In order to visually display the direction to the satellite on the map, it is necessary to keep in mind that the map is flat and the Earth is round. Therefore, the direction line will be an arc. The
Geonames.ru service uses Yandex.Maps in which you can set the geodesic = true parameter to display a line in the form of a geodesic curve.
Elevation angle and inclination angle of the dish
The elevation angle is the elevation angle of the satellite above the horizon line. If the elevation angle is less than zero, then the satellite is not visible above the horizon and reception of a signal from it is impossible.
The elevation angle is calculated by the formula
k = PI/180;
a = * k;
b = * k;
c = * k;
= arctan((cos(bc)*cos(a)-0.15126)/sqrt(1-cos(bc)*cos(bc)*cos(a)*cos(a)))/k;
It would seem that it is enough to tilt the antenna plane in accordance with the elevation angle and we will catch the TV signal from the satellite. But not everything is so simple. This statement will be true if an out-of-focus antenna is used, in which the angle of reflection of the signal is perpendicular to the plane of the antenna. Offset antennas are widespread in the private sector, the angle of reflection of which, depending on the design, is 110-116 degrees. We often come across antennas with a reflection angle of 116 degrees.
Schematically, the difference in the designs of the antennas and the directions of the reflected signal can be viewed in the
comments to the adjacent topic.
Thus, the antenna tilt angle will be approximately equal to the elevation angle minus 26 degrees. For operators such as Telekart, Continent TV, Yamal satellites, when installed in the Moscow region, the antenna will have to be tilted to the ground.
Converter rotation angle
Happy subscribers of Tricolor and NTV + can breathe with relief - from their satellite broadcasting is conducted in circular polarization and you do not need to rotate the converter to receive such a signal. In other cases, the rotation of the converter is required.
The angle of rotation is calculated by the formula
k = PI/180;
a = * k;
b = * k;
c = * k;
= arctan(sin(bc)/tan(a))/k;
If you look at the converter as a plate looks at it, then you need to turn it with a positive value - clockwise, with a negative value - against.
Google.Maps vs Yandex.Maps vs Yandex.Maps 2.0
Finding the antenna installation site and visualizing the direction to the satellite is the main functionality of the service, so choosing a map service has not become a trivial task.
Subjective assessment, taking into account the orientation of the service to Russia:
Google.Maps
pros
- High speed
- Very good detail satellite imagery
Minuses
- Not a good job geocoder in Russia
- Low detailing in the mode of the scheme of many large Russian cities
Yandex.Maps 1.x
pros
- Very good detail in schematic mode
- Excellent geocoder
Minuses
- Low detail satellite images outside major cities
- Slower than Google.Maps
Yandex.Maps 2.x
pros
- Very fast work, smooth rendering
- Small library size
- All the advantages of the first version
Minuses
- Inability to display lines as a geodesic curve.
- Received cards are not printable. Static API does not allow to display lines in the form of a geodesic curve.
As a result, the choice fell on Yandex.Maps of the first version. Perhaps, in the second version, problems with printing cards will be solved with time and then the service can be transferred to it. In a pinch there is Google.