Skip to content

Commit

Permalink
Merge branch 'tostt-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cosinekitty committed May 26, 2024
2 parents 61dc070 + 898276e commit 1c6a11c
Show file tree
Hide file tree
Showing 37 changed files with 63 additions and 35 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion demo/browser/astronomy.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
MIT License
Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion demo/nodejs/astronomy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MIT License
Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion demo/nodejs/calendar/astronomy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MIT License
Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion demo/python/astronomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# MIT License
#
# Copyright (c) 2019-2023 Don Cross <[email protected]>
# Copyright (c) 2019-2024 Don Cross <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/astro_vector.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/astro_vector.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/chebyshev.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/chebyshev.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/codegen.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/codegen.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/ephfile.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/ephfile.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/generate.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/hydrogen/hydrogen.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/jpl_horizons_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 14 additions & 0 deletions generate/jsdoc2md/js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ and some [Node.js examples](../../demo/nodejs/).
| [Seasons](#Seasons) | Finds the equinoxes and solstices for a given calendar year. |
| [SunPosition](#SunPosition) | Calculates the Sun's apparent true ecliptic of date (ECT) coordinates as seen from the Earth. |

### Date and time

Astronomy Engine performs its calculations in UTC using the [`AstroTime`](#AstroTime) class,
which does not contain timezone information.
AstroTime objects can be created in several ways, including through a Javascript `Date` object.

A JavaScript Date object in UTC can be created using:
- a Z-terminating string: <code>new Date('2024-07-01T09:00:00Z')</code>
- a set of numbers, where the month is 0-based: <code>new Date(Date.UTC(2024, 6, 1, 9, 0, 0))</code>

Both examples create a Date object set to July 1st 2024 at 9:00:00 UTC.

Note that, when displaying Date objects as strings (with `toUTCString()` for instance), JavaScript incorrectly refers to UTC as 'GMT'.

### Coordinate transforms

The following orientation systems are supported.
Expand Down
2 changes: 1 addition & 1 deletion generate/novas_body.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/template/astronomy.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/template/astronomy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/template/astronomy.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/template/astronomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# MIT License
#
# Copyright (c) 2019-2023 Don Cross <[email protected]>
# Copyright (c) 2019-2024 Don Cross <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/template/astronomy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion generate/update_copyrights.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright (c) 2019-2023 Don Cross <[email protected]>
# Copyright (c) 2019-2024 Don Cross <[email protected]>
import sys
import re
import datetime
Expand Down
2 changes: 1 addition & 1 deletion source/c/astronomy.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion source/c/astronomy.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion source/csharp/astronomy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 14 additions & 0 deletions source/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ and some [Node.js examples](../../demo/nodejs/).
| [Seasons](#Seasons) | Finds the equinoxes and solstices for a given calendar year. |
| [SunPosition](#SunPosition) | Calculates the Sun's apparent true ecliptic of date (ECT) coordinates as seen from the Earth. |

### Date and time

Astronomy Engine performs its calculations in UTC using the [`AstroTime`](#AstroTime) class,
which does not contain timezone information.
AstroTime objects can be created in several ways, including through a Javascript `Date` object.

A JavaScript Date object in UTC can be created using:
- a Z-terminating string: <code>new Date('2024-07-01T09:00:00Z')</code>
- a set of numbers, where the month is 0-based: <code>new Date(Date.UTC(2024, 6, 1, 9, 0, 0))</code>

Both examples create a Date object set to July 1st 2024 at 9:00:00 UTC.

Note that, when displaying Date objects as strings (with `toUTCString()` for instance), JavaScript incorrectly refers to UTC as 'GMT'.

### Coordinate transforms

The following orientation systems are supported.
Expand Down
2 changes: 1 addition & 1 deletion source/js/astronomy.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
MIT License
Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion source/js/astronomy.browser.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/js/astronomy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion source/js/astronomy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MIT License
Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion source/js/astronomy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/js/astronomy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MIT License
Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion source/js/esm/astronomy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MIT License

Copyright (c) 2019-2023 Don Cross <[email protected]>
Copyright (c) 2019-2024 Don Cross <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion source/python/astronomy/astronomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# MIT License
#
# Copyright (c) 2019-2023 Don Cross <[email protected]>
# Copyright (c) 2019-2024 Don Cross <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 1c6a11c

Please sign in to comment.