Skip to content

Commit 5eac42b

Browse files
committed
Move ecliptic obliquity to angle
1 parent ab8b1f0 commit 5eac42b

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

Sources/SwiftAstro/Units/Angle.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@ extension SwiftAstro.Angle {
191191

192192
}
193193

194+
// MARK: - Mean Obliguity Of The Ecliptic
195+
196+
extension SwiftAstro.Angle {
197+
198+
/// The mean obliquity of the ecliptic in the standard equinox of J2000.
199+
public static let meanObliquityOfEclipticAtJ2000 = SwiftAstro.Angle(
200+
degrees: 23.43929111111111
201+
)
202+
203+
}
204+
194205
// MARK: - Operators
195206

196207
extension SwiftAstro.Angle {

Sources/SwiftAstro/Units/Time+Ecliptic.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,12 @@ import Foundation
44

55
extension SwiftAstro.Time {
66

7-
/// The mean obliquity of the ecliptic in the standard equinox of J2000.
8-
public static let meanObliquityOfEclipticAtJ2000 = SwiftAstro.Angle(
9-
degrees: 23.43929111111111
10-
)
11-
127
/// The mean obligquity of the ecliptic.
138
/// - Note : See Equation 21.3, Meeus (1991), p. 135.
149
public var meanObliquityOfEcliptic: SwiftAstro.Angle {
1510
let U = 0.1 * self.julianMilleniaSinceEpoch(.J2000)
1611

17-
let e0 = Self.meanObliquityOfEclipticAtJ2000.degrees
12+
let e0 = SwiftAstro.Angle.meanObliquityOfEclipticAtJ2000.degrees
1813
- 4680.93 * U / 3600.0
1914
- 1.55 * pow(U, 2.0) / 3600.0
2015
+ 1999.25 * pow(U, 3.0) / 3600.0

0 commit comments

Comments
 (0)