Opened 11 years ago

Closed 10 years ago

#8459 closed defect (fixed)

[PATCH] Calculate correct Azimuth positioning for Diseqc Rotor

Reported by: Pieter Hoekstra <pieter@…> Owned by: robertm
Priority: minor Milestone: 0.25
Component: MythTV - DVB Version: 0.23rc2
Severity: medium Keywords: diseqc rotor azimuth
Cc: Ticket locked: no


I'm not 100% sure this is a mythtv bug or my misunderstanding.

When positioning a rotor using GotoXX-diseqc (Diseqc1.3) commands, Myth calculates the Azimuth-angle for the current latitude/longitude.

This Azimuth is visible when running "mythbackend -v important,channel"

When I compare the Azimuth with other software, like kaffeine, SMWLink (, xdipo ( or sites like myth seems a few degrees wrong... Example: For my location the Astra19.2E satellite should point to 15.3E, but myth calculates 13.5E

I have attached a patch that calculates the same value as the calculators above.

The current code also calculates the elevation, I removed those lines in the patch.

Attachments (1)

calc_correct_azimuth.diff (706 bytes) - added by Pieter Hoekstra <pieter@…> 11 years ago.
Patch to fix issue

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by Pieter Hoekstra <pieter@…>

Attachment: calc_correct_azimuth.diff added

Patch to fix issue

comment:1 Changed 11 years ago by Janne Grunau

Your azimuth calculation is only correct on a flat earth. That said the difference looks too large. I'll try to validate our formula.

comment:2 Changed 10 years ago by robertm

Status: newassigned

comment:3 Changed 10 years ago by robertm

Owner: changed from Janne Grunau to robertm

I'll take this. Although I have neither a satellite dish or a rotor, I've checked into satellite azimuth calculations a bit and found that the above patch is indeed the "textbook" calculation for azimuth (and it doesn't seem to be going anywhere otherwise).

comment:4 Changed 10 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: assignedclosed

DiSEqC: Calculate Azimuth for Rotors in line with online references.

It appears that we lifted a bit too much from another available Azimuth calculation, which threw off our rotor positioning.

I've checked numerous online sources which indicate that this should be the correct calculation for Azimuth.

Fixes #8459, "meat" of the patch by Pieter Hoekstra. Thanks.

Branch: master Changeset: 5a01fdade9683ddea23f60d2438fd526db788523

Note: See TracTickets for help on using tickets.