Skip to content

Commit bcb3101

Browse files
Merge pull request #410 from observerly/fix/aberration/spelling
fix!: amend spelling mistake in aberration module across @observerly/astrometry
2 parents ece2e6b + 16a4b05 commit bcb3101

File tree

7 files changed

+40
-40
lines changed

7 files changed

+40
-40
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
"require": "./dist/index.cjs",
4242
"types": "./dist/index.d.ts"
4343
},
44-
"./abberation": {
45-
"import": "./dist/abberation.js",
46-
"require": "./dist/abberation.cjs",
47-
"types": "./dist/abberation.d.ts"
44+
"./aberration": {
45+
"import": "./dist/aberration.js",
46+
"require": "./dist/aberration.cjs",
47+
"types": "./dist/aberration.d.ts"
4848
},
4949
"./astrometry": {
5050
"import": "./dist/astrometry.js",

src/abberation.ts renamed to src/aberration.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************************************************/
22

33
// @author Michael Roberts <[email protected]>
4-
// @package @observerly/astrometry/abberation
4+
// @package @observerly/astrometry/aberration
55
// @license Copyright © 2021-2025 observerly
66

77
/*****************************************************************************************************************/
@@ -29,17 +29,17 @@ import { convertRadiansToDegrees as degrees, convertDegreesToRadians as radians
2929

3030
/**
3131
*
32-
* getCorrectionToEquatorialForAnnualAbberation()
32+
* getCorrectionToEquatorialForAnnualAberration()
3333
*
34-
* Corrects the equatorial coordinate of a target for abberation in
34+
* Corrects the equatorial coordinate of a target for aberration in
3535
* longitude and obliquity due to the apparent motion of the Earth.
3636
*
3737
* @param date - The date to correct the equatorial coordinate for.
3838
* @param target - The equatorial J2000 coordinate of the target.
3939
* @returns The corrected equatorial coordinate of the target.
4040
*
4141
*/
42-
export const getCorrectionToEquatorialForAnnualAbberation = (
42+
export const getCorrectionToEquatorialForAnnualAberration = (
4343
datetime: Date,
4444
target: EquatorialCoordinate
4545
): EquatorialCoordinate => {
@@ -72,7 +72,7 @@ export const getCorrectionToEquatorialForAnnualAbberation = (
7272
// Get the true obliquity of the ecliptic (in degrees):
7373
const ε = radians(getObliquityOfTheEcliptic(datetime) + Δε / 3600)
7474

75-
// Get the constant of abberation (in degrees):
75+
// Get the constant of aberration (in degrees):
7676
const κ = radians(20.49552 / 3600)
7777

7878
// Get the eccentricity of the Earth's orbit (dimensionless):
@@ -84,14 +84,14 @@ export const getCorrectionToEquatorialForAnnualAbberation = (
8484
// Get the true geometric longitude of the sun (in degrees):
8585
const S = radians(getSolarTrueGeometricLongitude(datetime))
8686

87-
// Calculate the abberation correction in right ascension (in radians):
87+
// Calculate the aberration correction in right ascension (in radians):
8888
const Δra =
8989
-κ * (Math.cos(ra) * Math.cos(S) * Math.cos(ε) + (Math.sin(ra) * Math.sin(S)) / Math.cos(dec)) +
9090
e *
9191
κ *
9292
(Math.cos(ra) * Math.cos(ϖ) * Math.cos(ε) + (Math.sin(ra) * Math.sin(ϖ)) / Math.cos(dec))
9393

94-
// Calculate the abberation correction in declination (in radians):
94+
// Calculate the aberration correction in declination (in radians):
9595
const Δdec =
9696
-κ *
9797
(Math.cos(S) * Math.cos(ε) * (Math.tan(ε) * Math.cos(dec) - Math.sin(ra) * Math.sin(dec)) +
@@ -111,17 +111,17 @@ export const getCorrectionToEquatorialForAnnualAbberation = (
111111

112112
/**
113113
*
114-
* getCorrectionToEquatorialForDiurnalAbberation()
114+
* getCorrectionToEquatorialForDiurnalAberration()
115115
*
116-
* Corrects the equatorial coordinate of a target for abberation in
116+
* Corrects the equatorial coordinate of a target for aberration in
117117
* longitude and obliquity due to the apparent motion of the Earth.
118118
*
119119
* @param date - The date to correct the equatorial coordinate for.
120120
* @param target - The equatorial J2000 coordinate of the target.
121121
* @returns The corrected equatorial coordinate of the target.
122122
*
123123
*/
124-
export const getCorrectionToEquatorialForDiurnalAbberation = (
124+
export const getCorrectionToEquatorialForDiurnalAberration = (
125125
datetime: Date,
126126
observer: GeographicCoordinate,
127127
target: EquatorialCoordinate
@@ -139,10 +139,10 @@ export const getCorrectionToEquatorialForDiurnalAbberation = (
139139
// Calculate the observer's tangential velocity due to Earth's rotation (in m/s):
140140
const v = Ω * EARTH_RADIUS * Math.cos(phi)
141141

142-
// Calculate the abberation correction in right ascension (in radians):
142+
// Calculate the aberration correction in right ascension (in radians):
143143
const Δra = ((v / c) * (Math.cos(phi) * Math.sin(ha))) / Math.cos(dec)
144144

145-
// Calculate the abberation correction in declination (in radians):
145+
// Calculate the aberration correction in declination (in radians):
146146
const Δdec =
147147
(v / c) * (Math.sin(phi) * Math.cos(dec) - Math.cos(phi) * Math.sin(dec) * Math.cos(ha))
148148

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/*****************************************************************************************************************/
88

9-
export * from './abberation'
9+
export * from './aberration'
1010
export * from './astrometry'
1111
export * from './common'
1212
export * from './conjunction'

src/observation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/*****************************************************************************************************************/
88

9-
import { getCorrectionToEquatorialForAnnualAbberation } from './abberation'
9+
import { getCorrectionToEquatorialForAnnualAberration } from './aberration'
1010

1111
import { getHourAngle } from './astrometry'
1212

@@ -141,15 +141,15 @@ export class Observation extends Object {
141141
}
142142

143143
private setEquatorialCoordinates(target: EquatorialCoordinate) {
144-
const abberation = getCorrectionToEquatorialForAnnualAbberation(this.datetime, target)
144+
const aberration = getCorrectionToEquatorialForAnnualAberration(this.datetime, target)
145145

146146
const nutation = getCorrectionToEquatorialForNutation(this.datetime, target)
147147

148148
const precession = getCorrectionToEquatorialForPrecessionOfEquinoxes(this.datetime, target)
149149

150-
const α = target.ra + abberation.ra + nutation.ra + precession.ra
150+
const α = target.ra + aberration.ra + nutation.ra + precession.ra
151151

152-
const δ = target.dec + abberation.dec + nutation.dec + precession.dec
152+
const δ = target.dec + aberration.dec + nutation.dec + precession.dec
153153

154154
// Ensure the Right Ascension is normalized to the range [0, 360):
155155
this.ra = getNormalizedAzimuthalDegree(α)

src/q.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/*****************************************************************************************************************/
88

9-
import { getCorrectionToEquatorialForAnnualAbberation } from './abberation'
9+
import { getCorrectionToEquatorialForAnnualAberration } from './aberration'
1010

1111
import { getAngularSeparation } from './astrometry'
1212

@@ -135,18 +135,18 @@ export function getQIndex(
135135
// Correct the target's equatorial coordinates for the precession of the equinoxes:
136136
const precession = getCorrectionToEquatorialForPrecessionOfEquinoxes(datetime, target)
137137

138-
// Get the correction to the target's equatorial coordinates for abberation:
139-
const abberation = getCorrectionToEquatorialForAnnualAbberation(datetime, target)
138+
// Get the correction to the target's equatorial coordinates for aberration:
139+
const aberration = getCorrectionToEquatorialForAnnualAberration(datetime, target)
140140

141141
// Get the correction to the target's equatorial coordinates for nutation:
142142
const nutation = getCorrectionToEquatorialForNutation(datetime, target)
143143

144144
// Get the normalized azimuthal of the target:
145-
const ra = getNormalizedAzimuthalDegree(target.ra + precession.ra + abberation.ra + nutation.ra)
145+
const ra = getNormalizedAzimuthalDegree(target.ra + precession.ra + aberration.ra + nutation.ra)
146146

147147
// Get the normalized declination of the target:
148148
const dec = getNormalizedInclinationDegree(
149-
target.dec + precession.dec + abberation.dec + nutation.dec
149+
target.dec + precession.dec + aberration.dec + nutation.dec
150150
)
151151

152152
// Convert the target's equatorial coordinates to horizontal coordinates:

tests/abberation.spec.ts renamed to tests/aberration.spec.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { describe, expect, it } from 'vitest'
1010

1111
/*****************************************************************************************************************/
1212

13-
import { type EquatorialCoordinate, getCorrectionToEquatorialForAnnualAbberation, getCorrectionToEquatorialForDiurnalAbberation } from '../src'
13+
import { type EquatorialCoordinate, getCorrectionToEquatorialForAnnualAberration, getCorrectionToEquatorialForDiurnalAberration } from '../src'
1414

1515
/*****************************************************************************************************************/
1616

@@ -29,36 +29,36 @@ const betelgeuse: EquatorialCoordinate = { ra: 88.7929583, dec: 7.4070639 }
2929

3030
/*****************************************************************************************************************/
3131

32-
describe('getCorrectionToEquatorialForAnnualAbberation', () => {
32+
describe('getCorrectionToEquatorialForAnnualAberration', () => {
3333
it('should be defined', () => {
34-
expect(getCorrectionToEquatorialForAnnualAbberation).toBeDefined()
34+
expect(getCorrectionToEquatorialForAnnualAberration).toBeDefined()
3535
})
3636

37-
it('should return the correct abberation correction for the J2000 default epoch', () => {
38-
const { ra, dec } = getCorrectionToEquatorialForAnnualAbberation(
37+
it('should return the correct aberration correction for the J2000 default epoch', () => {
38+
const { ra, dec } = getCorrectionToEquatorialForAnnualAberration(
3939
new Date('2000-01-01T00:00:00+00:00'),
4040
betelgeuse
4141
)
4242
expect(ra + betelgeuse.ra).toBe(88.79868732900589)
4343
expect(dec + betelgeuse.dec).toBe(7.4068039145745)
4444
})
4545

46-
it('should return the correct abberation correction for the designated epoch', () => {
47-
const { ra, dec } = getCorrectionToEquatorialForAnnualAbberation(datetime, betelgeuse)
46+
it('should return the correct aberration correction for the designated epoch', () => {
47+
const { ra, dec } = getCorrectionToEquatorialForAnnualAberration(datetime, betelgeuse)
4848
expect(ra + betelgeuse.ra).toBe(88.78837512114575)
4949
expect(dec + betelgeuse.dec).toBe(7.406109156062398)
5050
})
5151
})
5252

5353
/*****************************************************************************************************************/
5454

55-
describe('getCorrectionToEquatorialForDiurnalAbberation', () => {
55+
describe('getCorrectionToEquatorialForDiurnalAberration', () => {
5656
it('should be defined', () => {
57-
expect(getCorrectionToEquatorialForDiurnalAbberation).toBeDefined()
57+
expect(getCorrectionToEquatorialForDiurnalAberration).toBeDefined()
5858
})
5959

60-
it('should return the correct abberation correction for the J2000 default epoch', () => {
61-
const { ra, dec } = getCorrectionToEquatorialForDiurnalAbberation(
60+
it('should return the correct aberration correction for the J2000 default epoch', () => {
61+
const { ra, dec } = getCorrectionToEquatorialForDiurnalAberration(
6262
new Date('2000-01-01T00:00:00+00:00'),
6363
{
6464
latitude,
@@ -70,8 +70,8 @@ describe('getCorrectionToEquatorialForDiurnalAbberation', () => {
7070
expect(dec + betelgeuse.dec).toBe(7.407096948283444)
7171
})
7272

73-
it('should return the correct abberation correction for the designated epoch', () => {
74-
const { ra, dec } = getCorrectionToEquatorialForDiurnalAbberation(datetime, {
73+
it('should return the correct aberration correction for the designated epoch', () => {
74+
const { ra, dec } = getCorrectionToEquatorialForDiurnalAberration(datetime, {
7575
latitude,
7676
longitude
7777
}, betelgeuse)

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { resolve } from 'path'
1919
/*****************************************************************************************************************/
2020

2121
const modules = [
22-
'abberation',
22+
'aberration',
2323
'astrometry',
2424
'common',
2525
'conjunction',

0 commit comments

Comments
 (0)