Changelog for swiss-ephemeris-1.4.2.0
Changelog for swiss-ephemeris
v1.4.2.0 (2021-12-03)
- 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
HasEclipticLongitudetypeclass
v1.4.1.0 (2021-11-27)
- Export
utcToJulianDays, to obtain a product of(TT, UT1)Julian Days from aUTCTimevalue -- saves you one IO trip vs. getting them separately. - Support for GHC 9.2.1
- Fix minor bug in
directionChangethat made lookups starting <=30 minutes before the event fail (due to an artifact of the original C function that explicitly excludes such lookup bounds.)
v1.4.0.0 (2021-11-11)
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.02of the C library. - Adds the
Precalculatednamespace 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.Timemodule, 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 the
eventsfiles 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
DockerfileandNOTES.mdto aid in diagnosing memory leaks. - [dev] adds some basic Nix derivations for producing documentations and a release tarball.
v1.3.0.2
- More memory safety paranoia: ensure that
gravGroupfunctions 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.
v1.3.0.1
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.
v1.3.0.0 (2021-06-18)
- 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
ChartUtilsnamespace, 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
nixscripts. - [dev] a whole buncha hlint + autoformat fixes.
v1.2.1.1 (2021-03-14)
- Bump upper bound for
base, to work with newer haskells.
v1.2.1.0 (2020-11-14)
- Introduces
gregorianDateTime, which is the reverse ofjulianDay: given a JD, return a tuple with(year, month, day, decimalHour).
v1.2.0.0 (2020-09-14)
BREAKING CHANGE: splitDegrees now takes options that reflect the options in the underlying library.
- Constructors for
JulianTimeandSiderealTimeare now exposed. - Introduce
SplitDegreesOptionenum for all options one can split degrees with; amendssplitDegreesto take said options as the first argument. splitDegreesZodiacis unchanged, though a mere veneer for the now more powerfulsplitDegrees.- Since
splitDegreesZodiacgoes the extra enum-mile to provide human-readable zodiac names, and the underlying library can also split on Nakshatras, we now include theNakshatraNameenum. Names are from wikipedia and I saw some variants, so please forgive any mispellings!
v1.1.0.0 (2020-09-12)
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
Internalmodule 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
Coordinatestype, in favor ofEclipticPosition.
- Deprecates the
- Introduces functions to
calculateEquatorialPositionandcalculateObliquityat 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: the
calculateHousePositionfunction 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!)
v1.0.0.0 (2020-09-07)
- Refactor the
calculateCuspsfunction:- Return a simple list of cusps. This allows for future implementations of exotic systems that have more (or fewer?) cusps, and hews closer to regular usage (which iterates over the cusps.)
- The house system comes first, to allow for more ergonomic partial application for uses where one system is
the "default" (e.g.
traditionalCusps = calculateCusps Placidus.)
- Cleans up haddocks, adds many links to the original docs (and notes the headings, since updates to those seem to break hyperlinking?)
v0.3.1.0
- Fixes occasional segmentation fault (caught most often in the more memory-strapped CI server than in my computer,)
caused by using
allocafor the error string and, when no error string was populated, ending with undefined behavior. Now we explicitly allocate the 256chars that the documentation and C sources recommend, which seems to be always freed by Haskell, vs. leaving a hole somewhere when the underlying library fails to terminate the string.
v0.3.0.0
Breaking fixes to calculateCusps and calculateCoordinates
- Upgrades to v2.09.03 of the C library, to incorporate some bug fixes that seem marginally related to random breakage I've seen; read more at: https://www.astro.com/swisseph/swephprg.htm#_Toc49847971
- Introduces
withoutEphemerideswhich sets the ephe path toNULL(via the also newsetNoEphemeridesPath) and takes care of callingcloseEphemerides. Use this orwithEphemeridesfor memory safety, only call the functions directly if you really know what you're doing (i.e setting/closing ephemerides in some other manner.) - Both calculation functions are now
IOcomputations, to reflect the fact that they may interact with ephemeris data and allocate memory thatcloseEphemerideshas to free. - More closely reflects the underlying behavior for calculating cusps: it may return
cusps in the
Porphyriussystem if given a point for which the chosen system fails. To more explicitly reflect this, we now havecalculateCuspsStrictwhich returns aLeftvalue if the requested house system couldn't be used.calculateCuspsLenientalways returns a calculation, and is aliased tocalculateCuspsas the "default" method. - Since the calculation may have changed the house system, we now return a
systemUsedentry in theCuspsCalculationrecord.
v0.2.0.0
- Introduces
withEphemeridesfor bracketed access to the ephemeris directory. - Changes the signature of
calculateCuspsto return aLeftvalue if the underlying library is unable to calculate the cusps. - Introduces "monadic" versions of the calculations that work with instances of
MonadFail:calculateCuspsMandcalculateCoordinatesM - Improves test coverage with property testing.
v0.1.0.0 - 0.1.0.2(2020-08-12)
- Bundles the C code for v2.09.01 of Swiss Ephemerides -- refer to that page and related documentation for other possible additions to this package!
- First release with basic bindings to calculate the coordinates of bodies
between the Sun and Chiron, plus cusps and major angles --
calculateCoordinatesandcalculateCusps, respectively. - The functions
setEphemeridesPathandcloseEphemeridesare provided to initialize (important) and release (less important) resources related to caching calculations and locating the data files for ephemerides.