Opened 11 years ago
Closed 17 months ago
#10845 closed Bug Report - General (Trac EOL)
Rotor with usals not working correct after upgrade to 0.25
Reported by: | Owned by: | stuartm | |
---|---|---|---|
Priority: | minor | Milestone: | needs_triage |
Component: | MythTV - General | Version: | 0.25 |
Severity: | medium | Keywords: | rotor usals |
Cc: | Ticket locked: | no |
Description (last modified by )
Recently updated my mythbackend from 0.24 to 0.25. Since 0.23 I use without any problems a rotor with usals (SG2100A). Since the update the rotor is not rotating to the correct position any more. Connected my (old) receiver with it the rotor and usuals is working perfect again. Deleting the configuration in mythtv-setup and then adding a new rotor did not fix the issue. At 5a01fdade9683ddea23f60d2438fd526db788523 seems to be changed something, but I do not understand this fully. If I want the astra 28.2E now I have to put something near 26.0E so it rotates to 28.2 position. Reinstalled to 0.24 again and rotor working fine again with correct sat.settings
Change History (12)
comment:3 Changed 11 years ago by
Status: | new → infoneeded_new |
---|
Sorry, could you please repost the commit number as the URL didn't make it.
comment:4 Changed 11 years ago by
Here are the URL, with regards.
http://code.mythtv.org/trac/changeset/5a01fdade9683ddea23f60d2438fd526db788523/mythtv http://code.mythtv.org/trac/ticket/8459
comment:5 Changed 11 years ago by
As a test I made a fresh install with Xubuntu 12.04 at another pc with dvb adapter and mythtv 0.25. Adding the rotor caused exactly the same problems as mentioned above. So usals not working correct any more.
comment:7 Changed 11 years ago by
Update. Installed mythtv 0.25 from source and adapted mythtv/libs/libmythtv/diseqc.cpp before compiling.
double DiSEqCDevRotor::CalculateAzimuth(double angle) const { // Azimuth Calculation references: // http://engr.nmsu.edu/~etti/3_2/3_2e.html // http://www.angelfire.com/trek/ismail/theory.html // Earth Station Latitude and Longitude in radians double P = gCoreContext->GetSetting("Latitude", "").toFloat() * TO_RADS; double Ue = gCoreContext->GetSetting("Longitude", "").toFloat() * TO_RADS; // Satellite Longitude in radians double Us = angle * TO_RADS; return TO_DEC * atan( tan(Us - Ue) / sin(P) ); }
changed to
double DiSEqCDevRotor::CalculateAzimuth(double angle) const { // Equation lifted from VDR rotor plugin by // Thomas Bergwinkl <Thomas.Bergwinkl@t-online.de> // Earth Station Latitude and Longitude in radians double P = gCoreContext->GetSetting("Latitude", "").toFloat() * TO_RADS; double Ue = gCoreContext->GetSetting("Longitude", "").toFloat() * TO_RADS; // Satellite Longitude in radians double Us = angle * TO_RADS; double az = M_PI + atan( tan(Us - Ue) / sin(P) ); double x = acos( cos(Us - Ue) *cos(P) ); double el = atan( (cos(x) - 0.1513) / sin(x) ); double tmp_a = -cos(el) *sin(az); double tmp_b = (sin(el) *cos(P)) - (cos(el) *sin(P) *cos(az)); double azimuth = atan(tmp_a / tmp_B) *TO_DEC; return azimuth; }
After this my rotor with usals was working again.
comment:8 Changed 9 years ago by
I can confirm this: for a satellite at 28E, in Kaffeine I can use the azimuth 28 degrees without any problems, but in Mythtv, I need to put in 25.1 degrees as per the above formulas in order to go to the correct position.
comment:9 Changed 9 years ago by
For a while using mythtv 0.27 now and had to adapt again diseqc.cpp as above, though had to change double azimuth = atan(tmp_a / tmp_B) *TO_DEC; into double azimuth = atan(tmp_a / tmp_b) *TO_DEC; to compile and make the rotor work correctly
comment:10 Changed 9 years ago by
Owner: | set to stuartm |
---|---|
Status: | new → accepted |
The problem is that we originally used that calculation but it too produced incorrect results for some.
It's possible the difference is as a result of different expectations from hardware with USALS and hardware without. I don't even understand how it's supposed to work, I don't see any code for calculating the elevation in diseqc.cpp. How does the rotor work without the elevation?
If someone could check with say, Kaffeine, to see whether it gets the correct result and what it is doing that would let us break this impasse. None of the developers have access to a rotor.
comment:11 Changed 7 years ago by
I can confirm that using 0.28 this is still an issue. The current formulas give the wrong answers, the formulas suggested above give the same result as Kaffeine and result in a correct rotor position.
I currently work around this by inputting a 'wrong' satellite angle, which is predistorted so that Mythtv gives the correct answer.
comment:12 Changed 3 years ago by
Milestone: | unknown → needs_triage |
---|
comment:13 Changed 17 months ago by
Resolution: | → Trac EOL |
---|---|
Status: | accepted → closed |
We have moved all bug tracking to github [1]
If you continue to have this issue, please open a new issue at github, referencing this ticket.
Resetting to default priority.