sweph 2.10.0-3 → 2.10.0-6
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 +30 -9
- package/index.d.ts +328 -327
- package/index.js +5 -4
- package/index.mjs +101 -0
- package/package.json +6 -2
- package/src/functions/azalt.cpp +2 -2
- package/src/functions/azalt_rev.cpp +2 -2
- package/src/functions/cotrans.cpp +1 -1
- package/src/functions/cotrans_sp.cpp +1 -1
- package/src/functions/gauquelin_sector.cpp +1 -1
- package/src/functions/heliacal_pheno_ut.cpp +3 -3
- package/src/functions/heliacal_ut.cpp +3 -3
- package/src/functions/house_name.cpp +3 -2
- package/src/functions/house_pos.cpp +1 -1
- package/src/functions/lun_eclipse_how.cpp +1 -1
- package/src/functions/lun_eclipse_when_loc.cpp +1 -1
- package/src/functions/lun_occult_when_loc.cpp +1 -1
- package/src/functions/rise_trans.cpp +1 -1
- package/src/functions/rise_trans_true_hor.cpp +1 -1
- package/src/functions/sol_eclipse_how.cpp +1 -1
- package/src/functions/sol_eclipse_when_loc.cpp +1 -1
- package/src/functions/vis_limit_mag.cpp +3 -3
- package/src/sweph.cpp +2 -2
- package/src/sweph.h +1 -1
package/README.md
CHANGED
|
@@ -1,16 +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 named exports
|
|
8
8
|
* Built-in intellisense documentation
|
|
9
|
-
* Version
|
|
9
|
+
* Version matched
|
|
10
10
|
* Made with the N-API
|
|
11
11
|
|
|
12
|
-
[Official documentation for the Swiss Ephemeris by Astrodienst AG](https://www.astro.com/swisseph/swephprg.htm)
|
|
13
|
-
[
|
|
12
|
+
[Official programmers documentation for the Swiss Ephemeris by Astrodienst AG](https://www.astro.com/swisseph/swephprg.htm)
|
|
13
|
+
[Official guide for the Swiss Ephemeris by Astrodienst AG](https://www.astro.com/ftp/swisseph/doc/swisseph.htm)
|
|
14
|
+
[Sweph on Github](https://github.com/timotejroiko/sweph)
|
|
15
|
+
[Sweph on NPM](https://npmjs.com/package/sweph)
|
|
14
16
|
|
|
15
17
|
## Installation and Licensing
|
|
16
18
|
|
|
@@ -19,7 +21,7 @@ This library follows the licensing requirements for the Swiss Ephemeris by Astro
|
|
|
19
21
|
### - GPL
|
|
20
22
|
|
|
21
23
|
Up to and including version `2.10.0`, this library is licensed under `GPL-2.0`.
|
|
22
|
-
To install and use this library under GPL, use `npm install sweph@2.10.0`.
|
|
24
|
+
To install and use this library under GPL, use `npm install sweph@gpl` or `npm install sweph@2.10.0`.
|
|
23
25
|
|
|
24
26
|
### - AGPL
|
|
25
27
|
|
|
@@ -34,21 +36,40 @@ If you own a professional license for the Swiss Ephemeris, you may use any versi
|
|
|
34
36
|
|
|
35
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`.
|
|
36
38
|
|
|
37
|
-
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.
|
|
38
40
|
|
|
39
41
|
## Documentation
|
|
40
42
|
|
|
41
|
-
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:
|
|
42
44
|
|
|
43
45
|

|
|
44
46
|
|
|
47
|
+
## Ephemeris files
|
|
48
|
+
|
|
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.
|
|
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:
|
|
52
|
+
|
|
53
|
+
* sepl files - planets (AD)
|
|
54
|
+
* seplm files - planets (BC)
|
|
55
|
+
* semo files - moon (AD)
|
|
56
|
+
* semom files - moon (BC)
|
|
57
|
+
* seas files - main asteroids (AD)
|
|
58
|
+
* seasm files - main asteroids (BC)
|
|
59
|
+
For advanced usage, the following files can also be found:
|
|
60
|
+
* astxxx folders - files for individual asteroids (600 years)
|
|
61
|
+
* longfiles folder - files for individual asteroids (6000 years)
|
|
62
|
+
* jplfiles folder - files for nasa's jpl ephemerides
|
|
63
|
+
* sat folder - files for planetary moons
|
|
64
|
+
More information can be found in the [Swiss Ephemeris files documentation](https://www.astro.com/ftp/swisseph/doc/swisseph.htm#_Toc58931065).
|
|
65
|
+
|
|
45
66
|
## Contributing
|
|
46
67
|
|
|
47
68
|
If you find any innacuracy or bug in this library, or if you find an update that is not yet included in this library, feel free to open an issue or a pull request.
|
|
48
69
|
|
|
49
70
|
## Known Issues and Caveats
|
|
50
71
|
|
|
51
|
-
* 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
|
|
72
|
+
* 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.
|
|
52
73
|
* 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 thead-safe multithreading can be achieved using child_process instead.
|
|
53
74
|
|
|
54
75
|
## Author
|
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* ### Usage
|
|
10
10
|
* ```
|
|
11
11
|
* const { utc_to_jd, calc, houses_ex2, constants, set_ephe_path } = require("sweph");
|
|
12
|
-
* // or
|
|
12
|
+
* // or import { utc_to_jd, calc, houses_ex2, constants, set_ephe_path } from "sweph";
|
|
13
13
|
*
|
|
14
14
|
* set_ephe_path("./ephemeris"); // folder containing your ephemeris files;
|
|
15
15
|
*
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
declare module "sweph" {
|
|
31
|
+
export * as default from "sweph"
|
|
31
32
|
|
|
32
33
|
/*
|
|
33
34
|
┌──────────────────────────────────────────────────┬────────────┬──────────────────────────────────────────────────┐
|
|
@@ -4525,331 +4526,331 @@ declare module "sweph" {
|
|
|
4525
4526
|
* Swisseph Constants
|
|
4526
4527
|
* Contains aliases and predefined constant values used in the swiss ephemeris
|
|
4527
4528
|
*/
|
|
4528
|
-
export const
|
|
4529
|
-
OK
|
|
4530
|
-
ERR
|
|
4531
|
-
SE_AUNIT_TO_KM
|
|
4532
|
-
SE_AUNIT_TO_LIGHTYEAR
|
|
4533
|
-
SE_AUNIT_TO_PARSEC
|
|
4534
|
-
SE_JUL_CAL
|
|
4535
|
-
SE_GREG_CAL
|
|
4536
|
-
SE_ECL_NUT
|
|
4537
|
-
SE_SUN
|
|
4538
|
-
SE_MOON
|
|
4539
|
-
SE_MERCURY
|
|
4540
|
-
SE_VENUS
|
|
4541
|
-
SE_MARS
|
|
4542
|
-
SE_JUPITER
|
|
4543
|
-
SE_SATURN
|
|
4544
|
-
SE_URANUS
|
|
4545
|
-
SE_NEPTUNE
|
|
4546
|
-
SE_PLUTO
|
|
4547
|
-
SE_MEAN_NODE
|
|
4548
|
-
SE_TRUE_NODE
|
|
4549
|
-
SE_MEAN_APOG
|
|
4550
|
-
SE_OSCU_APOG
|
|
4551
|
-
SE_EARTH
|
|
4552
|
-
SE_CHIRON
|
|
4553
|
-
SE_PHOLUS
|
|
4554
|
-
SE_CERES
|
|
4555
|
-
SE_PALLAS
|
|
4556
|
-
SE_JUNO
|
|
4557
|
-
SE_VESTA
|
|
4558
|
-
SE_INTP_APOG
|
|
4559
|
-
SE_INTP_PERG
|
|
4560
|
-
SE_NPLANETS
|
|
4561
|
-
SE_PLMOON_OFFSET
|
|
4562
|
-
SE_AST_OFFSET
|
|
4563
|
-
SE_VARUNA
|
|
4564
|
-
SE_FICT_OFFSET
|
|
4565
|
-
SE_FICT_OFFSET_1
|
|
4566
|
-
SE_FICT_MAX
|
|
4567
|
-
SE_NFICT_ELEM
|
|
4568
|
-
SE_COMET_OFFSET
|
|
4569
|
-
SE_NALL_NAT_POINTS
|
|
4570
|
-
SE_CUPIDO
|
|
4571
|
-
SE_HADES
|
|
4572
|
-
SE_ZEUS
|
|
4573
|
-
SE_KRONOS
|
|
4574
|
-
SE_APOLLON
|
|
4575
|
-
SE_ADMETOS
|
|
4576
|
-
SE_VULKANUS
|
|
4577
|
-
SE_POSEIDON
|
|
4578
|
-
SE_ISIS
|
|
4579
|
-
SE_NIBIRU
|
|
4580
|
-
SE_HARRINGTON
|
|
4581
|
-
SE_NEPTUNE_LEVERRIER
|
|
4582
|
-
SE_NEPTUNE_ADAMS
|
|
4583
|
-
SE_PLUTO_LOWELL
|
|
4584
|
-
SE_PLUTO_PICKERING
|
|
4585
|
-
SE_VULCAN
|
|
4586
|
-
SE_WHITE_MOON
|
|
4587
|
-
SE_PROSERPINA
|
|
4588
|
-
SE_WALDEMATH
|
|
4589
|
-
SE_FIXSTAR
|
|
4590
|
-
SE_ASC
|
|
4591
|
-
SE_MC
|
|
4592
|
-
SE_ARMC
|
|
4593
|
-
SE_VERTEX
|
|
4594
|
-
SE_EQUASC
|
|
4595
|
-
SE_COASC1
|
|
4596
|
-
SE_COASC2
|
|
4597
|
-
SE_POLASC
|
|
4598
|
-
SE_NASCMC
|
|
4599
|
-
SEFLG_JPLEPH
|
|
4600
|
-
SEFLG_SWIEPH
|
|
4601
|
-
SEFLG_MOSEPH
|
|
4602
|
-
SEFLG_HELCTR
|
|
4603
|
-
SEFLG_TRUEPOS
|
|
4604
|
-
SEFLG_J2000
|
|
4605
|
-
SEFLG_NONUT
|
|
4606
|
-
SEFLG_SPEED3
|
|
4607
|
-
SEFLG_SPEED
|
|
4608
|
-
SEFLG_NOGDEFL
|
|
4609
|
-
SEFLG_NOABERR
|
|
4610
|
-
SEFLG_ASTROMETRIC
|
|
4611
|
-
SEFLG_EQUATORIAL
|
|
4612
|
-
SEFLG_XYZ
|
|
4613
|
-
SEFLG_RADIANS
|
|
4614
|
-
SEFLG_BARYCTR
|
|
4615
|
-
SEFLG_TOPOCTR
|
|
4616
|
-
SEFLG_ORBEL_AA
|
|
4617
|
-
SEFLG_TROPICAL
|
|
4618
|
-
SEFLG_SIDEREAL
|
|
4619
|
-
SEFLG_ICRS
|
|
4620
|
-
SEFLG_DPSIDEPS_1980
|
|
4621
|
-
SEFLG_JPLHOR
|
|
4622
|
-
SEFLG_JPLHOR_APPROX
|
|
4623
|
-
SEFLG_CENTER_BODY
|
|
4624
|
-
SEFLG_TEST_PLMOON
|
|
4625
|
-
SE_SIDBITS
|
|
4626
|
-
SE_SIDBIT_ECL_T0
|
|
4627
|
-
SE_SIDBIT_SSY_PLANE
|
|
4628
|
-
SE_SIDBIT_USER_UT
|
|
4629
|
-
SE_SIDBIT_ECL_DATE
|
|
4630
|
-
SE_SIDBIT_NO_PREC_OFFSET
|
|
4631
|
-
SE_SIDBIT_PREC_ORIG
|
|
4632
|
-
SE_SIDM_FAGAN_BRADLEY
|
|
4633
|
-
SE_SIDM_LAHIRI
|
|
4634
|
-
SE_SIDM_DELUCE
|
|
4635
|
-
SE_SIDM_RAMAN
|
|
4636
|
-
SE_SIDM_USHASHASHI
|
|
4637
|
-
SE_SIDM_KRISHNAMURTI
|
|
4638
|
-
SE_SIDM_DJWHAL_KHUL
|
|
4639
|
-
SE_SIDM_YUKTESHWAR
|
|
4640
|
-
SE_SIDM_JN_BHASIN
|
|
4641
|
-
SE_SIDM_BABYL_KUGLER1
|
|
4642
|
-
SE_SIDM_BABYL_KUGLER2
|
|
4643
|
-
SE_SIDM_BABYL_KUGLER3
|
|
4644
|
-
SE_SIDM_BABYL_HUBER
|
|
4645
|
-
SE_SIDM_BABYL_ETPSC
|
|
4646
|
-
SE_SIDM_ALDEBARAN_15TAU
|
|
4647
|
-
SE_SIDM_HIPPARCHOS
|
|
4648
|
-
SE_SIDM_SASSANIAN
|
|
4649
|
-
SE_SIDM_GALCENT_0SAG
|
|
4650
|
-
SE_SIDM_J2000
|
|
4651
|
-
SE_SIDM_J1900
|
|
4652
|
-
SE_SIDM_B1950
|
|
4653
|
-
SE_SIDM_SURYASIDDHANTA
|
|
4654
|
-
SE_SIDM_SURYASIDDHANTA_MSUN
|
|
4655
|
-
SE_SIDM_ARYABHATA
|
|
4656
|
-
SE_SIDM_ARYABHATA_MSUN
|
|
4657
|
-
SE_SIDM_SS_REVATI
|
|
4658
|
-
SE_SIDM_SS_CITRA
|
|
4659
|
-
SE_SIDM_TRUE_CITRA
|
|
4660
|
-
SE_SIDM_TRUE_REVATI
|
|
4661
|
-
SE_SIDM_TRUE_PUSHYA
|
|
4662
|
-
SE_SIDM_GALCENT_RGILBRAND
|
|
4663
|
-
SE_SIDM_GALEQU_IAU1958
|
|
4664
|
-
SE_SIDM_GALEQU_TRUE
|
|
4665
|
-
SE_SIDM_GALEQU_MULA
|
|
4666
|
-
SE_SIDM_GALALIGN_MARDYKS
|
|
4667
|
-
SE_SIDM_TRUE_MULA
|
|
4668
|
-
SE_SIDM_GALCENT_MULA_WILHELM
|
|
4669
|
-
SE_SIDM_ARYABHATA_522
|
|
4670
|
-
SE_SIDM_BABYL_BRITTON
|
|
4671
|
-
SE_SIDM_TRUE_SHEORAN
|
|
4672
|
-
SE_SIDM_GALCENT_COCHRANE
|
|
4673
|
-
SE_SIDM_GALEQU_FIORENZA
|
|
4674
|
-
SE_SIDM_VALENS_MOON
|
|
4675
|
-
SE_SIDM_LAHIRI_1940
|
|
4676
|
-
SE_SIDM_LAHIRI_VP285
|
|
4677
|
-
SE_SIDM_KRISHNAMURTI_VP291
|
|
4678
|
-
SE_SIDM_LAHIRI_ICRC
|
|
4679
|
-
SE_SIDM_USER
|
|
4680
|
-
SE_NSIDM_PREDEF
|
|
4681
|
-
SE_NODBIT_MEAN
|
|
4682
|
-
SE_NODBIT_OSCU
|
|
4683
|
-
SE_NODBIT_OSCU_BAR
|
|
4684
|
-
SE_NODBIT_FOPOINT
|
|
4685
|
-
SEFLG_DEFAULTEPH
|
|
4686
|
-
SE_MAX_STNAME
|
|
4687
|
-
SE_ECL_CENTRAL
|
|
4688
|
-
SE_ECL_NONCENTRAL
|
|
4689
|
-
SE_ECL_TOTAL
|
|
4690
|
-
SE_ECL_ANNULAR
|
|
4691
|
-
SE_ECL_PARTIAL
|
|
4692
|
-
SE_ECL_ANNULAR_TOTAL
|
|
4693
|
-
SE_ECL_HYBRID
|
|
4694
|
-
SE_ECL_PENUMBRAL
|
|
4695
|
-
SE_ECL_ALLTYPES_SOLAR
|
|
4696
|
-
SE_ECL_ALLTYPES_LUNAR
|
|
4697
|
-
SE_ECL_VISIBLE
|
|
4698
|
-
SE_ECL_MAX_VISIBLE
|
|
4699
|
-
SE_ECL_1ST_VISIBLE
|
|
4700
|
-
SE_ECL_PARTBEG_VISIBLE
|
|
4701
|
-
SE_ECL_2ND_VISIBLE
|
|
4702
|
-
SE_ECL_TOTBEG_VISIBLE
|
|
4703
|
-
SE_ECL_3RD_VISIBLE
|
|
4704
|
-
SE_ECL_TOTEND_VISIBLE
|
|
4705
|
-
SE_ECL_4TH_VISIBLE
|
|
4706
|
-
SE_ECL_PARTEND_VISIBLE
|
|
4707
|
-
SE_ECL_PENUMBBEG_VISIBLE
|
|
4708
|
-
SE_ECL_PENUMBEND_VISIBLE
|
|
4709
|
-
SE_ECL_OCC_BEG_DAYLIGHT
|
|
4710
|
-
SE_ECL_OCC_END_DAYLIGHT
|
|
4711
|
-
SE_ECL_ONE_TRY
|
|
4712
|
-
SE_CALC_RISE
|
|
4713
|
-
SE_CALC_SET
|
|
4714
|
-
SE_CALC_MTRANSIT
|
|
4715
|
-
SE_CALC_ITRANSIT
|
|
4716
|
-
SE_BIT_DISC_CENTER
|
|
4717
|
-
SE_BIT_DISC_BOTTOM
|
|
4718
|
-
SE_BIT_GEOCTR_NO_ECL_LAT
|
|
4719
|
-
SE_BIT_NO_REFRACTION
|
|
4720
|
-
SE_BIT_CIVIL_TWILIGHT
|
|
4721
|
-
SE_BIT_NAUTIC_TWILIGHT
|
|
4722
|
-
SE_BIT_ASTRO_TWILIGHT
|
|
4723
|
-
SE_BIT_FIXED_DISC_SIZE
|
|
4724
|
-
SE_BIT_FORCE_SLOW_METHOD
|
|
4725
|
-
SE_BIT_HINDU_RISING
|
|
4726
|
-
SE_ECL2HOR
|
|
4727
|
-
SE_EQU2HOR
|
|
4728
|
-
SE_HOR2ECL
|
|
4729
|
-
SE_HOR2EQU
|
|
4730
|
-
SE_TRUE_TO_APP
|
|
4731
|
-
SE_APP_TO_TRUE
|
|
4732
|
-
SE_DE_NUMBER
|
|
4733
|
-
SE_FNAME_DE200
|
|
4734
|
-
SE_FNAME_DE403
|
|
4735
|
-
SE_FNAME_DE404
|
|
4736
|
-
SE_FNAME_DE405
|
|
4737
|
-
SE_FNAME_DE406
|
|
4738
|
-
SE_FNAME_DE431
|
|
4739
|
-
SE_FNAME_DFT
|
|
4740
|
-
SE_FNAME_DFT2
|
|
4741
|
-
SE_STARFILE_OLD
|
|
4742
|
-
SE_STARFILE
|
|
4743
|
-
SE_ASTNAMFILE
|
|
4744
|
-
SE_FICTFILE
|
|
4745
|
-
SE_SPLIT_DEG_ROUND_SEC
|
|
4746
|
-
SE_SPLIT_DEG_ROUND_MIN
|
|
4747
|
-
SE_SPLIT_DEG_ROUND_DEG
|
|
4748
|
-
SE_SPLIT_DEG_ZODIACAL
|
|
4749
|
-
SE_SPLIT_DEG_NAKSHATRA
|
|
4750
|
-
SE_SPLIT_DEG_KEEP_SIGN
|
|
4751
|
-
SE_SPLIT_DEG_KEEP_DEG
|
|
4752
|
-
SE_HELIACAL_RISING
|
|
4753
|
-
SE_HELIACAL_SETTING
|
|
4754
|
-
SE_MORNING_FIRST
|
|
4755
|
-
SE_EVENING_LAST
|
|
4756
|
-
SE_EVENING_FIRST
|
|
4757
|
-
SE_MORNING_LAST
|
|
4758
|
-
SE_ACRONYCHAL_RISING
|
|
4759
|
-
SE_ACRONYCHAL_SETTING
|
|
4760
|
-
SE_COSMICAL_SETTING
|
|
4761
|
-
SE_HELFLAG_LONG_SEARCH
|
|
4762
|
-
SE_HELFLAG_HIGH_PRECISION
|
|
4763
|
-
SE_HELFLAG_OPTICAL_PARAMS
|
|
4764
|
-
SE_HELFLAG_NO_DETAILS
|
|
4765
|
-
SE_HELFLAG_SEARCH_1_PERIOD
|
|
4766
|
-
SE_HELFLAG_VISLIM_DARK
|
|
4767
|
-
SE_HELFLAG_VISLIM_NOMOON
|
|
4768
|
-
SE_HELFLAG_VISLIM_PHOTOPIC
|
|
4769
|
-
SE_HELFLAG_VISLIM_SCOTOPIC
|
|
4770
|
-
SE_HELFLAG_AV
|
|
4771
|
-
SE_HELFLAG_AVKIND_VR
|
|
4772
|
-
SE_HELFLAG_AVKIND_PTO
|
|
4773
|
-
SE_HELFLAG_AVKIND_MIN7
|
|
4774
|
-
SE_HELFLAG_AVKIND_MIN9
|
|
4775
|
-
SE_HELFLAG_AVKIND
|
|
4776
|
-
TJD_INVALID
|
|
4777
|
-
SIMULATE_VICTORVB
|
|
4778
|
-
SE_PHOTOPIC_FLAG
|
|
4779
|
-
SE_SCOTOPIC_FLAG
|
|
4780
|
-
SE_MIXEDOPIC_FLAG
|
|
4781
|
-
SE_TIDAL_DE200
|
|
4782
|
-
SE_TIDAL_DE403
|
|
4783
|
-
SE_TIDAL_DE404
|
|
4784
|
-
SE_TIDAL_DE405
|
|
4785
|
-
SE_TIDAL_DE406
|
|
4786
|
-
SE_TIDAL_DE421
|
|
4787
|
-
SE_TIDAL_DE422
|
|
4788
|
-
SE_TIDAL_DE430
|
|
4789
|
-
SE_TIDAL_DE431
|
|
4790
|
-
SE_TIDAL_26
|
|
4791
|
-
SE_TIDAL_STEPHENSON_2016
|
|
4792
|
-
SE_TIDAL_DEFAULT
|
|
4793
|
-
SE_TIDAL_AUTOMATIC
|
|
4794
|
-
SE_TIDAL_MOSEPH
|
|
4795
|
-
SE_TIDAL_SWIEPH
|
|
4796
|
-
SE_TIDAL_JPLEPH
|
|
4797
|
-
SE_DELTAT_AUTOMATIC
|
|
4798
|
-
SE_MODEL_DELTAT
|
|
4799
|
-
SE_MODEL_PREC_LONGTERM
|
|
4800
|
-
SE_MODEL_PREC_SHORTTERM
|
|
4801
|
-
SE_MODEL_NUT
|
|
4802
|
-
SE_MODEL_BIAS
|
|
4803
|
-
SE_MODEL_JPLHOR_MODE
|
|
4804
|
-
SE_MODEL_JPLHORA_MODE
|
|
4805
|
-
SE_MODEL_SIDT
|
|
4806
|
-
NSE_MODELS
|
|
4807
|
-
SEMOD_NPREC
|
|
4808
|
-
SEMOD_PREC_IAU_1976
|
|
4809
|
-
SEMOD_PREC_LASKAR_1986
|
|
4810
|
-
SEMOD_PREC_WILL_EPS_LASK
|
|
4811
|
-
SEMOD_PREC_WILLIAMS_1994
|
|
4812
|
-
SEMOD_PREC_SIMON_1994
|
|
4813
|
-
SEMOD_PREC_IAU_2000
|
|
4814
|
-
SEMOD_PREC_BRETAGNON_2003
|
|
4815
|
-
SEMOD_PREC_IAU_2006
|
|
4816
|
-
SEMOD_PREC_VONDRAK_2011
|
|
4817
|
-
SEMOD_PREC_OWEN_1990
|
|
4818
|
-
SEMOD_PREC_NEWCOMB
|
|
4819
|
-
SEMOD_PREC_DEFAULT
|
|
4820
|
-
SEMOD_PREC_DEFAULT_SHORT
|
|
4821
|
-
SEMOD_NNUT
|
|
4822
|
-
SEMOD_NUT_IAU_1980
|
|
4823
|
-
SEMOD_NUT_IAU_CORR_1987
|
|
4824
|
-
SEMOD_NUT_IAU_2000A
|
|
4825
|
-
SEMOD_NUT_IAU_2000B
|
|
4826
|
-
SEMOD_NUT_WOOLARD
|
|
4827
|
-
SEMOD_NUT_DEFAULT
|
|
4828
|
-
SEMOD_NSIDT
|
|
4829
|
-
SEMOD_SIDT_IAU_1976
|
|
4830
|
-
SEMOD_SIDT_IAU_2006
|
|
4831
|
-
SEMOD_SIDT_IERS_CONV_2010
|
|
4832
|
-
SEMOD_SIDT_LONGTERM
|
|
4833
|
-
SEMOD_SIDT_DEFAULT
|
|
4834
|
-
SEMOD_NBIAS
|
|
4835
|
-
SEMOD_BIAS_NONE
|
|
4836
|
-
SEMOD_BIAS_IAU2000
|
|
4837
|
-
SEMOD_BIAS_IAU2006
|
|
4838
|
-
SEMOD_BIAS_DEFAULT
|
|
4839
|
-
SEMOD_NJPLHOR
|
|
4840
|
-
SEMOD_JPLHOR_LONG_AGREEMENT
|
|
4841
|
-
SEMOD_JPLHOR_DEFAULT
|
|
4842
|
-
SEMOD_NJPLHORA
|
|
4843
|
-
SEMOD_JPLHORA_1
|
|
4844
|
-
SEMOD_JPLHORA_2
|
|
4845
|
-
SEMOD_JPLHORA_3
|
|
4846
|
-
SEMOD_JPLHORA_DEFAULT
|
|
4847
|
-
SEMOD_NDELTAT
|
|
4848
|
-
SEMOD_DELTAT_STEPHENSON_MORRISON_1984
|
|
4849
|
-
SEMOD_DELTAT_STEPHENSON_1997
|
|
4850
|
-
SEMOD_DELTAT_STEPHENSON_MORRISON_2004
|
|
4851
|
-
SEMOD_DELTAT_ESPENAK_MEEUS_2006
|
|
4852
|
-
SEMOD_DELTAT_STEPHENSON_ETC_2016
|
|
4853
|
-
SEMOD_DELTAT_DEFAULT
|
|
4529
|
+
export const constants: {
|
|
4530
|
+
OK: 0,
|
|
4531
|
+
ERR: -1,
|
|
4532
|
+
SE_AUNIT_TO_KM: 149597870.7,
|
|
4533
|
+
SE_AUNIT_TO_LIGHTYEAR: 0.000015812507409819728,
|
|
4534
|
+
SE_AUNIT_TO_PARSEC: 0.000004848136811095274,
|
|
4535
|
+
SE_JUL_CAL: 0,
|
|
4536
|
+
SE_GREG_CAL: 1,
|
|
4537
|
+
SE_ECL_NUT: -1,
|
|
4538
|
+
SE_SUN: 0,
|
|
4539
|
+
SE_MOON: 1,
|
|
4540
|
+
SE_MERCURY: 2,
|
|
4541
|
+
SE_VENUS: 3,
|
|
4542
|
+
SE_MARS: 4,
|
|
4543
|
+
SE_JUPITER: 5,
|
|
4544
|
+
SE_SATURN: 6,
|
|
4545
|
+
SE_URANUS: 7,
|
|
4546
|
+
SE_NEPTUNE: 8,
|
|
4547
|
+
SE_PLUTO: 9,
|
|
4548
|
+
SE_MEAN_NODE: 10,
|
|
4549
|
+
SE_TRUE_NODE: 11,
|
|
4550
|
+
SE_MEAN_APOG: 12,
|
|
4551
|
+
SE_OSCU_APOG: 13,
|
|
4552
|
+
SE_EARTH: 14,
|
|
4553
|
+
SE_CHIRON: 15,
|
|
4554
|
+
SE_PHOLUS: 16,
|
|
4555
|
+
SE_CERES: 17,
|
|
4556
|
+
SE_PALLAS: 18,
|
|
4557
|
+
SE_JUNO: 19,
|
|
4558
|
+
SE_VESTA: 20,
|
|
4559
|
+
SE_INTP_APOG: 21,
|
|
4560
|
+
SE_INTP_PERG: 22,
|
|
4561
|
+
SE_NPLANETS: 23,
|
|
4562
|
+
SE_PLMOON_OFFSET: 9000,
|
|
4563
|
+
SE_AST_OFFSET: 10000,
|
|
4564
|
+
SE_VARUNA: 30000,
|
|
4565
|
+
SE_FICT_OFFSET: 40,
|
|
4566
|
+
SE_FICT_OFFSET_1: 39,
|
|
4567
|
+
SE_FICT_MAX: 999,
|
|
4568
|
+
SE_NFICT_ELEM: 15,
|
|
4569
|
+
SE_COMET_OFFSET: 1000,
|
|
4570
|
+
SE_NALL_NAT_POINTS: 38,
|
|
4571
|
+
SE_CUPIDO: 40,
|
|
4572
|
+
SE_HADES: 41,
|
|
4573
|
+
SE_ZEUS: 42,
|
|
4574
|
+
SE_KRONOS: 43,
|
|
4575
|
+
SE_APOLLON: 44,
|
|
4576
|
+
SE_ADMETOS: 45,
|
|
4577
|
+
SE_VULKANUS: 46,
|
|
4578
|
+
SE_POSEIDON: 47,
|
|
4579
|
+
SE_ISIS: 48,
|
|
4580
|
+
SE_NIBIRU: 49,
|
|
4581
|
+
SE_HARRINGTON: 50,
|
|
4582
|
+
SE_NEPTUNE_LEVERRIER: 51,
|
|
4583
|
+
SE_NEPTUNE_ADAMS: 52,
|
|
4584
|
+
SE_PLUTO_LOWELL: 53,
|
|
4585
|
+
SE_PLUTO_PICKERING: 54,
|
|
4586
|
+
SE_VULCAN: 55,
|
|
4587
|
+
SE_WHITE_MOON: 56,
|
|
4588
|
+
SE_PROSERPINA: 57,
|
|
4589
|
+
SE_WALDEMATH: 58,
|
|
4590
|
+
SE_FIXSTAR: -10,
|
|
4591
|
+
SE_ASC: 0,
|
|
4592
|
+
SE_MC: 1,
|
|
4593
|
+
SE_ARMC: 2,
|
|
4594
|
+
SE_VERTEX: 3,
|
|
4595
|
+
SE_EQUASC: 4,
|
|
4596
|
+
SE_COASC1: 5,
|
|
4597
|
+
SE_COASC2: 6,
|
|
4598
|
+
SE_POLASC: 7,
|
|
4599
|
+
SE_NASCMC: 8,
|
|
4600
|
+
SEFLG_JPLEPH: 1,
|
|
4601
|
+
SEFLG_SWIEPH: 2,
|
|
4602
|
+
SEFLG_MOSEPH: 4,
|
|
4603
|
+
SEFLG_HELCTR: 8,
|
|
4604
|
+
SEFLG_TRUEPOS: 16,
|
|
4605
|
+
SEFLG_J2000: 32,
|
|
4606
|
+
SEFLG_NONUT: 64,
|
|
4607
|
+
SEFLG_SPEED3: 128,
|
|
4608
|
+
SEFLG_SPEED: 256,
|
|
4609
|
+
SEFLG_NOGDEFL: 512,
|
|
4610
|
+
SEFLG_NOABERR: 1024,
|
|
4611
|
+
SEFLG_ASTROMETRIC: 1536,
|
|
4612
|
+
SEFLG_EQUATORIAL: 2048,
|
|
4613
|
+
SEFLG_XYZ: 4096,
|
|
4614
|
+
SEFLG_RADIANS: 8192,
|
|
4615
|
+
SEFLG_BARYCTR: 16384,
|
|
4616
|
+
SEFLG_TOPOCTR: 32768,
|
|
4617
|
+
SEFLG_ORBEL_AA: 32768,
|
|
4618
|
+
SEFLG_TROPICAL: 0,
|
|
4619
|
+
SEFLG_SIDEREAL: 65536,
|
|
4620
|
+
SEFLG_ICRS: 131072,
|
|
4621
|
+
SEFLG_DPSIDEPS_1980: 262144,
|
|
4622
|
+
SEFLG_JPLHOR: 262144,
|
|
4623
|
+
SEFLG_JPLHOR_APPROX: 524288,
|
|
4624
|
+
SEFLG_CENTER_BODY: 1048576,
|
|
4625
|
+
SEFLG_TEST_PLMOON: 2228280,
|
|
4626
|
+
SE_SIDBITS: 256,
|
|
4627
|
+
SE_SIDBIT_ECL_T0: 256,
|
|
4628
|
+
SE_SIDBIT_SSY_PLANE: 512,
|
|
4629
|
+
SE_SIDBIT_USER_UT: 1024,
|
|
4630
|
+
SE_SIDBIT_ECL_DATE: 2048,
|
|
4631
|
+
SE_SIDBIT_NO_PREC_OFFSET: 4096,
|
|
4632
|
+
SE_SIDBIT_PREC_ORIG: 8192,
|
|
4633
|
+
SE_SIDM_FAGAN_BRADLEY: 0,
|
|
4634
|
+
SE_SIDM_LAHIRI: 1,
|
|
4635
|
+
SE_SIDM_DELUCE: 2,
|
|
4636
|
+
SE_SIDM_RAMAN: 3,
|
|
4637
|
+
SE_SIDM_USHASHASHI: 4,
|
|
4638
|
+
SE_SIDM_KRISHNAMURTI: 5,
|
|
4639
|
+
SE_SIDM_DJWHAL_KHUL: 6,
|
|
4640
|
+
SE_SIDM_YUKTESHWAR: 7,
|
|
4641
|
+
SE_SIDM_JN_BHASIN: 8,
|
|
4642
|
+
SE_SIDM_BABYL_KUGLER1: 9,
|
|
4643
|
+
SE_SIDM_BABYL_KUGLER2: 10,
|
|
4644
|
+
SE_SIDM_BABYL_KUGLER3: 11,
|
|
4645
|
+
SE_SIDM_BABYL_HUBER: 12,
|
|
4646
|
+
SE_SIDM_BABYL_ETPSC: 13,
|
|
4647
|
+
SE_SIDM_ALDEBARAN_15TAU: 14,
|
|
4648
|
+
SE_SIDM_HIPPARCHOS: 15,
|
|
4649
|
+
SE_SIDM_SASSANIAN: 16,
|
|
4650
|
+
SE_SIDM_GALCENT_0SAG: 17,
|
|
4651
|
+
SE_SIDM_J2000: 18,
|
|
4652
|
+
SE_SIDM_J1900: 19,
|
|
4653
|
+
SE_SIDM_B1950: 20,
|
|
4654
|
+
SE_SIDM_SURYASIDDHANTA: 21,
|
|
4655
|
+
SE_SIDM_SURYASIDDHANTA_MSUN: 22,
|
|
4656
|
+
SE_SIDM_ARYABHATA: 23,
|
|
4657
|
+
SE_SIDM_ARYABHATA_MSUN: 24,
|
|
4658
|
+
SE_SIDM_SS_REVATI: 25,
|
|
4659
|
+
SE_SIDM_SS_CITRA: 26,
|
|
4660
|
+
SE_SIDM_TRUE_CITRA: 27,
|
|
4661
|
+
SE_SIDM_TRUE_REVATI: 28,
|
|
4662
|
+
SE_SIDM_TRUE_PUSHYA: 29,
|
|
4663
|
+
SE_SIDM_GALCENT_RGILBRAND: 30,
|
|
4664
|
+
SE_SIDM_GALEQU_IAU1958: 31,
|
|
4665
|
+
SE_SIDM_GALEQU_TRUE: 32,
|
|
4666
|
+
SE_SIDM_GALEQU_MULA: 33,
|
|
4667
|
+
SE_SIDM_GALALIGN_MARDYKS: 34,
|
|
4668
|
+
SE_SIDM_TRUE_MULA: 35,
|
|
4669
|
+
SE_SIDM_GALCENT_MULA_WILHELM: 36,
|
|
4670
|
+
SE_SIDM_ARYABHATA_522: 37,
|
|
4671
|
+
SE_SIDM_BABYL_BRITTON: 38,
|
|
4672
|
+
SE_SIDM_TRUE_SHEORAN: 39,
|
|
4673
|
+
SE_SIDM_GALCENT_COCHRANE: 40,
|
|
4674
|
+
SE_SIDM_GALEQU_FIORENZA: 41,
|
|
4675
|
+
SE_SIDM_VALENS_MOON: 42,
|
|
4676
|
+
SE_SIDM_LAHIRI_1940: 43,
|
|
4677
|
+
SE_SIDM_LAHIRI_VP285: 44,
|
|
4678
|
+
SE_SIDM_KRISHNAMURTI_VP291: 45,
|
|
4679
|
+
SE_SIDM_LAHIRI_ICRC: 46,
|
|
4680
|
+
SE_SIDM_USER: 255,
|
|
4681
|
+
SE_NSIDM_PREDEF: 47,
|
|
4682
|
+
SE_NODBIT_MEAN: 1,
|
|
4683
|
+
SE_NODBIT_OSCU: 2,
|
|
4684
|
+
SE_NODBIT_OSCU_BAR: 4,
|
|
4685
|
+
SE_NODBIT_FOPOINT: 256,
|
|
4686
|
+
SEFLG_DEFAULTEPH: 2,
|
|
4687
|
+
SE_MAX_STNAME: 256,
|
|
4688
|
+
SE_ECL_CENTRAL: 1,
|
|
4689
|
+
SE_ECL_NONCENTRAL: 2,
|
|
4690
|
+
SE_ECL_TOTAL: 4,
|
|
4691
|
+
SE_ECL_ANNULAR: 8,
|
|
4692
|
+
SE_ECL_PARTIAL: 16,
|
|
4693
|
+
SE_ECL_ANNULAR_TOTAL: 32,
|
|
4694
|
+
SE_ECL_HYBRID: 32,
|
|
4695
|
+
SE_ECL_PENUMBRAL: 64,
|
|
4696
|
+
SE_ECL_ALLTYPES_SOLAR: 63,
|
|
4697
|
+
SE_ECL_ALLTYPES_LUNAR: 84,
|
|
4698
|
+
SE_ECL_VISIBLE: 128,
|
|
4699
|
+
SE_ECL_MAX_VISIBLE: 256,
|
|
4700
|
+
SE_ECL_1ST_VISIBLE: 512,
|
|
4701
|
+
SE_ECL_PARTBEG_VISIBLE: 512,
|
|
4702
|
+
SE_ECL_2ND_VISIBLE: 1024,
|
|
4703
|
+
SE_ECL_TOTBEG_VISIBLE: 1024,
|
|
4704
|
+
SE_ECL_3RD_VISIBLE: 2048,
|
|
4705
|
+
SE_ECL_TOTEND_VISIBLE: 2048,
|
|
4706
|
+
SE_ECL_4TH_VISIBLE: 4096,
|
|
4707
|
+
SE_ECL_PARTEND_VISIBLE: 4096,
|
|
4708
|
+
SE_ECL_PENUMBBEG_VISIBLE: 8192,
|
|
4709
|
+
SE_ECL_PENUMBEND_VISIBLE: 16384,
|
|
4710
|
+
SE_ECL_OCC_BEG_DAYLIGHT: 8192,
|
|
4711
|
+
SE_ECL_OCC_END_DAYLIGHT: 16384,
|
|
4712
|
+
SE_ECL_ONE_TRY: 32768,
|
|
4713
|
+
SE_CALC_RISE: 1,
|
|
4714
|
+
SE_CALC_SET: 2,
|
|
4715
|
+
SE_CALC_MTRANSIT: 4,
|
|
4716
|
+
SE_CALC_ITRANSIT: 8,
|
|
4717
|
+
SE_BIT_DISC_CENTER: 256,
|
|
4718
|
+
SE_BIT_DISC_BOTTOM: 8192,
|
|
4719
|
+
SE_BIT_GEOCTR_NO_ECL_LAT: 128,
|
|
4720
|
+
SE_BIT_NO_REFRACTION: 512,
|
|
4721
|
+
SE_BIT_CIVIL_TWILIGHT: 1024,
|
|
4722
|
+
SE_BIT_NAUTIC_TWILIGHT: 2048,
|
|
4723
|
+
SE_BIT_ASTRO_TWILIGHT: 4096,
|
|
4724
|
+
SE_BIT_FIXED_DISC_SIZE: 16384,
|
|
4725
|
+
SE_BIT_FORCE_SLOW_METHOD: 32768,
|
|
4726
|
+
SE_BIT_HINDU_RISING: 896,
|
|
4727
|
+
SE_ECL2HOR: 0,
|
|
4728
|
+
SE_EQU2HOR: 1,
|
|
4729
|
+
SE_HOR2ECL: 0,
|
|
4730
|
+
SE_HOR2EQU: 1,
|
|
4731
|
+
SE_TRUE_TO_APP: 0,
|
|
4732
|
+
SE_APP_TO_TRUE: 1,
|
|
4733
|
+
SE_DE_NUMBER: 431,
|
|
4734
|
+
SE_FNAME_DE200: "de200.eph",
|
|
4735
|
+
SE_FNAME_DE403: "de403.eph",
|
|
4736
|
+
SE_FNAME_DE404: "de404.eph",
|
|
4737
|
+
SE_FNAME_DE405: "de405.eph",
|
|
4738
|
+
SE_FNAME_DE406: "de406.eph",
|
|
4739
|
+
SE_FNAME_DE431: "de431.eph",
|
|
4740
|
+
SE_FNAME_DFT: "de431.eph",
|
|
4741
|
+
SE_FNAME_DFT2: "de406.eph",
|
|
4742
|
+
SE_STARFILE_OLD: "fixstars.cat",
|
|
4743
|
+
SE_STARFILE: "sefstars.txt",
|
|
4744
|
+
SE_ASTNAMFILE: "seasnam.txt",
|
|
4745
|
+
SE_FICTFILE: "seorbel.txt",
|
|
4746
|
+
SE_SPLIT_DEG_ROUND_SEC: 1,
|
|
4747
|
+
SE_SPLIT_DEG_ROUND_MIN: 2,
|
|
4748
|
+
SE_SPLIT_DEG_ROUND_DEG: 4,
|
|
4749
|
+
SE_SPLIT_DEG_ZODIACAL: 8,
|
|
4750
|
+
SE_SPLIT_DEG_NAKSHATRA: 1024,
|
|
4751
|
+
SE_SPLIT_DEG_KEEP_SIGN: 16,
|
|
4752
|
+
SE_SPLIT_DEG_KEEP_DEG: 32,
|
|
4753
|
+
SE_HELIACAL_RISING: 1,
|
|
4754
|
+
SE_HELIACAL_SETTING: 2,
|
|
4755
|
+
SE_MORNING_FIRST: 1,
|
|
4756
|
+
SE_EVENING_LAST: 2,
|
|
4757
|
+
SE_EVENING_FIRST: 3,
|
|
4758
|
+
SE_MORNING_LAST: 4,
|
|
4759
|
+
SE_ACRONYCHAL_RISING: 5,
|
|
4760
|
+
SE_ACRONYCHAL_SETTING: 6,
|
|
4761
|
+
SE_COSMICAL_SETTING: 6,
|
|
4762
|
+
SE_HELFLAG_LONG_SEARCH: 128,
|
|
4763
|
+
SE_HELFLAG_HIGH_PRECISION: 256,
|
|
4764
|
+
SE_HELFLAG_OPTICAL_PARAMS: 512,
|
|
4765
|
+
SE_HELFLAG_NO_DETAILS: 1024,
|
|
4766
|
+
SE_HELFLAG_SEARCH_1_PERIOD: 2048,
|
|
4767
|
+
SE_HELFLAG_VISLIM_DARK: 4096,
|
|
4768
|
+
SE_HELFLAG_VISLIM_NOMOON: 8192,
|
|
4769
|
+
SE_HELFLAG_VISLIM_PHOTOPIC: 16384,
|
|
4770
|
+
SE_HELFLAG_VISLIM_SCOTOPIC: 32768,
|
|
4771
|
+
SE_HELFLAG_AV: 65536,
|
|
4772
|
+
SE_HELFLAG_AVKIND_VR: 65536,
|
|
4773
|
+
SE_HELFLAG_AVKIND_PTO: 131072,
|
|
4774
|
+
SE_HELFLAG_AVKIND_MIN7: 262144,
|
|
4775
|
+
SE_HELFLAG_AVKIND_MIN9: 524288,
|
|
4776
|
+
SE_HELFLAG_AVKIND: 983040,
|
|
4777
|
+
TJD_INVALID: 99999999,
|
|
4778
|
+
SIMULATE_VICTORVB: 1,
|
|
4779
|
+
SE_PHOTOPIC_FLAG: 0,
|
|
4780
|
+
SE_SCOTOPIC_FLAG: 1,
|
|
4781
|
+
SE_MIXEDOPIC_FLAG: 2,
|
|
4782
|
+
SE_TIDAL_DE200: -23.8946,
|
|
4783
|
+
SE_TIDAL_DE403: -25.58,
|
|
4784
|
+
SE_TIDAL_DE404: -25.58,
|
|
4785
|
+
SE_TIDAL_DE405: -25.826,
|
|
4786
|
+
SE_TIDAL_DE406: -25.826,
|
|
4787
|
+
SE_TIDAL_DE421: -25.85,
|
|
4788
|
+
SE_TIDAL_DE422: -25.85,
|
|
4789
|
+
SE_TIDAL_DE430: -25.82,
|
|
4790
|
+
SE_TIDAL_DE431: -25.8,
|
|
4791
|
+
SE_TIDAL_26: -26,
|
|
4792
|
+
SE_TIDAL_STEPHENSON_2016: -25.85,
|
|
4793
|
+
SE_TIDAL_DEFAULT: -25.8,
|
|
4794
|
+
SE_TIDAL_AUTOMATIC: 999999,
|
|
4795
|
+
SE_TIDAL_MOSEPH: -25.58,
|
|
4796
|
+
SE_TIDAL_SWIEPH: -25.8,
|
|
4797
|
+
SE_TIDAL_JPLEPH: -25.8,
|
|
4798
|
+
SE_DELTAT_AUTOMATIC: 0.0000000001,
|
|
4799
|
+
SE_MODEL_DELTAT: 0,
|
|
4800
|
+
SE_MODEL_PREC_LONGTERM: 1,
|
|
4801
|
+
SE_MODEL_PREC_SHORTTERM: 2,
|
|
4802
|
+
SE_MODEL_NUT: 3,
|
|
4803
|
+
SE_MODEL_BIAS: 4,
|
|
4804
|
+
SE_MODEL_JPLHOR_MODE: 5,
|
|
4805
|
+
SE_MODEL_JPLHORA_MODE: 6,
|
|
4806
|
+
SE_MODEL_SIDT: 7,
|
|
4807
|
+
NSE_MODELS: 8,
|
|
4808
|
+
SEMOD_NPREC: 11,
|
|
4809
|
+
SEMOD_PREC_IAU_1976: 1,
|
|
4810
|
+
SEMOD_PREC_LASKAR_1986: 2,
|
|
4811
|
+
SEMOD_PREC_WILL_EPS_LASK: 3,
|
|
4812
|
+
SEMOD_PREC_WILLIAMS_1994: 4,
|
|
4813
|
+
SEMOD_PREC_SIMON_1994: 5,
|
|
4814
|
+
SEMOD_PREC_IAU_2000: 6,
|
|
4815
|
+
SEMOD_PREC_BRETAGNON_2003: 7,
|
|
4816
|
+
SEMOD_PREC_IAU_2006: 8,
|
|
4817
|
+
SEMOD_PREC_VONDRAK_2011: 9,
|
|
4818
|
+
SEMOD_PREC_OWEN_1990: 10,
|
|
4819
|
+
SEMOD_PREC_NEWCOMB: 11,
|
|
4820
|
+
SEMOD_PREC_DEFAULT: 9,
|
|
4821
|
+
SEMOD_PREC_DEFAULT_SHORT: 9,
|
|
4822
|
+
SEMOD_NNUT: 5,
|
|
4823
|
+
SEMOD_NUT_IAU_1980: 1,
|
|
4824
|
+
SEMOD_NUT_IAU_CORR_1987: 2,
|
|
4825
|
+
SEMOD_NUT_IAU_2000A: 3,
|
|
4826
|
+
SEMOD_NUT_IAU_2000B: 4,
|
|
4827
|
+
SEMOD_NUT_WOOLARD: 5,
|
|
4828
|
+
SEMOD_NUT_DEFAULT: 4,
|
|
4829
|
+
SEMOD_NSIDT: 4,
|
|
4830
|
+
SEMOD_SIDT_IAU_1976: 1,
|
|
4831
|
+
SEMOD_SIDT_IAU_2006: 2,
|
|
4832
|
+
SEMOD_SIDT_IERS_CONV_2010: 3,
|
|
4833
|
+
SEMOD_SIDT_LONGTERM: 4,
|
|
4834
|
+
SEMOD_SIDT_DEFAULT: 4,
|
|
4835
|
+
SEMOD_NBIAS: 3,
|
|
4836
|
+
SEMOD_BIAS_NONE: 1,
|
|
4837
|
+
SEMOD_BIAS_IAU2000: 2,
|
|
4838
|
+
SEMOD_BIAS_IAU2006: 3,
|
|
4839
|
+
SEMOD_BIAS_DEFAULT: 3,
|
|
4840
|
+
SEMOD_NJPLHOR: 2,
|
|
4841
|
+
SEMOD_JPLHOR_LONG_AGREEMENT: 1,
|
|
4842
|
+
SEMOD_JPLHOR_DEFAULT: 1,
|
|
4843
|
+
SEMOD_NJPLHORA: 3,
|
|
4844
|
+
SEMOD_JPLHORA_1: 1,
|
|
4845
|
+
SEMOD_JPLHORA_2: 2,
|
|
4846
|
+
SEMOD_JPLHORA_3: 3,
|
|
4847
|
+
SEMOD_JPLHORA_DEFAULT: 3,
|
|
4848
|
+
SEMOD_NDELTAT: 5,
|
|
4849
|
+
SEMOD_DELTAT_STEPHENSON_MORRISON_1984: 1,
|
|
4850
|
+
SEMOD_DELTAT_STEPHENSON_1997: 2,
|
|
4851
|
+
SEMOD_DELTAT_STEPHENSON_MORRISON_2004: 3,
|
|
4852
|
+
SEMOD_DELTAT_ESPENAK_MEEUS_2006: 4,
|
|
4853
|
+
SEMOD_DELTAT_STEPHENSON_ETC_2016: 5,
|
|
4854
|
+
SEMOD_DELTAT_DEFAULT: 5
|
|
4854
4855
|
}
|
|
4855
4856
|
}
|
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const sweph = require("./build/Release/sweph.node");
|
|
4
|
+
sweph.constants = require("./constants.js");
|
|
5
|
+
sweph.sweph = sweph;
|
|
6
|
+
sweph.default = sweph;
|
|
7
|
+
module.exports = sweph;
|
package/index.mjs
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import c from "./constants.js";
|
|
3
|
+
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
5
|
+
export const sweph = require("./build/Release/sweph.node");
|
|
6
|
+
|
|
7
|
+
sweph.constants = c;
|
|
8
|
+
sweph.sweph = sweph;
|
|
9
|
+
sweph.default = sweph;
|
|
10
|
+
|
|
11
|
+
export default sweph
|
|
12
|
+
export const constants = sweph.constants
|
|
13
|
+
export const close = sweph.close
|
|
14
|
+
export const set_delta_t_userdef = sweph.set_delta_t_userdef
|
|
15
|
+
export const set_ephe_path = sweph.set_ephe_path
|
|
16
|
+
export const set_jpl_file = sweph.set_jpl_file
|
|
17
|
+
export const set_sid_mode = sweph.set_sid_mode
|
|
18
|
+
export const set_tid_acc = sweph.set_tid_acc
|
|
19
|
+
export const set_topo = sweph.set_topo
|
|
20
|
+
export const version = sweph.version
|
|
21
|
+
export const get_library_path = sweph.get_library_path
|
|
22
|
+
export const get_tid_acc = sweph.get_tid_acc
|
|
23
|
+
export const get_planet_name = sweph.get_planet_name
|
|
24
|
+
export const get_current_file_data = sweph.get_current_file_data
|
|
25
|
+
export const get_orbital_elements = sweph.get_orbital_elements
|
|
26
|
+
export const get_ayanamsa_name = sweph.get_ayanamsa_name
|
|
27
|
+
export const get_ayanamsa_ex_ut = sweph.get_ayanamsa_ex_ut
|
|
28
|
+
export const get_ayanamsa_ex = sweph.get_ayanamsa_ex
|
|
29
|
+
export const get_ayanamsa_ut = sweph.get_ayanamsa_ut
|
|
30
|
+
export const get_ayanamsa = sweph.get_ayanamsa
|
|
31
|
+
export const calc = sweph.calc
|
|
32
|
+
export const calc_ut = sweph.calc_ut
|
|
33
|
+
export const calc_pctr = sweph.calc_pctr
|
|
34
|
+
export const fixstar = sweph.fixstar
|
|
35
|
+
export const fixstar_ut = sweph.fixstar_ut
|
|
36
|
+
export const fixstar_mag = sweph.fixstar_mag
|
|
37
|
+
export const fixstar2 = sweph.fixstar2
|
|
38
|
+
export const fixstar2_ut = sweph.fixstar2_ut
|
|
39
|
+
export const fixstar2_mag = sweph.fixstar2_mag
|
|
40
|
+
export const nod_aps = sweph.nod_aps
|
|
41
|
+
export const nod_aps_ut = sweph.nod_aps_ut
|
|
42
|
+
export const orbit_max_min_true_distance = sweph.orbit_max_min_true_distance
|
|
43
|
+
export const sol_eclipse_when_loc = sweph.sol_eclipse_when_loc
|
|
44
|
+
export const sol_eclipse_when_glob = sweph.sol_eclipse_when_glob
|
|
45
|
+
export const sol_eclipse_how = sweph.sol_eclipse_how
|
|
46
|
+
export const sol_eclipse_where = sweph.sol_eclipse_where
|
|
47
|
+
export const lun_occult_when_loc = sweph.lun_occult_when_loc
|
|
48
|
+
export const lun_occult_when_glob = sweph.lun_occult_when_glob
|
|
49
|
+
export const lun_occult_where = sweph.lun_occult_where
|
|
50
|
+
export const lun_eclipse_when_loc = sweph.lun_eclipse_when_loc
|
|
51
|
+
export const lun_eclipse_when = sweph.lun_eclipse_when
|
|
52
|
+
export const lun_eclipse_how = sweph.lun_eclipse_how
|
|
53
|
+
export const rise_trans = sweph.rise_trans
|
|
54
|
+
export const rise_trans_true_hor = sweph.rise_trans_true_hor
|
|
55
|
+
export const pheno = sweph.pheno
|
|
56
|
+
export const pheno_ut = sweph.pheno_ut
|
|
57
|
+
export const azalt = sweph.azalt
|
|
58
|
+
export const azalt_rev = sweph.azalt_rev
|
|
59
|
+
export const refrac = sweph.refrac
|
|
60
|
+
export const refrac_extended = sweph.refrac_extended
|
|
61
|
+
export const heliacal_ut = sweph.heliacal_ut
|
|
62
|
+
export const vis_limit_mag = sweph.vis_limit_mag
|
|
63
|
+
export const heliacal_pheno_ut = sweph.heliacal_pheno_ut
|
|
64
|
+
export const julday = sweph.julday
|
|
65
|
+
export const date_conversion = sweph.date_conversion
|
|
66
|
+
export const revjul = sweph.revjul
|
|
67
|
+
export const utc_time_zone = sweph.utc_time_zone
|
|
68
|
+
export const utc_to_jd = sweph.utc_to_jd
|
|
69
|
+
export const jdet_to_utc = sweph.jdet_to_utc
|
|
70
|
+
export const jdut1_to_utc = sweph.jdut1_to_utc
|
|
71
|
+
export const time_equ = sweph.time_equ
|
|
72
|
+
export const lmt_to_lat = sweph.lmt_to_lat
|
|
73
|
+
export const lat_to_lmt = sweph.lat_to_lmt
|
|
74
|
+
export const deltat = sweph.deltat
|
|
75
|
+
export const deltat_ex = sweph.deltat_ex
|
|
76
|
+
export const house_name = sweph.house_name
|
|
77
|
+
export const houses = sweph.houses
|
|
78
|
+
export const houses_armc = sweph.houses_armc
|
|
79
|
+
export const houses_armc_ex2 = sweph.houses_armc_ex2
|
|
80
|
+
export const houses_ex = sweph.houses_ex
|
|
81
|
+
export const houses_ex2 = sweph.houses_ex2
|
|
82
|
+
export const house_pos = sweph.house_pos
|
|
83
|
+
export const gauquelin_sector = sweph.gauquelin_sector
|
|
84
|
+
export const sidtime = sweph.sidtime
|
|
85
|
+
export const sidtime0 = sweph.sidtime0
|
|
86
|
+
export const cotrans = sweph.cotrans
|
|
87
|
+
export const cotrans_sp = sweph.cotrans_sp
|
|
88
|
+
export const degnorm = sweph.degnorm
|
|
89
|
+
export const radnorm = sweph.radnorm
|
|
90
|
+
export const split_deg = sweph.split_deg
|
|
91
|
+
export const csnorm = sweph.csnorm
|
|
92
|
+
export const difcsn = sweph.difcsn
|
|
93
|
+
export const difdegn = sweph.difdegn
|
|
94
|
+
export const difcs2n = sweph.difcs2n
|
|
95
|
+
export const difdeg2n = sweph.difdeg2n
|
|
96
|
+
export const csroundsec = sweph.csroundsec
|
|
97
|
+
export const d2l = sweph.d2l
|
|
98
|
+
export const day_of_week = sweph.day_of_week
|
|
99
|
+
export const cs2timestr = sweph.cs2timestr
|
|
100
|
+
export const cs2lonlatstr = sweph.cs2lonlatstr
|
|
101
|
+
export const cs2degstr = sweph.cs2degstr
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sweph",
|
|
3
|
-
"version": "2.10.0-
|
|
3
|
+
"version": "2.10.0-6",
|
|
4
4
|
"description": "The definitive Swiss Ephemeris bindings for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
"require": "./index.js",
|
|
9
|
+
"import": "./index.mjs"
|
|
10
|
+
},
|
|
7
11
|
"scripts": {
|
|
8
12
|
"test": "echo \"Error: no test specified\" && exit 0"
|
|
9
13
|
},
|
|
@@ -21,6 +25,6 @@
|
|
|
21
25
|
"author": "Timotej Valentin Rojko",
|
|
22
26
|
"license": "(GPL-2.0-or-later OR LGPL-3.0-or-later)",
|
|
23
27
|
"devDependencies": {
|
|
24
|
-
"eslint": "^
|
|
28
|
+
"eslint": "^8.21.0"
|
|
25
29
|
}
|
|
26
30
|
}
|
package/src/functions/azalt.cpp
CHANGED
|
@@ -16,12 +16,12 @@ Napi::Value sweph_azalt(const Napi::CallbackInfo& info) {
|
|
|
16
16
|
return env.Null();
|
|
17
17
|
}
|
|
18
18
|
double geopos [3];
|
|
19
|
-
if(!sweph_double_array_converter(geopos, info[2])) {
|
|
19
|
+
if(!sweph_double_array_converter(geopos, 3, info[2])) {
|
|
20
20
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
21
21
|
return env.Null();
|
|
22
22
|
}
|
|
23
23
|
double xin [3];
|
|
24
|
-
if(!sweph_double_array_converter(xin, info[5])) {
|
|
24
|
+
if(!sweph_double_array_converter(xin, 3, info[5])) {
|
|
25
25
|
Napi::TypeError::New(env, args[6].second).ThrowAsJavaScriptException();
|
|
26
26
|
return env.Null();
|
|
27
27
|
}
|
|
@@ -14,12 +14,12 @@ Napi::Value sweph_azalt_rev(const Napi::CallbackInfo& info) {
|
|
|
14
14
|
return env.Null();
|
|
15
15
|
}
|
|
16
16
|
double geopos [3];
|
|
17
|
-
if(!sweph_double_array_converter(geopos, info[2])) {
|
|
17
|
+
if(!sweph_double_array_converter(geopos, 3, info[2])) {
|
|
18
18
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
19
19
|
return env.Null();
|
|
20
20
|
}
|
|
21
21
|
double xin [2];
|
|
22
|
-
if(!sweph_double_array_converter(xin, info[3])) {
|
|
22
|
+
if(!sweph_double_array_converter(xin, 2, info[3])) {
|
|
23
23
|
Napi::TypeError::New(env, args[4].second).ThrowAsJavaScriptException();
|
|
24
24
|
return env.Null();
|
|
25
25
|
}
|
|
@@ -12,7 +12,7 @@ Napi::Value sweph_cotrans(const Napi::CallbackInfo& info) {
|
|
|
12
12
|
return env.Null();
|
|
13
13
|
}
|
|
14
14
|
double in [3];
|
|
15
|
-
if(!sweph_double_array_converter(in, info[0])) {
|
|
15
|
+
if(!sweph_double_array_converter(in, 3, info[0])) {
|
|
16
16
|
Napi::TypeError::New(env, args[1].second).ThrowAsJavaScriptException();
|
|
17
17
|
return env.Null();
|
|
18
18
|
}
|
|
@@ -12,7 +12,7 @@ Napi::Value sweph_cotrans_sp(const Napi::CallbackInfo& info) {
|
|
|
12
12
|
return env.Null();
|
|
13
13
|
}
|
|
14
14
|
double in [6];
|
|
15
|
-
if(!sweph_double_array_converter(in, info[0])) {
|
|
15
|
+
if(!sweph_double_array_converter(in, 6, info[0])) {
|
|
16
16
|
Napi::TypeError::New(env, args[1].second).ThrowAsJavaScriptException();
|
|
17
17
|
return env.Null();
|
|
18
18
|
}
|
|
@@ -18,7 +18,7 @@ Napi::Value sweph_gauquelin_sector(const Napi::CallbackInfo& info) {
|
|
|
18
18
|
return env.Null();
|
|
19
19
|
}
|
|
20
20
|
double geopos [3];
|
|
21
|
-
if(!sweph_double_array_converter(geopos, info[5])) {
|
|
21
|
+
if(!sweph_double_array_converter(geopos, 3, info[5])) {
|
|
22
22
|
Napi::TypeError::New(env, args[6].second).ThrowAsJavaScriptException();
|
|
23
23
|
return env.Null();
|
|
24
24
|
}
|
|
@@ -17,17 +17,17 @@ Napi::Value sweph_heliacal_pheno_ut(const Napi::CallbackInfo& info) {
|
|
|
17
17
|
return env.Null();
|
|
18
18
|
}
|
|
19
19
|
double dgeo [3];
|
|
20
|
-
if(!sweph_double_array_converter(dgeo, info[1])) {
|
|
20
|
+
if(!sweph_double_array_converter(dgeo, 3, info[1])) {
|
|
21
21
|
Napi::TypeError::New(env, args[2].second).ThrowAsJavaScriptException();
|
|
22
22
|
return env.Null();
|
|
23
23
|
}
|
|
24
24
|
double datm [4];
|
|
25
|
-
if(!sweph_double_array_converter(datm, info[2])) {
|
|
25
|
+
if(!sweph_double_array_converter(datm, 4, info[2])) {
|
|
26
26
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
27
27
|
return env.Null();
|
|
28
28
|
}
|
|
29
29
|
double dobs [6];
|
|
30
|
-
if(!sweph_double_array_converter(dobs, info[3])) {
|
|
30
|
+
if(!sweph_double_array_converter(dobs, 6, info[3])) {
|
|
31
31
|
Napi::TypeError::New(env, args[4].second).ThrowAsJavaScriptException();
|
|
32
32
|
return env.Null();
|
|
33
33
|
}
|
|
@@ -17,17 +17,17 @@ Napi::Value sweph_heliacal_ut(const Napi::CallbackInfo& info) {
|
|
|
17
17
|
return env.Null();
|
|
18
18
|
}
|
|
19
19
|
double dgeo [3];
|
|
20
|
-
if(!sweph_double_array_converter(dgeo, info[1])) {
|
|
20
|
+
if(!sweph_double_array_converter(dgeo, 3, info[1])) {
|
|
21
21
|
Napi::TypeError::New(env, args[2].second).ThrowAsJavaScriptException();
|
|
22
22
|
return env.Null();
|
|
23
23
|
}
|
|
24
24
|
double datm [4];
|
|
25
|
-
if(!sweph_double_array_converter(datm, info[2])) {
|
|
25
|
+
if(!sweph_double_array_converter(datm, 4, info[2])) {
|
|
26
26
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
27
27
|
return env.Null();
|
|
28
28
|
}
|
|
29
29
|
double dobs [6];
|
|
30
|
-
if(!sweph_double_array_converter(dobs, info[3])) {
|
|
30
|
+
if(!sweph_double_array_converter(dobs, 6, info[3])) {
|
|
31
31
|
Napi::TypeError::New(env, args[4].second).ThrowAsJavaScriptException();
|
|
32
32
|
return env.Null();
|
|
33
33
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
constexpr std::pair<int, const char*> args[] = {
|
|
4
4
|
{ 1, "Expecting 1 argument: hsys" },
|
|
5
|
-
{
|
|
5
|
+
{ STRING, "Argument 1 should be a string - house system ID" }
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
Napi::Value sweph_house_name(const Napi::CallbackInfo& info) {
|
|
@@ -10,7 +10,8 @@ Napi::Value sweph_house_name(const Napi::CallbackInfo& info) {
|
|
|
10
10
|
if(!sweph_type_check(args, info)) {
|
|
11
11
|
return env.Null();
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
char sys = info[0].As<Napi::String>().Utf8Value()[0];
|
|
14
|
+
const char* name = swe_house_name(int(sys));
|
|
14
15
|
if(name == NULL) {
|
|
15
16
|
Napi::TypeError::New(env, "Invalid house system").ThrowAsJavaScriptException();
|
|
16
17
|
return env.Null();
|
|
@@ -15,7 +15,7 @@ Napi::Value sweph_house_pos(const Napi::CallbackInfo& info) {
|
|
|
15
15
|
return env.Null();
|
|
16
16
|
}
|
|
17
17
|
double planet [2];
|
|
18
|
-
if(!sweph_double_array_converter(planet, info[4])) {
|
|
18
|
+
if(!sweph_double_array_converter(planet, 2, info[4])) {
|
|
19
19
|
Napi::TypeError::New(env, args[5].second).ThrowAsJavaScriptException();
|
|
20
20
|
return env.Null();
|
|
21
21
|
}
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_lun_eclipse_how(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double geopos [3];
|
|
16
|
-
if(!sweph_double_array_converter(geopos, info[2])) {
|
|
16
|
+
if(!sweph_double_array_converter(geopos, 3, info[2])) {
|
|
17
17
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
18
18
|
return env.Null();
|
|
19
19
|
}
|
|
@@ -14,7 +14,7 @@ Napi::Value sweph_lun_eclipse_when_loc(const Napi::CallbackInfo& info) {
|
|
|
14
14
|
return env.Null();
|
|
15
15
|
}
|
|
16
16
|
double geopos [3];
|
|
17
|
-
if(!sweph_double_array_converter(geopos, info[2])) {
|
|
17
|
+
if(!sweph_double_array_converter(geopos, 3, info[2])) {
|
|
18
18
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
19
19
|
return env.Null();
|
|
20
20
|
}
|
|
@@ -16,7 +16,7 @@ Napi::Value sweph_lun_occult_when_loc(const Napi::CallbackInfo& info) {
|
|
|
16
16
|
return env.Null();
|
|
17
17
|
}
|
|
18
18
|
double geopos [3];
|
|
19
|
-
if(!sweph_double_array_converter(geopos, info[0])) {
|
|
19
|
+
if(!sweph_double_array_converter(geopos, 3, info[0])) {
|
|
20
20
|
Napi::TypeError::New(env, args[1].second).ThrowAsJavaScriptException();
|
|
21
21
|
return env.Null();
|
|
22
22
|
}
|
|
@@ -18,7 +18,7 @@ Napi::Value sweph_rise_trans(const Napi::CallbackInfo& info) {
|
|
|
18
18
|
return env.Null();
|
|
19
19
|
}
|
|
20
20
|
double geopos [3];
|
|
21
|
-
if(!sweph_double_array_converter(geopos, info[5])) {
|
|
21
|
+
if(!sweph_double_array_converter(geopos, 3, info[5])) {
|
|
22
22
|
Napi::TypeError::New(env, args[6].second).ThrowAsJavaScriptException();
|
|
23
23
|
return env.Null();
|
|
24
24
|
}
|
|
@@ -19,7 +19,7 @@ Napi::Value sweph_rise_trans_true_hor(const Napi::CallbackInfo& info) {
|
|
|
19
19
|
return env.Null();
|
|
20
20
|
}
|
|
21
21
|
double geopos [3];
|
|
22
|
-
if(!sweph_double_array_converter(geopos, info[5])) {
|
|
22
|
+
if(!sweph_double_array_converter(geopos, 3, info[5])) {
|
|
23
23
|
Napi::TypeError::New(env, args[6].second).ThrowAsJavaScriptException();
|
|
24
24
|
return env.Null();
|
|
25
25
|
}
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_sol_eclipse_how(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double geopos [3];
|
|
16
|
-
if(!sweph_double_array_converter(geopos, info[2])) {
|
|
16
|
+
if(!sweph_double_array_converter(geopos, 3, info[2])) {
|
|
17
17
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
18
18
|
return env.Null();
|
|
19
19
|
}
|
|
@@ -14,7 +14,7 @@ Napi::Value sweph_sol_eclipse_when_loc(const Napi::CallbackInfo& info) {
|
|
|
14
14
|
return env.Null();
|
|
15
15
|
}
|
|
16
16
|
double geopos [3];
|
|
17
|
-
if(!sweph_double_array_converter(geopos, info[2])) {
|
|
17
|
+
if(!sweph_double_array_converter(geopos, 3, info[2])) {
|
|
18
18
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
19
19
|
return env.Null();
|
|
20
20
|
}
|
|
@@ -16,17 +16,17 @@ Napi::Value sweph_vis_limit_mag(const Napi::CallbackInfo& info) {
|
|
|
16
16
|
return env.Null();
|
|
17
17
|
}
|
|
18
18
|
double dgeo [3];
|
|
19
|
-
if(!sweph_double_array_converter(dgeo, info[1])) {
|
|
19
|
+
if(!sweph_double_array_converter(dgeo, 3, info[1])) {
|
|
20
20
|
Napi::TypeError::New(env, args[2].second).ThrowAsJavaScriptException();
|
|
21
21
|
return env.Null();
|
|
22
22
|
}
|
|
23
23
|
double datm [4];
|
|
24
|
-
if(!sweph_double_array_converter(datm, info[2])) {
|
|
24
|
+
if(!sweph_double_array_converter(datm, 4, info[2])) {
|
|
25
25
|
Napi::TypeError::New(env, args[3].second).ThrowAsJavaScriptException();
|
|
26
26
|
return env.Null();
|
|
27
27
|
}
|
|
28
28
|
double dobs [6];
|
|
29
|
-
if(!sweph_double_array_converter(dobs, info[3])) {
|
|
29
|
+
if(!sweph_double_array_converter(dobs, 6, info[3])) {
|
|
30
30
|
Napi::TypeError::New(env, args[4].second).ThrowAsJavaScriptException();
|
|
31
31
|
return env.Null();
|
|
32
32
|
}
|
package/src/sweph.cpp
CHANGED
|
@@ -119,9 +119,9 @@ bool sweph_type_check(const std::pair<int, const char*> types[], const Napi::Cal
|
|
|
119
119
|
return true;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
bool sweph_double_array_converter(double *target, Napi::Value data) {
|
|
122
|
+
bool sweph_double_array_converter(double *target, int size, Napi::Value data) {
|
|
123
123
|
Napi::Array x = data.As<Napi::Array>();
|
|
124
|
-
for(int i = 0; i <
|
|
124
|
+
for(int i = 0; i < size; i++) {
|
|
125
125
|
Napi::Value v = x[i];
|
|
126
126
|
if(!v.IsNumber()) {
|
|
127
127
|
return false;
|
package/src/sweph.h
CHANGED
|
@@ -97,7 +97,7 @@ Napi::Value sweph_cs2degstr(const Napi::CallbackInfo& info);
|
|
|
97
97
|
|
|
98
98
|
bool sweph_is_type(int type, Napi::Value data);
|
|
99
99
|
bool sweph_type_check(const std::pair<int, const char*> types[], const Napi::CallbackInfo& info);
|
|
100
|
-
bool sweph_double_array_converter(double *target, Napi::Value data);
|
|
100
|
+
bool sweph_double_array_converter(double *target, int size, Napi::Value data);
|
|
101
101
|
Napi::Array sweph_js_array_converter(double *src, int size, Napi::Env env);
|
|
102
102
|
|
|
103
103
|
enum TYPES {
|