mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-03-29 03:43:34 -04:00
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:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user