[AstroPy] Rotating and Transforming Vectors--Flight Path of a Celestial Body
Thu Dec 17 22:55:42 CST 2009
2009/12/17 Wayne Watson <email@example.com>:
> I'm just getting used to the math and numpy library, and have begun
> working on a problem of the following sort.
> Two observing stations are equidistant, 1/2 degree, on either side of a
> line of longitude of 90 deg west, and both are at 45 deg latitude. Given
> the earth's circumference as 25020 miles, a meteor is 60 miles above the
> point between the two sites. That is, if you were standing at long
> 90deg and lat 45 deg, the meteor would be that high above you. 70 miles
> along the long line is 1 degree, so the stations are 70 miles apart. I
> want to know the az and el of the meteor from each station. With some
> geometry and trig, I've managed to get that first point; however, I can
> see moving the meteor say, 1/2 deg, along its circular path towards the
> north pole is going to require more pen and pencil work to get the az/el
> for it.
> Long ago in a faraway time, I used to do this stuff. It should be easy
> to rotate the vector to the first point 1/2 deg northward, and find the
> vector there, then compute the new az and el from each station. Maybe.
> I'm just beginning to look at the matrix and vector facilities in numpy.
> Maybe someone can comment on how this should be done, and steer me
> towards what I need to know in numpy.
You may find that the problem grows drastically easier if you work as
much as possible in so-called earth-centered earth-fixed coordinates
(sometimes called XYZ) coordinates. These are a rectilinear coordinate
system that rotates with the earth, with the Z axis through the north
pole and the X axis through the equator at the Greenwich meridian.
It's kind of horrible for getting altitudes, since the Earth is sort
of pear-shaped, but it makes the 3D geometry much simpler.
If you don't go this route, I'd recommend picking one station and
defining a rectilinear coordinate system based on its north and
vertical vectors. The north and vertical vectors of the other station
will be at somewhat funny angles (unless you can get away with
treating the Earth as flat between the two), but whatever rectilinear
coordinates you choose, a dot product lets you calculate vector
lengths and angles between them, and a cross product lets you build
vectors orthogonal to a given pair. So, for example, if your station
has north vector N and up vector U, you can get its east vector as
E=cross(N,U) (then normalize it); if you want to convert an absolute
north to a local north (i.e. one that is horizontal) you can do
N=cross(E,U) (and normalize it). Then you can get the azimuth of a
vector V using dot(N,V)/sqrt(dot(V,V)) and dot(E,V)/sqrt(dot(V,V)).
More information about the AstroPy