These two calculations confirm that this is indeed the desired vector). Its projection onto the Equatorial plane is proportional to (-x,-y) which points directly inward, making it the projection of a north-pointing vector. (The inner product of these two vectors is zero, proving it is level. ![]() One such vector at the location (x,y,z) is (-z x, -zy, x^2+y^2). We need a level vector (u,v,w) that points due north. This is the "elevation." AzimuthĪ similar calculation obtains the local direction of view ("azimuth"). Subtract this from 90 degrees if you want the angle of view relative to a nominal horizon. Given two points (x,y,z) and (x',y',z') in an earth-centered coordinate system, the vector from the first to the second is (dx,dy,dz) = (x'-x, y'-y, z'-z), whence the cosine of the angle made to the normal at (x,y,z) is the inner product of the unit length versions of those vectors: Cos(elevation) = (x*dx + y*dy + z*dz) / Sqrt((x^2+y^2+z^2)*(dx^2+dy^2+dz^2)) ![]() ![]() (If you don't do this, you need to retain additional information about the local normal directions in order to compute angles accurately at nonzero elevations.) Elevation ![]() For accurate calculations, convert (lat, lon, elevation) directly to earth-centered (x,y,z).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |