getSelectedObjectInfo() - Azimuth figures reported incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stellarium |
Fix Released
|
Medium
|
Alexander Wolf |
Bug Description
Note: This report was taken from our forum - https:/
Hi all!
I think I've come across a bug with getSelectedObje
For the record I'm using 0.12.4 64bit on Win 7 Home Premium 64 bit. Also tried with the 32bit version of Stellarium but no difference.
There's a couple of examples below, but if you run the script in the console with an object selected, you'll see similar strangeness
This is the script:
TargetData = core.getSelecte
TargetName = TargetData[
TargetGeoAzi = TargetData[
TargetGeoAlt = TargetData[
core.debug(
Observer Location: London
Date: 2013-12-11 04:30 UTC
Target: Arcturus
Azimuth: +95° 54' 54"
Altitude: +29° 18' 57"
These are the figures shown in the information panel, top left of screen - all good
And when I run the script, the numbers that come out are haywire.
Script Azimuth: 84.08502474297381 (84° 05' 06.09")
Script Altitude: 29.31577612575129 (29° 18' 56.793")
The altitude is correct, but the azimuth is not.
It only makes sense with the formula:
180° - Actual Azimuth = Reported Azimuth
e.g.
180° - 95° 54' 54" = 84° 05' 06.09"
This is only true of objects with an actual azimuth of between 0° and 180°. Things get stranger if you go past 180°....
=======
Observer Location: London
Date: 2013-12-11 04:30 UTC
Target: Pollux
Azimuth: +236° 26' 14"
Altitude: +57° 00' 46"
Script Azimuth: -56.43734108748945 (-56° 26' 14.4276")
Script Altitude: 57.01283417030654 (57° 00' 46.2018")
Again altitude is correct, but the situation with the azimuth is worse. Now the formula appears to be
Actual Azimuth - 180° = (-)Reported Azimuth
e.g.
236° 26' 14" - 180° = -56° 26' 14.4276"
You see what happened? It took the actual azimuth, subtracted 180° to get a result, and then made the result negative!
I also noticed this behaviour with getObjectInfo
Any input greatly appreciated!
Many thanks
Richard
Related branches
Changed in stellarium: | |
status: | Fix Committed → Fix Released |
A fix has been committed as revision 6426 of the trunk branch in Stellarium's Bazaar repository at Launchpad: bazaar. launchpad. net/~stellarium /stellarium/ trunk/revision/ 6426
http://