Go: added function RotationGalEqj

This commit is contained in:
Don Cross
2023-10-28 16:44:57 -04:00
parent 56a2749147
commit ffc8f41bda
3 changed files with 53 additions and 3 deletions

View File

@@ -1552,6 +1552,26 @@ func RotationEqjGal() RotationMatrix {
return r
}
func RotationGalEqj() RotationMatrix {
r := RotationMatrix{}
// This rotation matrix was calculated by the following script
// in this same source code repository:
// demo/python/galeqj_matrix.py
r.Rot[0][0] = -0.0548624779711344
r.Rot[0][1] = -0.8734572784246782
r.Rot[0][2] = -0.4838000529948520
r.Rot[1][0] = +0.4941095946388765
r.Rot[1][1] = -0.4447938112296831
r.Rot[1][2] = +0.7470034631630423
r.Rot[2][0] = -0.8676668813529025
r.Rot[2][1] = -0.1980677870294097
r.Rot[2][2] = +0.4559861124470794
return r
}
type addSolTerm struct {
coeffl float64
coeffs float64

View File

@@ -61,6 +61,7 @@ It provides a suite of well\-tested functions for calculating positions of the S
- [func RotationEqdEqj\(time \*AstroTime\) RotationMatrix](<#RotationEqdEqj>)
- [func RotationEqjEcl\(\) RotationMatrix](<#RotationEqjEcl>)
- [func RotationEqjGal\(\) RotationMatrix](<#RotationEqjGal>)
- [func RotationGalEqj\(\) RotationMatrix](<#RotationGalEqj>)
- [type SearchContext](<#SearchContext>)
- [type SeasonsInfo](<#SeasonsInfo>)
- [type Spherical](<#Spherical>)
@@ -384,7 +385,7 @@ type AstroVector struct {
```
<a name="GeoMoon"></a>
### func [GeoMoon](<https://github.com/cosinekitty/astronomy/blob/golang/source/golang/astronomy.go#L1763>)
### func [GeoMoon](<https://github.com/cosinekitty/astronomy/blob/golang/source/golang/astronomy.go#L1783>)
```go
func GeoMoon(time AstroTime) AstroVector
@@ -540,7 +541,7 @@ type JupiterMoonsInfo struct {
```
<a name="JupiterMoons"></a>
### func [JupiterMoons](<https://github.com/cosinekitty/astronomy/blob/golang/source/golang/astronomy.go#L1926>)
### func [JupiterMoons](<https://github.com/cosinekitty/astronomy/blob/golang/source/golang/astronomy.go#L1946>)
```go
func JupiterMoons(time AstroTime) JupiterMoonsInfo
@@ -700,8 +701,17 @@ func RotationEqjGal() RotationMatrix
Calculates a rotation matrix from J2000 mean equator \(EQJ\) to galactic \(GAL\).
<a name="RotationGalEqj"></a>
### func [RotationGalEqj](<https://github.com/cosinekitty/astronomy/blob/golang/source/golang/astronomy.go#L1555>)
```go
func RotationGalEqj() RotationMatrix
```
<a name="SearchContext"></a>
## type [SearchContext](<https://github.com/cosinekitty/astronomy/blob/golang/source/golang/astronomy.go#L1959-L1961>)
## type [SearchContext](<https://github.com/cosinekitty/astronomy/blob/golang/source/golang/astronomy.go#L1979-L1981>)

View File

@@ -1552,6 +1552,26 @@ func RotationEqjGal() RotationMatrix {
return r
}
func RotationGalEqj() RotationMatrix {
r := RotationMatrix{}
// This rotation matrix was calculated by the following script
// in this same source code repository:
// demo/python/galeqj_matrix.py
r.Rot[0][0] = -0.0548624779711344
r.Rot[0][1] = -0.8734572784246782
r.Rot[0][2] = -0.4838000529948520
r.Rot[1][0] = +0.4941095946388765
r.Rot[1][1] = -0.4447938112296831
r.Rot[1][2] = +0.7470034631630423
r.Rot[2][0] = -0.8676668813529025
r.Rot[2][1] = -0.1980677870294097
r.Rot[2][2] = +0.4559861124470794
return r
}
type addSolTerm struct {
coeffl float64
coeffs float64