Page 1 of 1

New Script: Azimuth and Elevation (2nd UPDATE)

Posted: 29.04.2004, 16:37
by Harry
Hi,

I just finished a script which displays the azimuth and elevation of the direction the observer is looking. The display is only activated when near the surface of a planet (I don't think the values make much sense when somewhere in space).

You can find the script here:
show-azimuth-elevation_v1.0.celx or here, together with my other scripts.

The results should be correct, but may not be perfectly precise - please report any problems. It would be great if someone can compare the results with a reference ;)

The script only works with recent Celestia 1.3.2pre-versions, but I don't know which ones :oops:

Example usage:
- start the script
- select earth
- select your hometown, land on surface

- you should now see the current azimuth and elevation at the lower border of the screen
- get the position of the next iridium flare from heavens-above.com, and check where it will appear using Celestia ;)

UPDATE:
Version 1.1 is now available. Now RA and Dec are displayed as well. Azimuth and Elevation is always displayed. The base-planet doesn't change automatically and defaults to Earth. To change it, select another planet and press S.

Get it here:
show-azimuth-elevation_v1.1.celx

UPDATE v 1.2
New version: v1.2 (lunar-eclipse edition ;) )
Changes:
You can now enter Azimuth and Elevation: Press "A".
You can now force the horizon to stay horizontal, i.e. to make up always point away from ground: Press "F".

show-azimuth-elevation_v1.2.celx
(or via my website)

Harald

Posted: 30.04.2004, 18:34
by don
Nice script Harald! 8)

Will you be adding the RA / Dec mode?

What about being able to select an object in space, after you are on the surface, and have the script display it's Az/Ele or RA/Dec?

Posted: 01.05.2004, 00:42
by Harry
don wrote:Will you be adding the RA / Dec mode?
As soon as I find out the coordinate axis (given in universal coordinates) for RA/Dec...
What about being able to select an object in space, after you are on the surface, and have the script display it's Az/Ele or RA/Dec?

Why not simply center on the object? Then you get the Az/Elev data for the object. I am not sure how the script should decide when to display what - either the Az/Elev for the selected object, or for the center of the screen.

Harald

Posted: 01.05.2004, 00:49
by don
Harry wrote:As soon as I find out the coordinate axis (given in universal coordinates) for RA/Dec...
Not sure exactly what you need, or I'd do a web search for ya <sigh>.


Harry wrote:Why not simply center on the object?

As soon as you select another object, the display goes away. The object needs to be selected in order to center it. But, when centering it, the planet could go off-screen, making it impossible to re-select it in order to re-display the numbers. Catch-22.

Or am I doing something wrong, which is not at all out of the question?

Posted: 01.05.2004, 01:27
by Harry
don wrote:Not sure exactly what you need, or I'd do a web search for ya <sigh>
Did that already, now I know how RA/Dec is defined, but still haven't got the actual values I need - though I should be able to get them.

Harry wrote:Why not simply center on the object?
As soon as you select another object, the display goes away.

The Az/Elev display goes away (i.e. display "not near surface" warning) when you select another planet, I did not think of that. But it should work fine when only selecting stars, moons etc. However you must keep your current position...

The problem is easily fixable, but maybe it would be even better to hardcode Earth as the reference point for the display - does any other planet make sense?

Harald

Posted: 01.05.2004, 01:39
by don
Harry wrote:Did that already, now I know how RA/Dec is defined, but still haven't got the actual values I need - though I should be able to get them.
Glad to hear it!

Harry wrote:The problem is easily fixable, but maybe it would be even better to hardcode Earth as the reference point for the display - does any other planet make sense?

Probably not unless you were a resident of that planet and had an observatory with printed references to other stellar objects at hand. :wink:

But, then you will probably need to make sure that Earth is at least close-at-hand (ie. observer on the Earth's surface), right?

Posted: 01.05.2004, 01:51
by selden
Personally, I think it'd be very useful for the Az/Elev values to be available no matter which planet you're "on". For example, when figuring out when one of the Mars communications relay satellites is above the horizon when seen from one of the rovers. Or where Cassini is from the point of view of Huygens as it lands.

Posted: 01.05.2004, 05:16
by don
don wrote:Probably not unless you were a resident of that planet and had an observatory with printed references to other stellar objects at hand. :wink:

Well, I sit corrected. 8O I guess between Celestia and NASA, this is exactly what we've become -- part-time residents of other planets! :D

Posted: 01.05.2004, 13:02
by Harry
I've just updated the script. See the top post, besides adding RA/Dec this should solve the problem of selecting other planets while still allowing displaying Az/Elev of other planets (assuming they use the same definition of Azimuth and Elevation ;)

Harald

Posted: 03.05.2004, 05:12
by don
Hey, lookin' good Harald! Both modes *seem* to work okay, on Earth and Mars. I say *seem* because I don't have any texts with actual values.

Thanks for the great script! :D

Posted: 04.05.2004, 20:16
by Harry
Another update, now version 1.2:
Now allows to enter Az/Elev (press "A"), and you use the script to have up always pointing away from ground (press "F", with this you don't need to activate azimuth-mode).

Have fun,

Harald

Posted: 06.05.2004, 04:59
by don
Sounds great Harald!

Now all I have to do is get my disk drives and space sorted out (this weekend hopefully) and find a big enough time-slot to do some "playing" with scripts. Looking forward to trying it out.

Posted: 07.05.2004, 00:47
by don
Very nice additions Harald! 8)