fixed dependencies

This commit is contained in:
nuknal
2024-10-24 15:46:01 +08:00
parent d16a5bd9c0
commit 1161e8d054
2005 changed files with 690883 additions and 0 deletions

21
vendor/github.com/hebl/gofa/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 HE Boliang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

85
vendor/github.com/hebl/gofa/README-zh_CN.md generated vendored Normal file
View File

@@ -0,0 +1,85 @@
<a href="https://pkg.go.dev/github.com/hebl/gofa"><img src="https://pkg.go.dev/badge/github.com/hebl/gofa.svg" alt="Go Reference"></a>
[英文](README.md)
# GoFA (基础天文标准库Golang standards Of Fundamental Astronomy)
GoFA 是一个纯Go实现的基础天文计算库基于国际天文联合会官方的`基础天文标准库``Standards Of Fundamental Astronomy (SOFA)`, [http://iausofa.org](http://iausofa.org)】实现。
GoFA 开发文档: <https://pkg.go.dev/github.com/hebl/gofa>
GoFA 当前版本为`v1.19`与SOFA `v19`([2023-10-11](http://iausofa.org/2023_1011_C/))
保持同步。
官方文档中的示例程序在目录[examples](examples)下。
所有的函数已经通过测试,[测试](test)程序参考自`t_sofa_c.c`
## 安装
```shell
go get -u github.com/hebl/gofa
```
或者
```shell
go install github.com/hebl/gofa@latest
```
## 函数
### 向量/矩阵函数库 [vml.go](vml.go)
- 初始化 (4)
- 拷贝/扩展等 (5)
- 构建旋转函数 (3)
- 向量操作 (17)
- 矩阵操作 (2)
- 矩阵-向量乘法 (4)
- 旋转向量 (2)
### 角度计算 [angle.go](angle.go)
- 球面/笛卡儿坐标转换 (6)
- 球面角距离 (4)
- 角度运算 (8)
### 天体测量 (38) [astrometry.go](astrometry.go)
### 日历 (7) [jd.go](jd.go)
### 时间尺度 (20) [ts.go](ts.go)
### 坐标系 [coord.go](coord.go)
- 黄道坐标系 (6)
- 银道坐标系 (2)
- 地平/赤道坐标系 (3)
- 地心坐标与大地坐标转换 (5)
### 地球转动与恒星时 (15) [erast.go](erast.go)
### 星历 (3) [ephem.go](ephem.go)
### 基础参数 (14) [fundargs.go](fundargs.go)
### 球心投影 (6) [projection.go](projection.go)
### 岁差/章动/极移 (64) [pn.go](pn.go)
### 星表转换 (9) [catalog.go](catalog.go)
## 版本
### v1.19
Version 1.19 包含有192个天文函数包括时间、地球转动、恒星时、星历、岁差、岁差/章动、天体测量和坐标转换等55个向量/矩阵函数。
## 许可证
- [SOFA License](sofa_copyr.txt)
- [MIT License](LICENSE)
2023-10-23

85
vendor/github.com/hebl/gofa/README.md generated vendored Normal file
View File

@@ -0,0 +1,85 @@
<a href="https://pkg.go.dev/github.com/hebl/gofa"><img src="https://pkg.go.dev/badge/github.com/hebl/gofa.svg" alt="Go Reference"></a>
[中文](README-zh_CN.md)
# GoFA (Golang standards Of Fundamental Astronomy)
GoFA is a pure Golang implementation derived from the International Astronomical
Union's (*IAU*) "`Standards Of Fundamental Astronomy (SOFA)` [http://iausofa.org](http://iausofa.org)" library
official C release. .
Reference documents are in: <https://pkg.go.dev/github.com/hebl/gofa>
GoFA Current version is 1.19. It is based on SOFA version `19` ([2023-10-11](http://iausofa.org/2023_1011_C/)).
Examples in manuals are in the subdirectory: [examples](examples)
All function are tested. The [test](test) functions are derived from `t_sofa_c.c` .
## Installation
```shell
go get -u github.com/hebl/gofa
```
or
```shell
go install github.com/hebl/gofa@latest
```
## Functions
### Vector/Matrix Library [vml.go](vml.go)
- Initialization (4)
- Copy/Extend/Extract (5)
- Build rotations (3)
- Operations on vectors (17)
- Operations on matrices (2)
- Matrix-vector products (4)
- Rotation vectors (2)
### Angle [angle.go](angle.go)
- Spherical/Cartesian conversions (6)
- Separation and position-angle (4)
- Operations on angles (8)
### Astrometry (38) [astrometry.go](astrometry.go)
### Calendars (7) [jd.go](jd.go)
### Time Scales (20) [ts.go](ts.go)
### Coordinates [coord.go](coord.go)
- Ecliptic Coordinates (6)
- Galactic Coordinates (2)
- Horizon/Equatorial Coordinates (3)
- Geocentric/Geodetic Transformations (5)
### Earth Rotation and Sidereal Time (15) [erast.go](erast.go)
### Ephemerides (3) [ephem.go](ephem.go)
### Fundamental Arguments (14) [fundargs.go](fundargs.go)
### Gnomonic Projections (6) [projection.go](projection.go)
### Precession/Nutation/Polar Motion (64) [pn.go](pn.go)
### Star Catalog Conversions (9) [catalog.go](catalog.go)
## Versions
### v1.19
Version 1.19 offers 192 routines for astronomy library (including time scales, earth rotation, sidereal time, precession, nutation, polar motion, ephemerides, astrometry and transforms between various reference systems.), 55 routines for vector/matrix library.
## License
- [SOFA License](sofa_copyr.txt)
- [MIT License](LICENSE)
2023-10-23

606
vendor/github.com/hebl/gofa/angle.go generated vendored Normal file
View File

@@ -0,0 +1,606 @@
// Copyright 2022 HE Boliang
// All rights reserved.
package gofa
// Angle
// Operations on Angles
/*
Anp Normalize angle into the range 0 <= a < 2pi.
Given:
a float64 angle (radians)
Returned (function value):
float64 angle in range 0-2pi
*/
func Anp(a float64) float64 {
var w float64
w = fmod(a, D2PI)
if w < 0 {
w += D2PI
}
return w
}
/*
Anpm Normalize angle into the range -pi <= a < +pi.
Given:
a float64 angle (radians)
Returned (function value):
float64 angle in range +/-pi
*/
func Anpm(a float64) float64 {
var w float64
w = fmod(a, D2PI)
if fabs(w) >= DPI {
w -= dsign(D2PI, a)
}
return w
}
/*
A2af Decompose radians into degrees, arcminutes, arcseconds, fraction.
Given:
ndp int resolution (Note 1)
angle float64 angle in radians
Returned:
sign byte '+' or '-'
idmsf [4]int degrees, arcminutes, arcseconds, fraction
Notes:
1) The argument ndp is interpreted as follows:
ndp resolution
: ...0000 00 00
-7 1000 00 00
-6 100 00 00
-5 10 00 00
-4 1 00 00
-3 0 10 00
-2 0 01 00
-1 0 00 10
0 0 00 01
1 0 00 00.1
2 0 00 00.01
3 0 00 00.001
: 0 00 00.000...
2) The largest positive useful value for ndp is determined by the
size of angle, the format of float64s on the target platform, and
the risk of overflowing idmsf[3]. On a typical platform, for
angle up to 2pi, the available floating-point precision might
correspond to ndp=12. However, the practical limit is typically
ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
only 16 bits.
3) The absolute value of angle may exceed 2pi. In cases where it
does not, it is up to the caller to test for and handle the
case where angle is very nearly 2pi and rounds up to 360 degrees,
by testing for idmsf[0]=360 and setting idmsf[0-3] to zero.
Called:
D2tf decompose days to hms
*/
func A2af(ndp int, angle float64, sign *byte, idmsf *[4]int) {
/* Hours to degrees * radians to turns */
F := 15.0 / D2PI
/* Scale then use days to h,m,s function. */
D2tf(ndp, angle*F, sign, idmsf)
}
/*
A2tf Decompose radians into hours, minutes, seconds, fraction.
Given:
ndp int resolution (Note 1)
angle float64 angle in radians
Returned:
sign byte '+' or '-'
ihmsf [4]int hours, minutes, seconds, fraction
Notes:
1) The argument ndp is interpreted as follows:
ndp resolution
: ...0000 00 00
-7 1000 00 00
-6 100 00 00
-5 10 00 00
-4 1 00 00
-3 0 10 00
-2 0 01 00
-1 0 00 10
0 0 00 01
1 0 00 00.1
2 0 00 00.01
3 0 00 00.001
: 0 00 00.000...
2) The largest positive useful value for ndp is determined by the
size of angle, the format of float64s on the target platform, and
the risk of overflowing ihmsf[3]. On a typical platform, for
angle up to 2pi, the available floating-point precision might
correspond to ndp=12. However, the practical limit is typically
ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
only 16 bits.
3) The absolute value of angle may exceed 2pi. In cases where it
does not, it is up to the caller to test for and handle the
case where angle is very nearly 2pi and rounds up to 24 hours,
by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero.
Called:
D2tf decompose days to hms
*/
func A2tf(ndp int, angle float64, sign *byte, ihmsf *[4]int) {
D2tf(ndp, angle/D2PI, sign, ihmsf)
}
/*
D2tf Decompose days to hours, minutes, seconds, fraction.
Given:
ndp int resolution (Note 1)
days float64 interval in days
Returned:
sign byte '+' or '-'
ihmsf [4]int hours, minutes, seconds, fraction
Notes:
1) The argument ndp is interpreted as follows:
ndp resolution
: ...0000 00 00
-7 1000 00 00
-6 100 00 00
-5 10 00 00
-4 1 00 00
-3 0 10 00
-2 0 01 00
-1 0 00 10
0 0 00 01
1 0 00 00.1
2 0 00 00.01
3 0 00 00.001
: 0 00 00.000...
2) The largest positive useful value for ndp is determined by the
size of days, the format of float64 on the target platform, and
the risk of overflowing ihmsf[3]. On a typical platform, for
days up to 1.0, the available floating-point precision might
correspond to ndp=12. However, the practical limit is typically
ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
only 16 bits.
3) The absolute value of days may exceed 1.0. In cases where it
does not, it is up to the caller to test for and handle the
case where days is very nearly 1.0 and rounds up to 24 hours,
by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero.
*/
func D2tf(ndp int, days float64, sign *byte, ihmsf *[4]int) {
var nrs, n int
var rs, rm, rh, a, w, ah, am, as, af float64
/* Handle sign. */
if days >= 0.0 {
*sign = '+'
} else {
*sign = '-'
}
/* Interval in seconds. */
a = DAYSEC * fabs(days)
/* Pre-round if resolution coarser than 1s (then pretend ndp=1). */
if ndp < 0 {
nrs = 1
for n = 1; n <= -ndp; n++ {
if n == 2 || n == 4 {
nrs *= 6
} else {
nrs *= 4
}
}
rs = float64(nrs)
w = a / rs
a = rs * dnint(w)
}
/* Express the unit of each field in resolution units. */
nrs = 1
for n = 1; n <= ndp; n++ {
nrs *= 10
}
rs = float64(nrs)
rm = rs * 60.0
rh = rm * 60.0
/* Round the interval and express in resolution units. */
a = dnint(rs * a)
/* Break into fields. */
ah = a / rh
ah = dint(ah)
a -= ah * rh
am = a / rm
am = dint(am)
a -= am * rm
as = a / rs
as = dint(as)
af = a - as*rs
/* Return results. */
ihmsf[0] = int(ah)
ihmsf[1] = int(am)
ihmsf[2] = int(as)
ihmsf[3] = int(af)
}
/*
Af2a Convert degrees, arcminutes, arcseconds to radians.
Given:
s byte sign: '-' = negative, otherwise positive
ideg int degrees
iamin int arcminutes
asec float64 arcseconds
Returned:
rad float64 angle in radians
Returned (function value):
int status: 0 = OK
1 = ideg outside range 0-359
2 = iamin outside range 0-59
3 = asec outside range 0-59.999...
Notes:
1) The result is computed even if any of the range checks fail.
2) Negative ideg, iamin and/or asec produce a warning status, but
the absolute value is used in the conversion.
3) If there are multiple errors, the status value reflects only the
first, the smallest taking precedence.
*/
func Af2a(s byte, ideg, iamin int, asec float64, rad *float64) int {
/* Compute the interval. */
if s == '-' {
*rad = -1.0
} else {
*rad = 1.0
}
*rad *= (60.0*(60.0*(fabs(float64(ideg)))+(fabs(float64(iamin)))) + fabs(asec)) * DAS2R
/* Validate arguments and return status. */
if ideg < 0 || ideg > 359 {
return 1
}
if iamin < 0 || iamin > 59 {
return 2
}
if asec < 0.0 || asec >= 60.0 {
return 3
}
return 0
}
/*
Tf2a Convert hours, minutes, seconds to radians.
Given:
s byte sign: '-' = negative, otherwise positive
ihour int hours
imin int minutes
sec float64 seconds
Returned:
rad float64 angle in radians
Returned (function value):
int status: 0 = OK
1 = ihour outside range 0-23
2 = imin outside range 0-59
3 = sec outside range 0-59.999...
Notes:
1) The result is computed even if any of the range checks fail.
2) Negative ihour, imin and/or sec produce a warning status, but
the absolute value is used in the conversion.
3) If there are multiple errors, the status value reflects only the
first, the smallest taking precedence.
*/
func Tf2a(s byte, ihour, imin int, sec float64, rad *float64) int {
/* Compute the interval. */
if s == '-' {
*rad = -1.0
} else {
*rad = 1.0
}
*rad *= (60.0*(60.0*(fabs(float64(ihour)))+(fabs(float64(imin)))) + fabs(sec)) * DS2R
/* Validate arguments and return status. */
if ihour < 0 || ihour > 23 {
return 1
}
if imin < 0 || imin > 59 {
return 2
}
if sec < 0.0 || sec >= 60.0 {
return 3
}
return 0
}
/*
Tf2d Convert hours, minutes, seconds to days.
Given:
s byte sign: '-' = negative, otherwise positive
ihour int hours
imin int minutes
sec float64 seconds
Returned:
days float64 interval in days
Returned (function value):
int status: 0 = OK
1 = ihour outside range 0-23
2 = imin outside range 0-59
3 = sec outside range 0-59.999...
Notes:
1) The result is computed even if any of the range checks fail.
2) Negative ihour, imin and/or sec produce a warning status, but
the absolute value is used in the conversion.
3) If there are multiple errors, the status value reflects only the
first, the smallest taking precedence.
*/
func Tf2d(s byte, ihour, imin int, sec float64, days *float64) int {
/* Compute the interval. */
// *days = ( s == '-' ? -1.0 : 1.0 ) *
if s == '-' {
*days = -1.0
} else {
*days = 1.0
}
*days *= (60.0*(60.0*(fabs(float64(ihour)))+(fabs(float64(imin)))) + fabs(sec)) / DAYSEC
/* Validate arguments and return status. */
if ihour < 0 || ihour > 23 {
return 1
}
if imin < 0 || imin > 59 {
return 2
}
if sec < 0.0 || sec >= 60.0 {
return 3
}
return 0
}
// Separation and position-angle
/*
Sepp Angular separation between two p-vectors.
Given:
a [3]float64 first p-vector (not necessarily unit length)
b [3]float64 second p-vector (not necessarily unit length)
Returned (function value):
float64 angular separation (radians, always positive)
Notes:
1) If either vector is null, a zero result is returned.
2) The angular separation is most simply formulated in terms of
scalar product. However, this gives poor accuracy for angles
near zero and pi. The present algorithm uses both cross product
and dot product, to deliver full accuracy whatever the size of
the angle.
Called:
Pxp vector product of two p-vectors
Pm modulus of p-vector
Pdp scalar product of two p-vectors
*/
func Sepp(a, b [3]float64) float64 {
var axb [3]float64
var ss, cs, s float64
/* Sine of angle between the vectors, multiplied by the two moduli. */
Pxp(a, b, &axb)
ss = Pm(axb)
/* Cosine of the angle, multiplied by the two moduli. */
cs = Pdp(a, b)
/* The angle. */
if (ss != 0.0) || (cs != 0.0) {
s = atan2(ss, cs)
} else {
s = 0.0
}
return s
}
/*
Seps Angular separation between two sets of spherical coordinates.
Given:
al float64 first longitude (radians)
ap float64 first latitude (radians)
bl float64 second longitude (radians)
bp float64 second latitude (radians)
Returned (function value):
float64 angular separation (radians)
Called:
S2c spherical coordinates to unit vector
Sepp angular separation between two p-vectors
*/
func Seps(al, ap, bl, bp float64) float64 {
var ac, bc [3]float64
var s float64
/* Spherical to Cartesian. */
S2c(al, ap, &ac)
S2c(bl, bp, &bc)
/* Angle between the vectors. */
s = Sepp(ac, bc)
return s
}
/*
Pap Position-angle from two p-vectors.
Given:
a [3]float64 direction of reference point
b [3]float64 direction of point whose PA is required
Returned (function value):
float64 position angle of b with respect to a (radians)
Notes:
1) The result is the position angle, in radians, of direction b with
respect to direction a. It is in the range -pi to +pi. The
sense is such that if b is a small distance "north" of a the
position angle is approximately zero, and if b is a small
distance "east" of a the position angle is approximately +pi/2.
2) The vectors a and b need not be of unit length.
3) Zero is returned if the two directions are the same or if either
vector is null.
4) If vector a is at a pole, the result is ill-defined.
Called:
Pn decompose p-vector into modulus and direction
Pm modulus of p-vector
Pxp vector product of two p-vectors
Pmp p-vector minus p-vector
Pdp scalar product of two p-vectors
*/
func Pap(a, b [3]float64) float64 {
var am, bm, st, ct, xa, ya, za, pa float64
var au, eta, xi, a2b [3]float64
/* Modulus and direction of the a vector. */
Pn(a, &am, &au)
/* Modulus of the b vector. */
bm = Pm(b)
/* Deal with the case of a null vector. */
if (am == 0.0) || (bm == 0.0) {
st = 0.0
ct = 1.0
} else {
/* The "north" axis tangential from a (arbitrary length). */
xa = a[0]
ya = a[1]
za = a[2]
eta[0] = -xa * za
eta[1] = -ya * za
eta[2] = xa*xa + ya*ya
/* The "east" axis tangential from a (same length). */
Pxp(eta, au, &xi)
/* The vector from a to b. */
Pmp(b, a, &a2b)
/* Resolve into components along the north and east axes. */
st = Pdp(a2b, xi)
ct = Pdp(a2b, eta)
/* Deal with degenerate cases. */
if (st == 0.0) && (ct == 0.0) {
ct = 1.0
}
}
/* Position angle. */
pa = atan2(st, ct)
return pa
}
/*
Pas Position-angle from spherical coordinates.
Given:
al float64 longitude of point A (e.g. RA) in radians
ap float64 latitude of point A (e.g. Dec) in radians
bl float64 longitude of point B
bp float64 latitude of point B
Returned (function value):
float64 position angle of B with respect to A
Notes:
1) The result is the bearing (position angle), in radians, of point
B with respect to point A. It is in the range -pi to +pi. The
sense is such that if B is a small distance "east" of point A,
the bearing is approximately +pi/2.
2) Zero is returned if the two points are coincident.
*/
func Pas(al, ap, bl, bp float64) float64 {
var dl, x, y, pa float64
dl = bl - al
y = sin(dl) * cos(bp)
x = sin(bp)*cos(ap) - cos(bp)*sin(ap)*cos(dl)
// pa = ((x != 0.0) || (y != 0.0)) ? atan2(y, x) : 0.0;
if (x != 0.0) || (y != 0.0) {
pa = atan2(y, x)
} else {
pa = 0.0
}
return pa
}

5049
vendor/github.com/hebl/gofa/astrometry.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

1092
vendor/github.com/hebl/gofa/catalog.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

1272
vendor/github.com/hebl/gofa/coord.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

3529
vendor/github.com/hebl/gofa/ephem.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

1263
vendor/github.com/hebl/gofa/erast.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

554
vendor/github.com/hebl/gofa/fundargs.go generated vendored Normal file
View File

@@ -0,0 +1,554 @@
// Copyright 2022 HE Boliang
// All rights reserved.
package gofa
// Fundamental Arguments (14)
/*
Fad03 mean elongation of the Moon from the Sun.
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 D, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
is from Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
*/
func Fad03(t float64) float64 {
var a float64
/* Mean elongation of the Moon from the Sun (IERS Conventions 2003). */
a = fmod(1072260.703692+
t*(1602961601.2090+
t*(-6.3706+
t*(0.006593+
t*(-0.00003169)))), TURNAS) * DAS2R
return a
}
/*
Fae03 mean longitude of Earth.
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 mean longitude of Earth, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
comes from Souchay et al. (1999) after Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
Astron.Astrophys.Supp.Ser. 135, 111
*/
func Fae03(t float64) float64 {
var a float64
/* Mean longitude of Earth (IERS Conventions 2003). */
a = fmod(1.753470314+628.3075849991*t, D2PI)
return a
}
/*
Faf03 mean longitude of the Moon minus mean longitude of the ascending node.
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 F, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
is from Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
*/
func Faf03(t float64) float64 {
var a float64
/* Mean longitude of the Moon minus that of the ascending node */
/* (IERS Conventions 2003). */
a = fmod(335779.526232+
t*(1739527262.8478+
t*(-12.7512+
t*(-0.001037+
t*(0.00000417)))), TURNAS) * DAS2R
return a
}
/*
Faju03 Mean longitude of Jupiter
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 mean longitude of Jupiter, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
comes from Souchay et al. (1999) after Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
Astron.Astrophys.Supp.Ser. 135, 111
*/
func Faju03(t float64) float64 {
var a float64
/* Mean longitude of Jupiter (IERS Conventions 2003). */
a = fmod(0.599546497+52.9690962641*t, D2PI)
return a
}
/*
Fal03 Mean anomaly of the Moon
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 l, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
is from Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
*/
func Fal03(t float64) float64 {
var a float64
/* Mean anomaly of the Moon (IERS Conventions 2003). */
a = fmod(485868.249036+
t*(1717915923.2178+
t*(31.8792+
t*(0.051635+
t*(-0.00024470)))), TURNAS) * DAS2R
return a
}
/*
Falp03 Mean anomaly of the Sun
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 l', radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
is from Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
*/
func Falp03(t float64) float64 {
var a float64
/* Mean anomaly of the Sun (IERS Conventions 2003). */
a = fmod(1287104.793048+
t*(129596581.0481+
t*(-0.5532+
t*(0.000136+
t*(-0.00001149)))), TURNAS) * DAS2R
return a
}
/*
Fama03 Mean longitude of Mars
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 mean longitude of Mars, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
comes from Souchay et al. (1999) after Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
Astron.Astrophys.Supp.Ser. 135, 111
*/
func Fama03(t float64) float64 {
var a float64
/* Mean longitude of Mars (IERS Conventions 2003). */
a = fmod(6.203480913+334.0612426700*t, D2PI)
return a
}
/*
Fame03 Mean longitude of Mercury
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 mean longitude of Mercury, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
comes from Souchay et al. (1999) after Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
Astron.Astrophys.Supp.Ser. 135, 111
*/
func Fame03(t float64) float64 {
var a float64
/* Mean longitude of Mercury (IERS Conventions 2003). */
a = fmod(4.402608842+2608.7903141574*t, D2PI)
return a
}
/*
Fane03 Mean longitude of Neptune
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 mean longitude of Neptune, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
is adapted from Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
*/
func Fane03(t float64) float64 {
var a float64
/* Mean longitude of Neptune (IERS Conventions 2003). */
a = fmod(5.311886287+3.8133035638*t, D2PI)
return a
}
/*
Faom03 Mean longitude of the Moon's ascending node
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 Omega, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
is from Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J., 1994, Astron.Astrophys. 282, 663-683.
*/
func Faom03(t float64) float64 {
var a float64
/* Mean longitude of the Moon's ascending node */
/* (IERS Conventions 2003). */
a = fmod(450160.398036+
t*(-6962890.5431+
t*(7.4722+
t*(0.007702+
t*(-0.00005939)))), TURNAS) * DAS2R
return a
}
/*
Fapa03 General accumulated precession in longitude
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 general precession in longitude, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003). It
is taken from Kinoshita & Souchay (1990) and comes originally
from Lieske et al. (1977).
References:
Kinoshita, H. and Souchay J. 1990, Celest.Mech. and Dyn.Astron.
48, 187
Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977,
Astron.Astrophys. 58, 1-16
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
*/
func Fapa03(t float64) float64 {
var a float64
/* General accumulated precession in longitude. */
a = (0.024381750 + 0.00000538691*t) * t
return a
}
/*
Fasa03 Mean longitude of Saturn
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 mean longitude of Saturn, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
comes from Souchay et al. (1999) after Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
Astron.Astrophys.Supp.Ser. 135, 111
*/
func Fasa03(t float64) float64 {
var a float64
/* Mean longitude of Saturn (IERS Conventions 2003). */
a = fmod(0.874016757+21.3299104960*t, D2PI)
return a
}
/*
Faur03 Mean longitude of Uranus
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 mean longitude of Uranus, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
is adapted from Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
*/
func Faur03(t float64) float64 {
var a float64
/* Mean longitude of Uranus (IERS Conventions 2003). */
a = fmod(5.481293872+7.4781598567*t, D2PI)
return a
}
/*
Fave03 Mean longitude of Venus
Fundamental argument, IERS Conventions (2003)
Given:
t float64 TDB, Julian centuries since J2000.0 (Note 1)
Returned (function value):
float64 mean longitude of Venus, radians (Note 2)
Notes:
1) Though t is strictly TDB, it is usually more convenient to use
TT, which makes no significant difference.
2) The expression used is as adopted in IERS Conventions (2003) and
comes from Souchay et al. (1999) after Simon et al. (1994).
References:
McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
IERS Technical Note No. 32, BKG (2004)
Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
Astron.Astrophys.Supp.Ser. 135, 111
*/
func Fave03(t float64) float64 {
var a float64
/* Mean longitude of Venus (IERS Conventions 2003). */
a = fmod(3.176146697+1021.3285546211*t, D2PI)
return a
}

42
vendor/github.com/hebl/gofa/gofa.go generated vendored Normal file
View File

@@ -0,0 +1,42 @@
// Copyright 2022 HE Boliang
// All rights reserved.
package gofa
const (
VERSION = 1.18
)
/*
ASTROM Star-independent astrometry parameters
(Vectors Eb, Eh, Em and V are all with respect to BCRS axes.)
*/
type ASTROM struct {
Pmt float64 /* PM time interval (SSB, Julian years) */
Eb [3]float64 /* SSB to observer (vector, au) */
Eh [3]float64 /* Sun to observer (unit vector) */
Em float64 /* distance from Sun to observer (au) */
V [3]float64 /* barycentric observer velocity (vector, c) */
Bm1 float64 /* sqrt(1-|v|^2): reciprocal of Lorenz factor */
Bpn [3][3]float64 /* bias-precession-nutation matrix */
Along float64 /* longitude + s' + dERA(DUT) (radians) */
Phi float64 /* geodetic latitude (radians) */
Xpl float64 /* polar motion xp wrt local meridian (radians) */
Ypl float64 /* polar motion yp wrt local meridian (radians) */
Sphi float64 /* sine of geodetic latitude */
Cphi float64 /* cosine of geodetic latitude */
Diurab float64 /* magnitude of diurnal aberration vector */
Eral float64 /* "local" Earth rotation angle (radians) */
Refa float64 /* refraction constant A (radians) */
Refb float64 /* refraction constant B (radians) */
}
/*
LDBODY Body parameters for light deflection
*/
type LDBODY struct {
Bm float64 /* mass of the body (solar masses) */
Dl float64 /* deflection limiter (radians^2/2) */
Pv [2][3]float64 /* barycentric PV of the body (au, au/day) */
}

174
vendor/github.com/hebl/gofa/gofam.go generated vendored Normal file
View File

@@ -0,0 +1,174 @@
// Copyright 2022 HE Boliang
// All rights reserved.
package gofa
// Constant value and math functions
import "math"
// Const
const (
/* Pi */
DPI = 3.141592653589793238462643
/* 2Pi */
D2PI = 6.283185307179586476925287
/* Pi/2 */
DPI2 = 1.570796326794896619231322
/* Radians to degrees */
DR2D = 57.29577951308232087679815
/* Degrees to radians */
DD2R = 1.745329251994329576923691e-2
/* Radians to arcseconds */
DR2AS = 206264.8062470963551564734
/* Arcseconds to radians */
DAS2R = 4.848136811095359935899141e-6
/* Seconds of time to radians */
DS2R = 7.272205216643039903848712e-5
/* Arcseconds in a full circle */
TURNAS = 1296000.0
/* Milliarcseconds to radians */
DMAS2R = (DAS2R / 1e3)
/* Length of tropical year B1900 (days) */
DTY = 365.242198781
/* Seconds per day. */
DAYSEC = 86400.0
/* Days per Julian year */
DJY = 365.25
/* Days per Julian century */
DJC = 36525.0
/* Days per Julian millennium */
DJM = 365250.0
/* Reference epoch (J2000.0), Julian Date */
DJ00 = 2451545.0
/* Julian Date of Modified Julian Date zero */
DJM0 = 2400000.5
/* Reference epoch (J2000.0), Modified Julian Date */
DJM00 = 51544.5
/* 1977 Jan 1.0 as MJD */
DJM77 = 43144.0
/* TT minus TAI (s) */
TTMTAI = 32.184
/* Astronomical unit (m, IAU 2012) */
DAU = 149597870.7e3
/* Speed of light (m/s) */
CMPS = 299792458.0
/* Light time for 1 au (s) */
AULT = (DAU / CMPS)
/* Speed of light (au per day) */
DC = (DAYSEC / AULT)
/* L_G = 1 - d(TT)/d(TCG) */
ELG = 6.969290134e-10
/* L_B = 1 - d(TDB)/d(TCB), and TDB (s) at TAI 1977/1/1.0 */
ELB = 1.550519768e-8
TDB0 = -6.55e-5
/* Schwarzschild radius of the Sun (au) */
/* = 2 * 1.32712440041e20 / (2.99792458e8)^2 / 1.49597870700e11 */
SRS = 1.97412574336e-8
/* Reference ellipsoids */
WGS84 = 1
GRS80 = 2
WGS72 = 3
//
DBL_EPSILON = 2.220446049250313080847263336181640625e-16
)
/* dint(A) - truncate to nearest whole number towards zero (double) */
func dint(A float64) float64 {
if A < 0.0 {
return math.Ceil(A)
} else {
return math.Floor(A)
}
}
/* dnint(A) - round to nearest whole number (double) */
func dnint(A float64) float64 {
if math.Abs(A) < 0.5 {
return 0.0
} else {
if A < 0.0 {
return math.Ceil(A - 0.5)
} else {
return math.Floor(A + 0.5)
}
}
}
/* dsign(A,B) - magnitude of A with sign of B (double) */
func dsign(A, B float64) float64 {
if B < 0.0 {
return -math.Abs(A)
} else {
return math.Abs(A)
}
}
/* max(A,B) - larger (most +ve) of two numbers (generic) */
func gmax(A, B float64) float64 {
if A > B {
return A
}
return B
}
/* min(A,B) - smaller (least +ve) of two numbers (generic) */
func gmin(A, B float64) float64 {
if A < B {
return A
}
return B
}
func abs(A int) int {
if A < 0 {
return -A
} else {
return A
}
}
//math function
func fabs(x float64) float64 { return math.Abs(x) }
func sin(x float64) float64 { return math.Sin(x) }
func cos(x float64) float64 { return math.Cos(x) }
func tan(x float64) float64 { return math.Tan(x) }
func asin(x float64) float64 { return math.Asin(x) }
func atan(x float64) float64 { return math.Atan(x) }
func atan2(x, y float64) float64 { return math.Atan2(x, y) }
func sqrt(x float64) float64 { return math.Sqrt(x) }
func fmod(x, y float64) float64 { return math.Mod(x, y) }
func pow10(n int) float64 { return math.Pow10(n) }
func pow(x, y float64) float64 { return math.Pow(x, y) }
const (
sqrt2 = math.Sqrt2
)

442
vendor/github.com/hebl/gofa/jd.go generated vendored Normal file
View File

@@ -0,0 +1,442 @@
// Copyright 2022 HE Boliang
// All rights reserved.
package gofa
// Calendar
/*
Cal2jd Gregorian Calendar to Julian Date.
Given:
iy,im,id int year, month, day in Gregorian calendar (Note 1)
Returned:
djm0 float64 MJD zero-point: always 2400000.5
djm float64 Modified Julian Date for 0 hrs
Returned (function value):
int status:
0 = OK
-1 = bad year (Note 3: JD not computed)
-2 = bad month (JD not computed)
-3 = bad day (JD computed)
Notes:
1. The algorithm used is valid from -4800 March 1, but this
implementation rejects dates before -4799 January 1.
2. The Julian Date is returned in two pieces, in the usual SOFA
manner, which is designed to preserve time resolution. The
Julian Date is available as a single number by adding djm0 and
djm.
3. In early eras the conversion is from the "Proleptic Gregorian
Calendar"; no account is taken of the date(s) of adoption of
the Gregorian Calendar, nor is the AD/BC numbering convention
observed.
Reference:
Explanatory Supplement to the Astronomical Almanac,
P. Kenneth Seidelmann (ed), University Science Books (1992),
Section 12.92 (p604).
*/
func Cal2jd(iy, im, id int, djm0, djm *float64) int {
var j, ly, my int
var iypmy int
/* Earliest year allowed (4800BC) */
const IYMIN = -4799
/* Month lengths in days */
mtab := []int{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
/* Preset status. */
j = 0
/* Validate year and month. */
if iy < IYMIN {
return -1
}
if im < 1 || im > 12 {
return -2
}
/* If February in a leap year, 1, otherwise 0. */
// ly = ((im == 2) && !(iy%4) && (iy%100 || !(iy%400)));
if (im == 2) && (iy%4 == 0) && ((iy%100 != 0) || (iy%400 == 0)) {
ly = 1
} else {
ly = 0
}
/* Validate day, taking into account leap years. */
if (id < 1) || (id > (mtab[im-1] + ly)) {
j = -3
}
/* Return result. */
my = (im - 14) / 12
iypmy = (iy + my)
*djm0 = DJM0
*djm = float64((1461*(iypmy+4800))/4 + (367*(im-2-12*my))/12 - (3*((iypmy+4900)/100))/4 + id - 2432076)
/* Return status. */
return j
}
/*
Jd2cal Julian Date to Gregorian year, month, day, and fraction of a day.
Given:
dj1,dj2 float64 Julian Date (Notes 1, 2)
Returned (arguments):
iy int year
im int month
id int day
fd float64 fraction of day
Returned (function value):
int status:
0 = OK
-1 = unacceptable date (Note 1)
Notes:
1) The earliest valid date is -68569.5 (-4900 March 1). The
largest value accepted is 1e9.
2) The Julian Date is apportioned in any convenient way between
the arguments dj1 and dj2. For example, JD=2450123.7 could
be expressed in any of these ways, among others:
dj1 dj2
2450123.7 0.0 (JD method)
2451545.0 -1421.3 (J2000 method)
2400000.5 50123.2 (MJD method)
2450123.5 0.2 (date & time method)
Separating integer and fraction uses the "compensated summation"
algorithm of Kahan-Neumaier to preserve as much precision as
possible irrespective of the jd1+jd2 apportionment.
3) In early eras the conversion is from the "proleptic Gregorian
calendar"; no account is taken of the date(s) of adoption of
the Gregorian calendar, nor is the AD/BC numbering convention
observed.
References:
Explanatory Supplement to the Astronomical Almanac,
P. Kenneth Seidelmann (ed), University Science Books (1992),
Section 12.92 (p604).
Klein, A., A Generalized Kahan-Babuska-Summation-Algorithm.
Computing, 76, 279-293 (2006), Section 3.
*/
func Jd2cal(dj1, dj2 float64, iy, im, id *int, fd *float64) int {
/* Minimum and maximum allowed JD */
const DJMIN = -68569.5
const DJMAX = 1e9
var jd, i, l, n, k int64
var dj, f1, f2, d, s, cs, x, t, f float64
var v [2]float64
/* Verify date is acceptable. */
dj = dj1 + dj2
if dj < DJMIN || dj > DJMAX {
return -1
}
/* Separate day and fraction (where -0.5 <= fraction < 0.5). */
d = dnint(dj1)
f1 = dj1 - d
jd = int64(d)
d = dnint(dj2)
f2 = dj2 - d
jd += int64(d)
/* Compute f1+f2+0.5 using compensated summation (Klein 2006). */
s = 0.5
cs = 0.0
v[0] = f1
v[1] = f2
for i := 0; i < 2; i++ {
x = v[i]
t = s + x
if fabs(s) >= fabs(x) {
cs += (s - t) + x
} else {
cs += (x - t) + s
}
s = t
if s >= 1.0 {
jd++
s -= 1.0
}
}
f = s + cs
cs = f - s
/* Deal with negative f. */
if f < 0.0 {
/* Compensated summation: assume that |s| <= 1.0. */
f = s + 1.0
cs += (1.0 - f) + s
s = f
f = s + cs
cs = f - s
jd--
}
/* Deal with f that is 1.0 or more (when rounded to double). */
if (f - 1.0) >= -DBL_EPSILON/4.0 {
/* Compensated summation: assume that |s| <= 1.0. */
t = s - 1.0
cs += (s - t) - 1.0
s = t
f = s + cs
if -DBL_EPSILON/2.0 < f {
jd++
f = gmax(f, 0.0)
}
}
/* Express day in Gregorian calendar. */
l = jd + 68569
n = (4 * l) / 146097
l -= (146097*n + 3) / 4
i = (4000 * (l + 1)) / 1461001
l -= (1461*i)/4 - 31
k = (80 * l) / 2447
*id = int(l - (2447*k)/80)
l = k / 11
*im = int(k + 2 - 12*l)
*iy = int(100*(n-49) + i + l)
*fd = f
/* Success. */
return 0
}
/*
Jdcalf Julian Date to Gregorian Calendar, expressed in a form convenient
for formatting messages: rounded to a specified precision.
Given:
ndp int number of decimal places of days in fraction
dj1,dj2 float64 dj1+dj2 = Julian Date (Note 1)
Returned:
iymdf [4]int year, month, day, fraction in Gregorian calendar
Returned (function value):
int status:
-1 = date out of range
0 = OK
+1 = NDP not 0-9 (interpreted as 0)
Notes:
1) The Julian Date is apportioned in any convenient way between
the arguments dj1 and dj2. For example, JD=2450123.7 could
be expressed in any of these ways, among others:
dj1 dj2
2450123.7 0.0 (JD method)
2451545.0 -1421.3 (J2000 method)
2400000.5 50123.2 (MJD method)
2450123.5 0.2 (date & time method)
2) In early eras the conversion is from the "Proleptic Gregorian
Calendar"; no account is taken of the date(s) of adoption of
the Gregorian Calendar, nor is the AD/BC numbering convention
observed.
3) See also the function Jd2cal.
4) The number of decimal places ndp should be 4 or less if internal
overflows are to be avoided on platforms which use 16-bit
integers.
Called:
Jd2cal JD to Gregorian calendar
Reference:
Explanatory Supplement to the Astronomical Almanac,
P. Kenneth Seidelmann (ed), University Science Books (1992),
Section 12.92 (p604).
*/
func Jdcalf(ndp int, dj1, dj2 float64, iymdf *[4]int) int {
var j, js int
var denom, d1, d2, f1, f2, d, djd, f, rf float64
/* Denominator of fraction (e.g. 100 for 2 decimal places). */
if (ndp >= 0) && (ndp <= 9) {
j = 0
denom = pow10(ndp)
} else {
j = 1
denom = 1.0
}
/* Copy the date, big then small. */
if fabs(dj1) >= fabs(dj2) {
d1 = dj1
d2 = dj2
} else {
d1 = dj2
d2 = dj1
}
/* Realign to midnight (without rounding error). */
d1 -= 0.5
/* Separate day and fraction (as precisely as possible). */
d = dnint(d1)
f1 = d1 - d
djd = d
d = dnint(d2)
f2 = d2 - d
djd += d
d = dnint(f1 + f2)
f = (f1 - d) + f2
if f < 0.0 {
f += 1.0
d -= 1.0
}
djd += d
/* Round the total fraction to the specified number of places. */
rf = dnint(f*denom) / denom
/* Re-align to noon. */
djd += 0.5
/* Convert to Gregorian calendar. */
js = Jd2cal(djd, rf, &iymdf[0], &iymdf[1], &iymdf[2], &f)
if js == 0 {
iymdf[3] = int(dnint(f * denom))
} else {
j = js
}
/* Return the status. */
return j
}
/*
Epb Julian Date to Besselian Epoch.
Given:
dj1,dj2 float64 Julian Date (see note)
Returned (function value):
float64 Besselian Epoch.
Note:
The Julian Date is supplied in two pieces, in the usual SOFA
manner, which is designed to preserve time resolution. The
Julian Date is available as a single number by adding dj1 and
dj2. The maximum resolution is achieved if dj1 is 2451545.0
(J2000.0).
Reference:
Lieske, J.H., 1979. Astron.Astrophys., 73, 282.
*/
func Epb(dj1, dj2 float64) float64 {
/* J2000.0-B1900.0 (2415019.81352) in days */
const D1900 = 36524.68648
return 1900.0 + ((dj1-DJ00)+(dj2+D1900))/DTY
}
/*
Epb2jd Besselian Epoch to Julian Date.
Given:
epb float64 Besselian Epoch (e.g. 1957.3)
Returned:
djm0 float64 MJD zero-point: always 2400000.5
djm float64 Modified Julian Date
Note:
The Julian Date is returned in two pieces, in the usual SOFA
manner, which is designed to preserve time resolution. The
Julian Date is available as a single number by adding djm0 and
djm.
Reference:
Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
*/
func Epb2jd(epb float64, djm0, djm *float64) {
*djm0 = DJM0
*djm = 15019.81352 + (epb-1900.0)*DTY
}
/*
Epj Julian Date to Julian Epoch.
Given:
dj1,dj2 float64 Julian Date (see note)
Returned (function value):
float64 Julian Epoch
Note:
The Julian Date is supplied in two pieces, in the usual SOFA
manner, which is designed to preserve time resolution. The
Julian Date is available as a single number by adding dj1 and
dj2. The maximum resolution is achieved if dj1 is 2451545.0
(J2000.0).
Reference:
Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
*/
func Epj(dj1, dj2 float64) float64 {
epj := 2000.0 + ((dj1-DJ00)+dj2)/DJY
return epj
}
/*
Epj2jd Julian Epoch to Julian Date.
Given:
epj float64 Julian Epoch (e.g. 1996.8)
Returned:
djm0 float64 MJD zero-point: always 2400000.5
djm float64 Modified Julian Date
Note:
The Julian Date is returned in two pieces, in the usual SOFA
manner, which is designed to preserve time resolution. The
Julian Date is available as a single number by adding djm0 and
djm.
Reference:
Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
*/
func Epj2jd(epj float64, djm0, djm *float64) {
*djm0 = DJM0
*djm = DJM00 + (epj-2000.0)*365.25
}

10273
vendor/github.com/hebl/gofa/pn.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

563
vendor/github.com/hebl/gofa/projection.go generated vendored Normal file
View File

@@ -0,0 +1,563 @@
// Copyright 2022 HE Boliang
// All rights reserved.
package gofa
/*
Tpxes Project celestial to tangent plane, spherical
In the tangent plane projection, given celestial spherical
coordinates for a star and the tangent point, solve for the star's
rectangular coordinates in the tangent plane.
Given:
a,b float64 star's spherical coordinates
a0,b0 float64 tangent point's spherical coordinates
Returned:
xi,eta float64 rectangular coordinates of star image (Note 2)
Returned (function value):
int status: 0 = OK
1 = star too far from axis
2 = antistar on tangent plane
3 = antistar too far from axis
Notes:
1) The tangent plane projection is also called the "gnomonic
projection" and the "central projection".
2) The eta axis points due north in the adopted coordinate system.
If the spherical coordinates are observed (RA,Dec), the tangent
plane coordinates (xi,eta) are conventionally called the
"standard coordinates". For right-handed spherical coordinates,
(xi,eta) are also right-handed. The units of (xi,eta) are,
effectively, radians at the tangent point.
3) All angular arguments are in radians.
4) This function is a member of the following set:
spherical vector solve for
> iauTpxes < iauTpxev xi,eta
iauTpsts iauTpstv star
iauTpors iauTporv origin
References:
Calabretta M.R. & Greisen, E.W., 2002, "Representations of
celestial coordinates in FITS", Astron.Astrophys. 395, 1077
Green, R.M., "Spherical Astronomy", Cambridge University Press,
1987, Chapter 13.
*/
func Tpxes(a, b, a0, b0 float64, xi, eta *float64) int {
const TINY = 1e-6
var j int
var sb0, sb, cb0, cb, da, sda, cda, d float64
/* Functions of the spherical coordinates. */
sb0 = sin(b0)
sb = sin(b)
cb0 = cos(b0)
cb = cos(b)
da = a - a0
sda = sin(da)
cda = cos(da)
/* Reciprocal of star vector length to tangent plane. */
d = sb*sb0 + cb*cb0*cda
/* Check for error cases. */
if d > TINY {
j = 0
} else if d >= 0.0 {
j = 1
d = TINY
} else if d > -TINY {
j = 2
d = -TINY
} else {
j = 3
}
/* Return the tangent plane coordinates (even in dubious cases). */
*xi = cb * sda / d
*eta = (sb*cb0 - cb*sb0*cda) / d
/* Return the status. */
return j
}
/*
Tpxev Project celestial to tangent plane, vector
In the tangent plane projection, given celestial direction cosines
for a star and the tangent point, solve for the star's rectangular
coordinates in the tangent plane.
Given:
v [3]float64 direction cosines of star (Note 4)
v0 [3]float64 direction cosines of tangent point (Note 4)
Returned:
xi,eta float64 tangent plane coordinates of star
Returned (function value):
int status: 0 = OK
1 = star too far from axis
2 = antistar on tangent plane
3 = antistar too far from axis
Notes:
1) The tangent plane projection is also called the "gnomonic
projection" and the "central projection".
2) The eta axis points due north in the adopted coordinate system.
If the direction cosines represent observed (RA,Dec), the tangent
plane coordinates (xi,eta) are conventionally called the
"standard coordinates". If the direction cosines are with
respect to a right-handed triad, (xi,eta) are also right-handed.
The units of (xi,eta) are, effectively, radians at the tangent
point.
3) The method used is to extend the star vector to the tangent
plane and then rotate the triad so that (x,y) becomes (xi,eta).
Writing (a,b) for the celestial spherical coordinates of the
star, the sequence of rotations is (a+pi/2) around the z-axis
followed by (pi/2-b) around the x-axis.
4) If vector v0 is not of unit length, or if vector v is of zero
length, the results will be wrong.
5) If v0 points at a pole, the returned (xi,eta) will be based on
the arbitrary assumption that the longitude coordinate of the
tangent point is zero.
6) This function is a member of the following set:
spherical vector solve for
iauTpxes > iauTpxev < xi,eta
iauTpsts iauTpstv star
iauTpors iauTporv origin
References:
Calabretta M.R. & Greisen, E.W., 2002, "Representations of
celestial coordinates in FITS", Astron.Astrophys. 395, 1077
Green, R.M., "Spherical Astronomy", Cambridge University Press,
1987, Chapter 13.
*/
func Tpxev(v, v0 [3]float64, xi, eta *float64) int {
const TINY = 1e-6
var j int
var x, y, z, x0, y0, z0, r2, r, w, d float64
/* Star and tangent point. */
x = v[0]
y = v[1]
z = v[2]
x0 = v0[0]
y0 = v0[1]
z0 = v0[2]
/* Deal with polar case. */
r2 = x0*x0 + y0*y0
r = sqrt(r2)
if r == 0.0 {
r = 1e-20
x0 = r
}
/* Reciprocal of star vector length to tangent plane. */
w = x*x0 + y*y0
d = w + z*z0
/* Check for error cases. */
if d > TINY {
j = 0
} else if d >= 0.0 {
j = 1
d = TINY
} else if d > -TINY {
j = 2
d = -TINY
} else {
j = 3
}
/* Return the tangent plane coordinates (even in dubious cases). */
d *= r
*xi = (y*x0 - x*y0) / d
*eta = (z*r2 - z0*w) / d
/* Return the status. */
return j
}
/*
Tpsts Project tangent plane to celestial, spherical
In the tangent plane projection, given the star's rectangular
coordinates and the spherical coordinates of the tangent point,
solve for the spherical coordinates of the star.
Given:
xi,eta float64 rectangular coordinates of star image (Note 2)
a0,b0 float64 tangent point's spherical coordinates
Returned:
a,b float64 star's spherical coordinates
Notes:
1) The tangent plane projection is also called the "gnomonic
projection" and the "central projection".
2) The eta axis points due north in the adopted coordinate system.
If the spherical coordinates are observed (RA,Dec), the tangent
plane coordinates (xi,eta) are conventionally called the
"standard coordinates". If the spherical coordinates are with
respect to a right-handed triad, (xi,eta) are also right-handed.
The units of (xi,eta) are, effectively, radians at the tangent
point.
3) All angular arguments are in radians.
4) This function is a member of the following set:
spherical vector solve for
iauTpxes iauTpxev xi,eta
> iauTpsts < iauTpstv star
iauTpors iauTporv origin
Called:
Anp normalize angle into range 0 to 2pi
References:
Calabretta M.R. & Greisen, E.W., 2002, "Representations of
celestial coordinates in FITS", Astron.Astrophys. 395, 1077
Green, R.M., "Spherical Astronomy", Cambridge University Press,
1987, Chapter 13.
*/
func Tpsts(xi, eta, a0, b0 float64, a, b *float64) {
var sb0, cb0, d float64
sb0 = sin(b0)
cb0 = cos(b0)
d = cb0 - eta*sb0
*a = Anp(atan2(xi, d) + a0)
*b = atan2(sb0+eta*cb0, sqrt(xi*xi+d*d))
}
/*
Tpstv Project tangent plane to celestial, vector
In the tangent plane projection, given the star's rectangular
coordinates and the direction cosines of the tangent point, solve
for the direction cosines of the star.
Given:
xi,eta float64 rectangular coordinates of star image (Note 2)
v0 [3]float64 tangent point's direction cosines
Returned:
v [3]float64 star's direction cosines
Notes:
1) The tangent plane projection is also called the "gnomonic
projection" and the "central projection".
2) The eta axis points due north in the adopted coordinate system.
If the direction cosines represent observed (RA,Dec), the tangent
plane coordinates (xi,eta) are conventionally called the
"standard coordinates". If the direction cosines are with
respect to a right-handed triad, (xi,eta) are also right-handed.
The units of (xi,eta) are, effectively, radians at the tangent
point.
3) The method used is to complete the star vector in the (xi,eta)
based triad and normalize it, then rotate the triad to put the
tangent point at the pole with the x-axis aligned to zero
longitude. Writing (a0,b0) for the celestial spherical
coordinates of the tangent point, the sequence of rotations is
(b-pi/2) around the x-axis followed by (-a-pi/2) around the
z-axis.
4) If vector v0 is not of unit length, the returned vector v will
be wrong.
5) If vector v0 points at a pole, the returned vector v will be
based on the arbitrary assumption that the longitude coordinate
of the tangent point is zero.
6) This function is a member of the following set:
spherical vector solve for
iauTpxes iauTpxev xi,eta
iauTpsts > iauTpstv < star
iauTpors iauTporv origin
References:
Calabretta M.R. & Greisen, E.W., 2002, "Representations of
celestial coordinates in FITS", Astron.Astrophys. 395, 1077
Green, R.M., "Spherical Astronomy", Cambridge University Press,
1987, Chapter 13.
*/
func Tpstv(xi, eta float64, v0 [3]float64, v *[3]float64) {
var x, y, z, f, r float64
/* Tangent point. */
x = v0[0]
y = v0[1]
z = v0[2]
/* Deal with polar case. */
r = sqrt(x*x + y*y)
if r == 0.0 {
r = 1e-20
x = r
}
/* Star vector length to tangent plane. */
f = sqrt(1.0 + xi*xi + eta*eta)
/* Apply the transformation and normalize. */
v[0] = (x - (xi*y+eta*x*z)/r) / f
v[1] = (y + (xi*x-eta*y*z)/r) / f
v[2] = (z + eta*r) / f
}
/*
Tpors Solve for tangent point, spherical
In the tangent plane projection, given the rectangular coordinates
of a star and its spherical coordinates, determine the spherical
coordinates of the tangent point.
Given:
xi,eta float64 rectangular coordinates of star image (Note 2)
a,b float64 star's spherical coordinates (Note 3)
Returned:
a01,b01 float64 tangent point's spherical coordinates, Soln. 1
a02,b02 float64 tangent point's spherical coordinates, Soln. 2
Returned (function value):
int number of solutions:
0 = no solutions returned (Note 5)
1 = only the first solution is useful (Note 6)
2 = both solutions are useful (Note 6)
Notes:
1) The tangent plane projection is also called the "gnomonic
projection" and the "central projection".
2) The eta axis points due north in the adopted coordinate system.
If the spherical coordinates are observed (RA,Dec), the tangent
plane coordinates (xi,eta) are conventionally called the
"standard coordinates". If the spherical coordinates are with
respect to a right-handed triad, (xi,eta) are also right-handed.
The units of (xi,eta) are, effectively, radians at the tangent
point.
3) All angular arguments are in radians.
4) The angles a01 and a02 are returned in the range 0-2pi. The
angles b01 and b02 are returned in the range +/-pi, but in the
usual, non-pole-crossing, case, the range is +/-pi/2.
5) Cases where there is no solution can arise only near the poles.
For example, it is clearly impossible for a star at the pole
itself to have a non-zero xi value, and hence it is meaningless
to ask where the tangent point would have to be to bring about
this combination of xi and dec.
6) Also near the poles, cases can arise where there are two useful
solutions. The return value indicates whether the second of the
two solutions returned is useful; 1 indicates only one useful
solution, the usual case.
7) The basis of the algorithm is to solve the spherical triangle PSC,
where P is the north celestial pole, S is the star and C is the
tangent point. The spherical coordinates of the tangent point are
[a0,b0]; writing rho^2 = (xi^2+eta^2) and r^2 = (1+rho^2), side c
is then (pi/2-b), side p is sqrt(xi^2+eta^2) and side s (to be
found) is (pi/2-b0). Angle C is given by sin(C) = xi/rho and
cos(C) = eta/rho. Angle P (to be found) is the longitude
difference between star and tangent point (a-a0).
8) This function is a member of the following set:
spherical vector solve for
iauTpxes iauTpxev xi,eta
iauTpsts iauTpstv star
> iauTpors < iauTporv origin
Called:
Anp normalize angle into range 0 to 2pi
References:
Calabretta M.R. & Greisen, E.W., 2002, "Representations of
celestial coordinates in FITS", Astron.Astrophys. 395, 1077
Green, R.M., "Spherical Astronomy", Cambridge University Press,
1987, Chapter 13.
*/
func Tpors(xi, eta, a, b float64, a01, b01, a02, b02 *float64) int {
var xi2, r, sb, cb, rsb, rcb, w2, w, s, c float64
xi2 = xi * xi
r = sqrt(1.0 + xi2 + eta*eta)
sb = sin(b)
cb = cos(b)
rsb = r * sb
rcb = r * cb
w2 = rcb*rcb - xi2
if w2 >= 0.0 {
w = sqrt(w2)
s = rsb - eta*w
c = rsb*eta + w
if xi == 0.0 && w == 0.0 {
w = 1.0
}
*a01 = Anp(a - atan2(xi, w))
*b01 = atan2(s, c)
w = -w
s = rsb - eta*w
c = rsb*eta + w
*a02 = Anp(a - atan2(xi, w))
*b02 = atan2(s, c)
if fabs(rsb) < 1.0 {
return 1
} else {
return 2
}
} else {
return 0
}
}
/*
Tporv Solve for tangent point, vector
In the tangent plane projection, given the rectangular coordinates
of a star and its direction cosines, determine the direction
cosines of the tangent point.
Given:
xi,eta float64 rectangular coordinates of star image (Note 2)
v [3]float64 star's direction cosines (Note 3)
Returned:
v01 [3]float64 tangent point's direction cosines, Solution 1
v02 [3]float64 tangent point's direction cosines, Solution 2
Returned (function value):
int number of solutions:
0 = no solutions returned (Note 4)
1 = only the first solution is useful (Note 5)
2 = both solutions are useful (Note 5)
Notes:
1) The tangent plane projection is also called the "gnomonic
projection" and the "central projection".
2) The eta axis points due north in the adopted coordinate system.
If the direction cosines represent observed (RA,Dec), the tangent
plane coordinates (xi,eta) are conventionally called the
"standard coordinates". If the direction cosines are with
respect to a right-handed triad, (xi,eta) are also right-handed.
The units of (xi,eta) are, effectively, radians at the tangent
point.
3) The vector v must be of unit length or the result will be wrong.
4) Cases where there is no solution can arise only near the poles.
For example, it is clearly impossible for a star at the pole
itself to have a non-zero xi value, and hence it is meaningless
to ask where the tangent point would have to be.
5) Also near the poles, cases can arise where there are two useful
solutions. The return value indicates whether the second of the
two solutions returned is useful; 1 indicates only one useful
solution, the usual case.
6) The basis of the algorithm is to solve the spherical triangle
PSC, where P is the north celestial pole, S is the star and C is
the tangent point. Calling the celestial spherical coordinates
of the star and tangent point (a,b) and (a0,b0) respectively, and
writing rho^2 = (xi^2+eta^2) and r^2 = (1+rho^2), and
transforming the vector v into (a,b) in the normal way, side c is
then (pi/2-b), side p is sqrt(xi^2+eta^2) and side s (to be
found) is (pi/2-b0), while angle C is given by sin(C) = xi/rho
and cos(C) = eta/rho; angle P (to be found) is (a-a0). After
solving the spherical triangle, the result (a0,b0) can be
expressed in vector form as v0.
7) This function is a member of the following set:
spherical vector solve for
iauTpxes iauTpxev xi,eta
iauTpsts iauTpstv star
iauTpors > iauTporv < origin
References:
Calabretta M.R. & Greisen, E.W., 2002, "Representations of
celestial coordinates in FITS", Astron.Astrophys. 395, 1077
Green, R.M., "Spherical Astronomy", Cambridge University Press,
1987, Chapter 13.
*/
func Tporv(xi, eta float64, v [3]float64, v01, v02 *[3]float64) int {
var x, y, z, rxy2, xi2, eta2p1, r, rsb, rcb, w2, w, c float64
x = v[0]
y = v[1]
z = v[2]
rxy2 = x*x + y*y
xi2 = xi * xi
eta2p1 = eta*eta + 1.0
r = sqrt(xi2 + eta2p1)
rsb = r * z
rcb = r * sqrt(x*x+y*y)
w2 = rcb*rcb - xi2
if w2 > 0.0 {
w = sqrt(w2)
c = (rsb*eta + w) / (eta2p1 * sqrt(rxy2*(w2+xi2)))
v01[0] = c * (x*w + y*xi)
v01[1] = c * (y*w - x*xi)
v01[2] = (rsb - eta*w) / eta2p1
w = -w
c = (rsb*eta + w) / (eta2p1 * sqrt(rxy2*(w2+xi2)))
v02[0] = c * (x*w + y*xi)
v02[1] = c * (y*w - x*xi)
v02[2] = (rsb - eta*w) / eta2p1
if fabs(rsb) < 1.0 {
return 1
} else {
return 2
}
} else {
return 0
}
}

111
vendor/github.com/hebl/gofa/sofa_copyr.txt generated vendored Normal file
View File

@@ -0,0 +1,111 @@
copyr.lis 2021 April 12
COPYRIGHT NOTICE
Text equivalent to that below appears at the end of every SOFA routine
(with one exception). There are small formatting differences between
the Fortran and C versions.
The one exception is the "leap second" routine DAT. This uniquely is
classified as "user replaceable", and has a mitigated license statement
that permits the distribution of local variants under the same name.
This measure allows other SOFA routines to call the local variant, which
may be file or network based, or otherwise equipped to pick up IERS leap
second updates with no need to download new SOFA code.
*+----------------------------------------------------------------------
*
* Copyright (C) 2021
* Standards Of Fundamental Astronomy Board
* of the International Astronomical Union.
*
* =====================
* SOFA Software License
* =====================
*
* NOTICE TO USER:
*
* BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
* CONDITIONS WHICH APPLY TO ITS USE.
*
* 1. The Software is owned by the IAU SOFA Board ("SOFA").
*
* 2. Permission is granted to anyone to use the SOFA software for any
* purpose, including commercial applications, free of charge and
* without payment of royalties, subject to the conditions and
* restrictions listed below.
*
* 3. You (the user) may copy and distribute SOFA source code to others,
* and use and adapt its code and algorithms in your own software,
* on a world-wide, royalty-free basis. That portion of your
* distribution that does not consist of intact and unchanged copies
* of SOFA source code files is a "derived work" that must comply
* with the following requirements:
*
* a) Your work shall be marked or carry a statement that it
* (i) uses routines and computations derived by you from
* software provided by SOFA under license to you; and
* (ii) does not itself constitute software provided by and/or
* endorsed by SOFA.
*
* b) The source code of your derived work must contain descriptions
* of how the derived work is based upon, contains and/or differs
* from the original SOFA software.
*
* c) The names of all routines in your derived work shall not
* include the prefix "iau" or "sofa" or trivial modifications
* thereof such as changes of case.
*
* d) The origin of the SOFA components of your derived work must
* not be misrepresented; you must not claim that you wrote the
* original software, nor file a patent application for SOFA
* software or algorithms embedded in the SOFA software.
*
* e) These requirements must be reproduced intact in any source
* distribution and shall apply to anyone to whom you have
* granted a further right to modify the source code of your
* derived work.
*
* Note that, as originally distributed, the SOFA software is
* intended to be a definitive implementation of the IAU standards,
* and consequently third-party modifications are discouraged. All
* variations, no matter how minor, must be explicitly marked as
* such, as explained above.
*
* 4. You shall not cause the SOFA software to be brought into
* disrepute, either by misuse, or use for inappropriate tasks, or
* by inappropriate modification.
*
* 5. The SOFA software is provided "as is" and SOFA makes no warranty
* as to its use or performance. SOFA does not and cannot warrant
* the performance or results which the user may obtain by using the
* SOFA software. SOFA makes no warranties, express or implied, as
* to non-infringement of third party rights, merchantability, or
* fitness for any particular purpose. In no event will SOFA be
* liable to the user for any consequential, incidental, or special
* damages, including any lost profits or lost savings, even if a
* SOFA representative has been advised of such damages, or for any
* claim by any third party.
*
* 6. The provision of any version of the SOFA software under the terms
* and conditions specified herein does not imply that future
* versions will also be made available under the same terms and
* conditions.
*
* In any published work or commercial product which uses the SOFA
* software directly, acknowledgement (see www.iausofa.org) is
* appreciated.
*
* Correspondence concerning SOFA software should be addressed as
* follows:
*
* By email: sofa@ukho.gov.uk
* By post: IAU SOFA Center
* HM Nautical Almanac Office
* UK Hydrographic Office
* Admiralty Way, Taunton
* Somerset, TA1 2DN
* United Kingdom
*
*-----------------------------------------------------------------------

2930
vendor/github.com/hebl/gofa/ts.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

1245
vendor/github.com/hebl/gofa/vml.go generated vendored Normal file

File diff suppressed because it is too large Load Diff