sweph 2.10.1-a1 → 2.10.2-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -9
- package/deps/swisseph/swecl.c +6440 -6440
- package/deps/swisseph/swehel.c +3522 -3523
- package/deps/swisseph/swehouse.c +3136 -3135
- package/deps/swisseph/sweodef.h +5 -1
- package/deps/swisseph/sweph.c +309 -1
- package/deps/swisseph/sweph.h +852 -852
- package/deps/swisseph/swephexp.h +9 -0
- package/deps/swisseph/swephlib.c +4635 -4643
- package/index.d.ts +588 -337
- package/index.js +5 -4
- package/index.mjs +109 -0
- package/package.json +6 -2
- package/src/functions/helio_cross.cpp +33 -0
- package/src/functions/helio_cross_ut.cpp +33 -0
- package/src/functions/house_name.cpp +3 -2
- package/src/functions/houses.cpp +1 -1
- package/src/functions/houses_ex.cpp +1 -1
- package/src/functions/houses_ex2.cpp +1 -1
- package/src/functions/mooncross.cpp +26 -0
- package/src/functions/mooncross_node.cpp +30 -0
- package/src/functions/mooncross_node_ut.cpp +30 -0
- package/src/functions/mooncross_ut.cpp +26 -0
- package/src/functions/solcross.cpp +26 -0
- package/src/functions/solcross_ut.cpp +26 -0
- package/src/sweph.cpp +9 -1
- package/src/sweph.h +8 -0
package/README.md
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
# Sweph
|
|
2
2
|
|
|
3
3
|
The definitive Swiss Ephemeris bindings for Node.js
|
|
4
|
-
Everything you need to create Astrology and Astronomy applications with javascript and node
|
|
4
|
+
Everything you need to create Astrology and Astronomy applications with javascript and node
|
|
5
5
|
|
|
6
6
|
* 100% API coverage
|
|
7
|
-
* Built-in Typescript declarations
|
|
7
|
+
* Built-in Typescript declarations and ESM exports
|
|
8
8
|
* Built-in intellisense documentation
|
|
9
|
-
* Version
|
|
9
|
+
* Version matched
|
|
10
10
|
* Made with the N-API
|
|
11
11
|
|
|
12
12
|
[Official programmers documentation for the Swiss Ephemeris by Astrodienst AG](https://www.astro.com/swisseph/swephprg.htm)
|
|
13
13
|
[Official guide for the Swiss Ephemeris by Astrodienst AG](https://www.astro.com/ftp/swisseph/doc/swisseph.htm)
|
|
14
|
-
[Sweph on
|
|
14
|
+
[Sweph on Github](https://github.com/timotejroiko/sweph)
|
|
15
|
+
[Sweph on NPM](https://npmjs.com/package/sweph)
|
|
15
16
|
|
|
16
17
|
## Installation and Licensing
|
|
17
18
|
|
|
@@ -20,7 +21,7 @@ This library follows the licensing requirements for the Swiss Ephemeris by Astro
|
|
|
20
21
|
### - GPL
|
|
21
22
|
|
|
22
23
|
Up to and including version `2.10.0`, this library is licensed under `GPL-2.0`.
|
|
23
|
-
To install and use this library under GPL, use `npm install sweph@
|
|
24
|
+
To install and use this library under GPL, use `npm install sweph@gpl` or `npm install sweph@2.10.0`.
|
|
24
25
|
|
|
25
26
|
### - AGPL
|
|
26
27
|
|
|
@@ -35,17 +36,17 @@ If you own a professional license for the Swiss Ephemeris, you may use any versi
|
|
|
35
36
|
|
|
36
37
|
This library is version locked to the Swiss Ephemeris in addition to its own revisions. For example, version `2.10.1-1` corresponds to the Swiss Ephemeris version `2.10.1` and this library's revision `1`.
|
|
37
38
|
|
|
38
|
-
Updates to this library will be released under new revisions, while updates to
|
|
39
|
+
Updates to this library will be released under new revisions, while updates to Swiss Ephemeris will be released under matching semver versions.
|
|
39
40
|
|
|
40
41
|
## Documentation
|
|
41
42
|
|
|
42
|
-
This library is fully typed and documented via intellisense. To access its documentation simply hover over its functions:
|
|
43
|
+
This library is fully typed and documented via intellisense. To access its documentation simply hover over its functions in your favorite code editor:
|
|
43
44
|
|
|
44
45
|

|
|
45
46
|
|
|
46
47
|
## Ephemeris files
|
|
47
48
|
|
|
48
|
-
This library does not include any ephemeris files
|
|
49
|
+
This library does not include any ephemeris files. To use the Swiss Ephemeris files, download them from [https://www.astro.com/ftp/swisseph/ephe/](https://www.astro.com/ftp/swisseph/ephe/) and call `set_ephe_path()` to point the library to the folder containing the ephemeris files.
|
|
49
50
|
|
|
50
51
|
Each main ephemeris file covers a range of 600 years starting from the century indicated in its name, for example the file `sepl_18.se1` is valid from year 1800 until year 2400. The following files are available:
|
|
51
52
|
|
|
@@ -71,7 +72,7 @@ If you find any innacuracy or bug in this library, or if you find an update that
|
|
|
71
72
|
|
|
72
73
|
## Known Issues and Caveats
|
|
73
74
|
|
|
74
|
-
* Due to how the underlying C library operates, you may find that the `error` field returned by some functions will contain data even if there is no actual error. This can happen when existing memory buffers are recycled
|
|
75
|
+
* Due to how the underlying C library operates, you may find that the `error` field returned by some functions will contain random data even if there is no actual error. This can happen when existing memory buffers are recycled therefore the user must always check the returned flag values as per the Swiss Ephemeris documentation.
|
|
75
76
|
* While worker_threads are supported, the underlying C library is single threaded and its settings are global. Functions such as `set_ephe_path()` will affect the entire process, including worker_threads. While you can still use worker_threads as long as you dont change settings from other threads in the middle of calculations, true thread-safe multithreading can be achieved using child_process instead.
|
|
76
77
|
|
|
77
78
|
## Author
|