Eliminated obsolete function VectorFromEquator.

Now that equatorial coordinates include both angles
and cartesian coordinates, there is no need for the
VectorFromEquator function. It has been removed
from all four supported languages.

The expression "VectorFromEquator(equ, time)" can be
replaced with "equ.vec" in any calling code.
This commit is contained in:
Don Cross
2021-03-27 08:24:42 -04:00
parent a97fc7da9c
commit 0426272da4
31 changed files with 6340 additions and 6835 deletions

View File

@@ -123,7 +123,6 @@ these are used in function and type names.
| [CombineRotation](#CombineRotation) | Given two rotation matrices, returns a rotation matrix that combines them into a net transformation. |
| [VectorFromSphere](#VectorFromSphere) | Converts spherical coordinates to Cartesian coordinates. |
| [SphereFromVector](#SphereFromVector) | Converts Cartesian coordinates to spherical coordinates. |
| [VectorFromEquator](#VectorFromEquator) | Given angular equatorial coordinates, calculates equatorial vector. |
| [EquatorFromVector](#EquatorFromVector) | Given an equatorial vector, calculates equatorial angular coordinates. |
| [VectorFromHorizon](#VectorFromHorizon) | Given apparent angular horizontal coordinates, calculates horizontal vector. |
| [HorizonFromVector](#HorizonFromVector) | Given a vector in horizontal orientation, calculates horizontal angular coordinates. |
@@ -2285,21 +2284,6 @@ The ecliptic coordinates of the Sun using the Earth's true equator of date.
---
<a name="VectorFromEquator"></a>
### VectorFromEquator(equ, time)
**Given angular equatorial coordinates in `equ`, calculates equatorial vector.**
| Type | Parameter | Description |
| --- | --- | --- |
| [`Equatorial`](#Equatorial) | `equ` | Angular equatorial coordinates to be converted to a vector. |
| [`Time`](#Time) | `time` | The date and time of the observation. This is needed because the returned vector object requires a valid time value when passed to certain other functions. |
### Returns: [`Vector`](#Vector)
A vector in the equatorial system.
---
<a name="VectorFromHorizon"></a>
### VectorFromHorizon(sphere, time, refraction)

View File

@@ -5720,25 +5720,6 @@ def VectorFromSphere(sphere, time):
)
def VectorFromEquator(equ, time):
"""Given angular equatorial coordinates in `equ`, calculates equatorial vector.
Parameters
----------
equ : Equatorial
Angular equatorial coordinates to be converted to a vector.
time : Time
The date and time of the observation. This is needed because the returned
vector object requires a valid time value when passed to certain other functions.
Returns
-------
Vector
A vector in the equatorial system.
"""
return VectorFromSphere(Spherical(equ.dec, 15.0 * equ.ra, equ.dist), time)
def EquatorFromVector(vec):
"""Given an equatorial vector, calculates equatorial angular coordinates.
@@ -6883,8 +6864,8 @@ def Constellation(ra, dec):
_Epoch2000 = Time(0.0)
# Convert coordinates from J2000 to B1875.
equ2000 = Equatorial(ra, dec, 1.0, None) # FIXFIXFIX - avoid this hack with unused vector
vec2000 = VectorFromEquator(equ2000, _Epoch2000)
sph2000 = Spherical(dec, 15.0 * ra, 1.0)
vec2000 = VectorFromSphere(sph2000, _Epoch2000)
vec1875 = RotateVector(_ConstelRot, vec2000)
equ1875 = EquatorFromVector(vec1875)