Releases: lfborjas/swiss-ephemeris
Releases · lfborjas/swiss-ephemeris
v1.4.2.0 fix gravgroup, extend HasEclipticLongitude
- Fix edge case in grav group: incorrect casting in the C code was causing planets that were too close to a sector boundary or another planet to be thrown back into the first sector.
- Remove cuspsToSectors.
- Add ability to set longitude in HasEclipticLongitude typeclass
What's Changed
Full Changelog: v1.4.1.0...v1.4.2.0
V1.4.1.0 Minor fixes, confirm support for GHC 9.2.1
- Export
utcToJulianDays
, to obtain a product of(TT, UT1)
Julian Days from aUTCTime
value --
saves you one IO trip vs. getting them separately. - Support for GHC 9.2.1
- Fix minor bug in
directionChange
that made lookups starting <=30 minutes before the event fail
(due to an artifact of the original C function that explicitly excludes such lookup bounds.)
v.1.4.0.0 -- Time refactoring, crossings, phenomena
BREAKING CHANGE: Major refactoring of time values: JulianDay
is no longer an alias for Double
,
and is now a type that carries a witness of its provenance -- which enables us to work with functions that
transact in both Terrestrial (Ephemeris) Time, and Universal Time, without mixing them up.
- Upgrades to version
2.10.02
of the C library. - Adds the
Precalculated
namespace with functions to read and write pre-calculated
ephemeris from a file on disk. Useful when examining an interval of time for ecliptic phenomena. - Introduces the
SwissEphemeris.Time
module, with various conversions between time standards
and some Haskell time values. - Introduces functions that find moments of exactitude for longitude crossings (heliocentric and geocentric,)
and moments of exactitude for lunar phases. The geocentric interpolation, as well as lunar phases,
use the Brent-Dekker algorithm for root finding, the heliocentric functions are able to do faster
parabolic approximation. I need to study the C sources a bit more to see if something similar is possible
for interpolation in general (see theevents
files in the C sources for ideas.) - Adds functions for calculating planetary phenomena as visible from earth, as well as solar and lunar eclipses.
- [dev] adds a
Dockerfile
andNOTES.md
to aid in diagnosing memory leaks. - [dev] adds some basic Nix derivations for producing documentations and a release tarball.
Minor pointer hygiene and error reporting update
- More memory safety paranoia: ensure that
gravGroup
functions have appropriately
scoped "extraData" pointers; was using an unsafe function before that somewhat inexplicably never failed, except for one time maybe while doing unrelated testing. - Fix empty sector handling for
gravGroup
: it now correctly reports that zero-length
sectors are not supported
Fix error string allocation, bundle fixtures for tests
A couple of memory safety patches:
- Attempt to rein in memory unsafety by keeping all pointer peeking in IO for gravGroup fns.
- Always allocate 256 chars for error messages.
- [dev] Bundle test ephemeris into the hackage tarball, to allow hackage CI and nixOS to
successfully run tests.
Upgrade swiss ephemeris to 2.10.01, include gravgroup
- Drops support for base < 4.10, which effectively excludes GHC versions less
than or equal to 8.0.2. Supporting older haskells gets more cumbersome with each
addition. Please submit a patch with all the preprocessor magic if you really
want old haskell support. - Add
ChartUtils
namespace, with a couple of convenience functions for chart drawing. - Upgrade to swiss ephemeris 2.10.01.
- Update LICENSE to AGPL -- it changed in the C library, too.
- [dev] Fix QuickCheck test dependency, to hopefully be copacetic in NixOS builds.
- [dev] add optional
nix
scripts. - [dev] a whole buncha hlint + autoformat fixes.
Update base, now compatible with ghc 8.10
Merge pull request #21 from lfborjas/update-base Allow newer haskells, add to testing matrix.
Adds `gregorianDateTime`, reverse of `julianDay`
See CHANGELOG.md
Better `splitDegrees`, exposed time constructors, Nakshatras
BREAKING CHANGE: splitDegrees
now takes options that reflect the options in the underlying library.
- Constructors for
JulianTime
andSiderealTime
are now exposed. - Introduce
SplitDegreesOption
enum for all options one can split degrees with; amendssplitDegrees
to take
said options as the first argument. splitDegreesZodiac
is unchanged, though a mere veneer for the now more powerfulsplitDegrees
.- Since
splitDegreesZodiac
goes the extra enum-mile to provide human-readable zodiac names, and the underlying
library can also split on Nakshatras, we now include theNakshatraName
enum. Names are from wikipedia
and I saw some variants, so please forgive any mispellings!
Better position types, newtypes for time, more position calculations, some utils
BREAKING CHANGE: the Coordinates
type has been retired, in favor of the more specific
GeographicPosition
and EclipticPosition
. calculateCoordinates
is now calculateEclipticPosition
,
and the calculateCusps*
family now takes a GeographicPosition
as part of its inputs.
- Introduces an
Internal
module with types and helpers that this library introduces,
which are not native to the underlying C library. Import at your own risk! (the "curated"/
"stable" ones are re-exported by the main module.)- Deprecates the
Coordinates
type, in favor ofEclipticPosition
.
- Deprecates the
- Introduces functions to
calculateEquatorialPosition
andcalculteObliquity
at a given time,
as well as types that better convey the different types of positions (EquatorialPosition
,ObliquityInformation
). - Some astrology helpers: convert between equatorial and ecliptic (and vice-versa,)
obtain the Delta Time effective at a given moment, obtain the house position of a given body.
(Note: thecalculateHousePosition
function is more useful for working near the polar circles or for bodies
off of the ecliptic -- the ARMC and obliquity need to be calculated or provided, it's simpler
if you already have the cusps: just check which cusps a given longitude falls between -- no need for
this function!)