CalcSphAngle
The CalcSphAngle function calculates the angle between two points on a sphere.
nAngle = CalcSphAngle( nLong1, nLat1, nLong2, nLat2 )
nLong1, nLat1 are longitude and latitude of point 1, in degrees.
nLong2, nLat2 are longitude and latitude of point 2, in degrees.
nAngle is the spherical distance between points 1 and 2, in degrees.
All quantities are specified in units of decimal degrees, such as 45.2243. If computing the distance between two positions on the celestial sphere, in which the longitude is actually Right Ascension in units of Hours, be sure to first convert the Right Ascension of each point to units of degrees.
The following script computes the angle between two points on a sphere:
|
-- longitude of point 1 |
|
-- latitude of point 1 |
|
-- longitude of point 2 |
|
-- latitude of point 2 |
|
-- compute the angle |
|
-- Result: Angle = 48.9566 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.