swisseph 1.3.1 → 1.4.0
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.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/ext/swisseph/extconf.rb +1 -1
- data/ext/swisseph/swisseph.c +36 -36
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f9d37403571721f14d42714107574eb2476931241eb06a45bbdb0c366366cf4
|
|
4
|
+
data.tar.gz: f9fa581bfdf33d06aced3552233bbe5eedbdb37b3fa27a96ddcac7a8bab4fc62
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a916c629960dac6c5ce97ea5a3c885986ef299949c7a574b300ebfd04a0fec4825b99c4dfa263eb8b6cf2400fdadd071a8219aef5aa206988205f41bd059197
|
|
7
|
+
data.tar.gz: 91ba4396d1fe0f165ea78789371ff2507a842d16c703ce8bacd04d60416472db175341a55e42dfc3e2f0e263e21ae609e3d0918609cd1a3c270f9da6df4a5fc9
|
data/README.md
CHANGED
|
@@ -58,6 +58,19 @@ This gem requires **CMake 3.14 or later** to build from source. CMake is used to
|
|
|
58
58
|
- **Ubuntu/Debian:** `sudo apt-get install cmake`
|
|
59
59
|
- **Windows:** Download from [cmake.org](https://cmake.org/download/)
|
|
60
60
|
|
|
61
|
+
### Building swetest CLI
|
|
62
|
+
|
|
63
|
+
The Swiss Ephemeris includes `swetest`, a command-line tool for testing calculations. To build it:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
rake swetest:build
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Then copy the binary to your PATH:
|
|
70
|
+
```bash
|
|
71
|
+
cp ext/swisseph/swisseph_src/swetest ~/bin/
|
|
72
|
+
```
|
|
73
|
+
|
|
61
74
|
---
|
|
62
75
|
|
|
63
76
|
## Quick Examples
|
data/ext/swisseph/extconf.rb
CHANGED
|
@@ -56,7 +56,7 @@ end
|
|
|
56
56
|
|
|
57
57
|
# Get all C source files, excluding utility programs
|
|
58
58
|
$srcs = Dir.glob('*.c').select { |f|
|
|
59
|
-
!['swephgen4.c', 'swemini.c', 'sweasp.c', 'swevents.c', 'swetest.c'].include?(f)
|
|
59
|
+
!['swephgen4.c', 'swemini.c', 'sweasp.c', 'swevents.c', 'swetest.c', 'sweephe4.c'].include?(f)
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
# Verify we have the necessary sources
|
data/ext/swisseph/swisseph.c
CHANGED
|
@@ -171,7 +171,7 @@ static VALUE t_swe_utc_to_jd(int argc, VALUE *argv, VALUE self)
|
|
|
171
171
|
gregflag, dret, serr);
|
|
172
172
|
|
|
173
173
|
if (result < 0)
|
|
174
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
174
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
175
175
|
|
|
176
176
|
VALUE output = rb_ary_new();
|
|
177
177
|
rb_ary_push(output, rb_float_new(dret[0])); // JD ET
|
|
@@ -249,7 +249,7 @@ static VALUE t_swe_calc_ut(VALUE self, VALUE julian_ut, VALUE body, VALUE iflag)
|
|
|
249
249
|
char serr[AS_MAXCH];
|
|
250
250
|
|
|
251
251
|
if (swe_calc_ut(NUM2DBL(julian_ut), NUM2INT(body), NUM2LONG(iflag), results, serr) < 0)
|
|
252
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
252
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
253
253
|
|
|
254
254
|
VALUE output = rb_ary_new();
|
|
255
255
|
for (int i = 0; i < 6; i++)
|
|
@@ -268,7 +268,7 @@ static VALUE t_swe_calc(VALUE self, VALUE julian_et, VALUE body, VALUE iflag)
|
|
|
268
268
|
char serr[AS_MAXCH];
|
|
269
269
|
|
|
270
270
|
if (swe_calc(NUM2DBL(julian_et), NUM2INT(body), NUM2LONG(iflag), results, serr) < 0)
|
|
271
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
271
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
272
272
|
|
|
273
273
|
VALUE output = rb_ary_new();
|
|
274
274
|
for (int i = 0; i < 6; i++)
|
|
@@ -390,7 +390,7 @@ static VALUE t_swe_get_ayanamsa_ex_ut(VALUE self, VALUE julian_ut, VALUE flag)
|
|
|
390
390
|
char serr[AS_MAXCH];
|
|
391
391
|
|
|
392
392
|
if (swe_get_ayanamsa_ex_ut(NUM2DBL(julian_ut), NUM2INT(flag), &ayanamsha, serr) < 0)
|
|
393
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
393
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
394
394
|
|
|
395
395
|
return rb_float_new(ayanamsha);
|
|
396
396
|
}
|
|
@@ -405,7 +405,7 @@ static VALUE t_swe_get_ayanamsa_ex(VALUE self, VALUE julian_et, VALUE flag)
|
|
|
405
405
|
char serr[AS_MAXCH];
|
|
406
406
|
|
|
407
407
|
if (swe_get_ayanamsa_ex(NUM2DBL(julian_et), NUM2INT(flag), &ayanamsha, serr) < 0)
|
|
408
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
408
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
409
409
|
|
|
410
410
|
return rb_float_new(ayanamsha);
|
|
411
411
|
}
|
|
@@ -448,7 +448,7 @@ static VALUE t_swe_houses(VALUE self, VALUE julian_day, VALUE latitude, VALUE lo
|
|
|
448
448
|
int num_cusps = (hsys == 'G') ? 37 : 13;
|
|
449
449
|
|
|
450
450
|
if (swe_houses(NUM2DBL(julian_day), NUM2DBL(latitude), NUM2DBL(longitude), hsys, cusps, ascmc) < 0)
|
|
451
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
451
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
452
452
|
|
|
453
453
|
VALUE _cusps = rb_ary_new();
|
|
454
454
|
for (int i = 0; i < num_cusps; i++)
|
|
@@ -477,7 +477,7 @@ static VALUE t_swe_houses_ex(VALUE self, VALUE julian_day, VALUE iflag, VALUE la
|
|
|
477
477
|
int num_cusps = (hsys == 'G') ? 37 : 13;
|
|
478
478
|
|
|
479
479
|
if (swe_houses_ex(NUM2DBL(julian_day), NUM2INT(iflag), NUM2DBL(latitude), NUM2DBL(longitude), hsys, cusps, ascmc) < 0)
|
|
480
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
480
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
481
481
|
|
|
482
482
|
VALUE _cusps = rb_ary_new();
|
|
483
483
|
for (int i = 0; i < num_cusps; i++)
|
|
@@ -506,7 +506,7 @@ static VALUE t_swe_houses_armc(VALUE self, VALUE armc, VALUE latitude, VALUE eps
|
|
|
506
506
|
int num_cusps = (hsys == 'G') ? 37 : 13;
|
|
507
507
|
|
|
508
508
|
if (swe_houses_armc(NUM2DBL(armc), NUM2DBL(latitude), NUM2DBL(eps), hsys, cusps, ascmc) < 0)
|
|
509
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
509
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
510
510
|
|
|
511
511
|
VALUE _cusps = rb_ary_new();
|
|
512
512
|
for (int i = 0; i < num_cusps; i++)
|
|
@@ -551,7 +551,7 @@ static VALUE t_swe_houses_ex2(VALUE self, VALUE julian_day, VALUE flag, VALUE la
|
|
|
551
551
|
int num_cusps = (hsys == 'G') ? 37 : 13;
|
|
552
552
|
|
|
553
553
|
if (swe_houses_ex2(NUM2DBL(julian_day), NUM2INT(flag), NUM2DBL(latitude), NUM2DBL(longitude), hsys, cusps, ascmc, cusps_speed, ascmc_speed, serr) < 0)
|
|
554
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
554
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
555
555
|
|
|
556
556
|
VALUE _cusps = rb_ary_new();
|
|
557
557
|
for (int i = 0; i < num_cusps; i++)
|
|
@@ -619,7 +619,7 @@ static VALUE t_swe_rise_trans(VALUE self, VALUE julian_day, VALUE body, VALUE fl
|
|
|
619
619
|
double retval;
|
|
620
620
|
|
|
621
621
|
if (swe_rise_trans(NUM2DBL(julian_day), ipl, starname, NUM2INT(flag), NUM2INT(rmsi), geopos, NUM2DBL(pressure), NUM2DBL(temp), &retval, serr) < 0)
|
|
622
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
622
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
623
623
|
return rb_float_new(retval);
|
|
624
624
|
}
|
|
625
625
|
|
|
@@ -659,7 +659,7 @@ static VALUE t_swe_rise_trans_true_hor(VALUE self, VALUE julian_day, VALUE body,
|
|
|
659
659
|
double retval;
|
|
660
660
|
|
|
661
661
|
if (swe_rise_trans_true_hor(NUM2DBL(julian_day), ipl, starname, NUM2INT(flag), NUM2INT(rmsi), geopos, NUM2DBL(pressure), NUM2DBL(temp), NUM2DBL(hor_height), &retval, serr) < 0)
|
|
662
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
662
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
663
663
|
return rb_float_new(retval);
|
|
664
664
|
}
|
|
665
665
|
|
|
@@ -762,7 +762,7 @@ static VALUE t_swe_pheno_ut(VALUE self, VALUE julian_ut, VALUE ipl, VALUE iflag)
|
|
|
762
762
|
char serr[AS_MAXCH];
|
|
763
763
|
|
|
764
764
|
if (swe_pheno_ut(NUM2DBL(julian_ut), NUM2INT(ipl), NUM2INT(iflag), attr, serr) < 0)
|
|
765
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
765
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
766
766
|
|
|
767
767
|
VALUE output = rb_ary_new();
|
|
768
768
|
for (int i = 0; i < 7; i++)
|
|
@@ -781,7 +781,7 @@ static VALUE t_swe_time_equ(VALUE self, VALUE tjd)
|
|
|
781
781
|
char serr[AS_MAXCH];
|
|
782
782
|
|
|
783
783
|
if (swe_time_equ(NUM2DBL(tjd), &te, serr) < 0)
|
|
784
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
784
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
785
785
|
|
|
786
786
|
return rb_float_new(te);
|
|
787
787
|
}
|
|
@@ -796,7 +796,7 @@ static VALUE t_swe_lmt_to_lat(VALUE self, VALUE tjd_lmt, VALUE geolon)
|
|
|
796
796
|
char serr[AS_MAXCH];
|
|
797
797
|
|
|
798
798
|
if (swe_lmt_to_lat(NUM2DBL(tjd_lmt), NUM2DBL(geolon), &tjd_lat, serr) < 0)
|
|
799
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
799
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
800
800
|
|
|
801
801
|
return rb_float_new(tjd_lat);
|
|
802
802
|
}
|
|
@@ -811,7 +811,7 @@ static VALUE t_swe_lat_to_lmt(VALUE self, VALUE tjd_lat, VALUE geolon)
|
|
|
811
811
|
char serr[AS_MAXCH];
|
|
812
812
|
|
|
813
813
|
if (swe_lat_to_lmt(NUM2DBL(tjd_lat), NUM2DBL(geolon), &tjd_lmt, serr) < 0)
|
|
814
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
814
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
815
815
|
|
|
816
816
|
return rb_float_new(tjd_lmt);
|
|
817
817
|
}
|
|
@@ -891,7 +891,7 @@ static VALUE t_swe_house_pos(VALUE self, VALUE armc, VALUE geolat, VALUE eps, VA
|
|
|
891
891
|
|
|
892
892
|
double retval = swe_house_pos(NUM2DBL(armc), NUM2DBL(geolat), NUM2DBL(eps), NUM2INT(hsys), eclpos, serr);
|
|
893
893
|
if (retval < 0)
|
|
894
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
894
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
895
895
|
|
|
896
896
|
VALUE output = rb_float_new(retval);
|
|
897
897
|
return output;
|
|
@@ -1049,7 +1049,7 @@ static VALUE t_swe_nod_aps_ut(VALUE self, VALUE julian_ut, VALUE body, VALUE ifl
|
|
|
1049
1049
|
double xaphe[6];
|
|
1050
1050
|
|
|
1051
1051
|
if (swe_nod_aps_ut(NUM2DBL(julian_ut), NUM2INT(body), NUM2INT(iflag), NUM2INT(method), xnasc, xndsc, xperi, xaphe, serr) < 0)
|
|
1052
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1052
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1053
1053
|
|
|
1054
1054
|
VALUE output = rb_ary_new();
|
|
1055
1055
|
|
|
@@ -1089,7 +1089,7 @@ static VALUE t_swe_nod_aps(VALUE self, VALUE julian_et, VALUE body, VALUE iflag,
|
|
|
1089
1089
|
double xaphe[6];
|
|
1090
1090
|
|
|
1091
1091
|
if (swe_nod_aps(NUM2DBL(julian_et), NUM2INT(body), NUM2INT(iflag), NUM2INT(method), xnasc, xndsc, xperi, xaphe, serr) < 0)
|
|
1092
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1092
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1093
1093
|
|
|
1094
1094
|
VALUE output = rb_ary_new();
|
|
1095
1095
|
|
|
@@ -1132,7 +1132,7 @@ static VALUE t_swe_calc_pctr(VALUE self, VALUE julian_et, VALUE body, VALUE cent
|
|
|
1132
1132
|
double xxret[6];
|
|
1133
1133
|
|
|
1134
1134
|
if (swe_calc_pctr(NUM2DBL(julian_et), NUM2INT(body), NUM2INT(center), NUM2INT(iflag), xxret, serr) < 0)
|
|
1135
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1135
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1136
1136
|
|
|
1137
1137
|
VALUE output = rb_ary_new();
|
|
1138
1138
|
for (int i = 0; i < 6; i++)
|
|
@@ -1176,7 +1176,7 @@ static VALUE t_swe_get_orbital_elements(VALUE self, VALUE julian_et, VALUE body,
|
|
|
1176
1176
|
double dret[17]; // Array to store the return values
|
|
1177
1177
|
|
|
1178
1178
|
if (swe_get_orbital_elements(NUM2DBL(julian_et), NUM2INT(body), NUM2INT(iflag), dret, serr) < 0)
|
|
1179
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1179
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1180
1180
|
|
|
1181
1181
|
VALUE output = rb_ary_new();
|
|
1182
1182
|
for (int i = 0; i < 17; i++)
|
|
@@ -1224,7 +1224,7 @@ static VALUE t_swe_fixstar(VALUE self, VALUE star, VALUE julian_et, VALUE iflag)
|
|
|
1224
1224
|
double results[6];
|
|
1225
1225
|
|
|
1226
1226
|
if (swe_fixstar(StringValuePtr(star), NUM2DBL(julian_et), NUM2INT(iflag), results, serr) < 0)
|
|
1227
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1227
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1228
1228
|
|
|
1229
1229
|
VALUE output = rb_ary_new();
|
|
1230
1230
|
for (int i = 0; i < 6; i++)
|
|
@@ -1239,7 +1239,7 @@ static VALUE t_swe_fixstar_ut(VALUE self, VALUE star, VALUE julian_ut, VALUE ifl
|
|
|
1239
1239
|
double results[6];
|
|
1240
1240
|
|
|
1241
1241
|
if (swe_fixstar_ut(StringValuePtr(star), NUM2DBL(julian_ut), NUM2INT(iflag), results, serr) < 0)
|
|
1242
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1242
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1243
1243
|
|
|
1244
1244
|
VALUE output = rb_ary_new();
|
|
1245
1245
|
for (int i = 0; i < 6; i++)
|
|
@@ -1254,7 +1254,7 @@ static VALUE t_swe_fixstar_mag(VALUE self, VALUE star)
|
|
|
1254
1254
|
double mag;
|
|
1255
1255
|
|
|
1256
1256
|
if (swe_fixstar_mag(StringValuePtr(star), &mag, serr) < 0)
|
|
1257
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1257
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1258
1258
|
|
|
1259
1259
|
return rb_float_new(mag);
|
|
1260
1260
|
}
|
|
@@ -1265,7 +1265,7 @@ static VALUE t_swe_fixstar2(VALUE self, VALUE star, VALUE julian_et, VALUE iflag
|
|
|
1265
1265
|
double results[6];
|
|
1266
1266
|
|
|
1267
1267
|
if (swe_fixstar2(StringValuePtr(star), NUM2DBL(julian_et), NUM2INT(iflag), results, serr) < 0)
|
|
1268
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1268
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1269
1269
|
|
|
1270
1270
|
VALUE output = rb_ary_new();
|
|
1271
1271
|
for (int i = 0; i < 6; i++)
|
|
@@ -1280,7 +1280,7 @@ static VALUE t_swe_fixstar2_ut(VALUE self, VALUE star, VALUE julian_ut, VALUE if
|
|
|
1280
1280
|
double results[6];
|
|
1281
1281
|
|
|
1282
1282
|
if (swe_fixstar2_ut(StringValuePtr(star), NUM2DBL(julian_ut), NUM2INT(iflag), results, serr) < 0)
|
|
1283
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1283
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1284
1284
|
|
|
1285
1285
|
VALUE output = rb_ary_new();
|
|
1286
1286
|
for (int i = 0; i < 6; i++)
|
|
@@ -1295,7 +1295,7 @@ static VALUE t_swe_fixstar2_mag(VALUE self, VALUE star)
|
|
|
1295
1295
|
double mag;
|
|
1296
1296
|
|
|
1297
1297
|
if (swe_fixstar2_mag(StringValuePtr(star), &mag, serr) < 0)
|
|
1298
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1298
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1299
1299
|
|
|
1300
1300
|
return rb_float_new(mag);
|
|
1301
1301
|
}
|
|
@@ -1340,7 +1340,7 @@ static VALUE t_swe_heliacal_ut(int argc, VALUE *argv, VALUE self)
|
|
|
1340
1340
|
char *object_name = StringValuePtr(argv[1]);
|
|
1341
1341
|
|
|
1342
1342
|
if (swe_heliacal_ut(NUM2DBL(argv[0]), geopos, datm, dobs, object_name, NUM2INT(argv[2]), NUM2INT(argv[3]), dret, serr) < 0)
|
|
1343
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1343
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1344
1344
|
|
|
1345
1345
|
VALUE output = rb_ary_new();
|
|
1346
1346
|
for (int i = 0; i < 50; i++)
|
|
@@ -1384,7 +1384,7 @@ static VALUE t_swe_vis_limit_mag(int argc, VALUE *argv, VALUE self)
|
|
|
1384
1384
|
char *object_name = StringValuePtr(argv[1]);
|
|
1385
1385
|
|
|
1386
1386
|
if (swe_vis_limit_mag(NUM2DBL(argv[0]), geopos, datm, dobs, object_name, NUM2INT(argv[2]), dret, serr) < 0)
|
|
1387
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1387
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1388
1388
|
|
|
1389
1389
|
VALUE output = rb_ary_new();
|
|
1390
1390
|
for (int i = 0; i < 8; i++)
|
|
@@ -1418,7 +1418,7 @@ static VALUE t_swe_gauquelin_sector(VALUE self, VALUE tjd_ut, VALUE body, VALUE
|
|
|
1418
1418
|
}
|
|
1419
1419
|
|
|
1420
1420
|
if (swe_gauquelin_sector(NUM2DBL(tjd_ut), ipl, starname, NUM2INT(iflag), NUM2INT(imeth), geopos, NUM2DBL(atpress), NUM2DBL(attemp), &dgsect, serr) < 0)
|
|
1421
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1421
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1422
1422
|
|
|
1423
1423
|
return rb_float_new(dgsect);
|
|
1424
1424
|
}
|
|
@@ -1447,7 +1447,7 @@ static VALUE t_swe_sol_eclipse_when_glob(VALUE self, VALUE tjd_start, VALUE ifl,
|
|
|
1447
1447
|
|
|
1448
1448
|
int32 result = swe_sol_eclipse_when_glob(NUM2DBL(tjd_start), NUM2INT(ifl), NUM2INT(ifltype), tret, NUM2INT(backward), serr);
|
|
1449
1449
|
if (result < 0)
|
|
1450
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1450
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1451
1451
|
|
|
1452
1452
|
VALUE output = rb_ary_new();
|
|
1453
1453
|
rb_ary_push(output, INT2NUM(result)); // eclipse type flags
|
|
@@ -1473,7 +1473,7 @@ static VALUE t_swe_sol_eclipse_when_loc(VALUE self, VALUE tjd_start, VALUE ifl,
|
|
|
1473
1473
|
|
|
1474
1474
|
int32 result = swe_sol_eclipse_when_loc(NUM2DBL(tjd_start), NUM2INT(ifl), geopos, tret, attr, NUM2INT(backward), serr);
|
|
1475
1475
|
if (result < 0)
|
|
1476
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1476
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1477
1477
|
|
|
1478
1478
|
VALUE output = rb_ary_new();
|
|
1479
1479
|
rb_ary_push(output, INT2NUM(result)); // eclipse type flags
|
|
@@ -1518,7 +1518,7 @@ static VALUE t_swe_sol_eclipse_how(VALUE self, VALUE tjd, VALUE ifl, VALUE lon,
|
|
|
1518
1518
|
|
|
1519
1519
|
int32 result = swe_sol_eclipse_how(NUM2DBL(tjd), NUM2INT(ifl), geopos, attr, serr);
|
|
1520
1520
|
if (result < 0)
|
|
1521
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1521
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1522
1522
|
|
|
1523
1523
|
VALUE output = rb_ary_new();
|
|
1524
1524
|
rb_ary_push(output, INT2NUM(result)); // eclipse type flags
|
|
@@ -1540,7 +1540,7 @@ static VALUE t_swe_sol_eclipse_where(VALUE self, VALUE tjd, VALUE ifl)
|
|
|
1540
1540
|
|
|
1541
1541
|
int32 result = swe_sol_eclipse_where(NUM2DBL(tjd), NUM2INT(ifl), geopos, attr, serr);
|
|
1542
1542
|
if (result < 0)
|
|
1543
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1543
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1544
1544
|
|
|
1545
1545
|
VALUE output = rb_ary_new();
|
|
1546
1546
|
rb_ary_push(output, INT2NUM(result)); // eclipse type flags
|
|
@@ -1579,7 +1579,7 @@ static VALUE t_swe_lun_eclipse_when(VALUE self, VALUE tjd_start, VALUE ifl, VALU
|
|
|
1579
1579
|
|
|
1580
1580
|
int32 result = swe_lun_eclipse_when(NUM2DBL(tjd_start), NUM2INT(ifl), NUM2INT(ifltype), tret, NUM2INT(backward), serr);
|
|
1581
1581
|
if (result < 0)
|
|
1582
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1582
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1583
1583
|
|
|
1584
1584
|
VALUE output = rb_ary_new();
|
|
1585
1585
|
rb_ary_push(output, INT2NUM(result)); // eclipse type flags
|
|
@@ -1605,7 +1605,7 @@ static VALUE t_swe_lun_eclipse_when_loc(VALUE self, VALUE tjd_start, VALUE ifl,
|
|
|
1605
1605
|
|
|
1606
1606
|
int32 result = swe_lun_eclipse_when_loc(NUM2DBL(tjd_start), NUM2INT(ifl), geopos, tret, attr, NUM2INT(backward), serr);
|
|
1607
1607
|
if (result < 0)
|
|
1608
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1608
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1609
1609
|
|
|
1610
1610
|
VALUE output = rb_ary_new();
|
|
1611
1611
|
rb_ary_push(output, INT2NUM(result)); // eclipse type flags
|
|
@@ -1651,7 +1651,7 @@ static VALUE t_swe_lun_eclipse_how(VALUE self, VALUE tjd, VALUE ifl, VALUE lon,
|
|
|
1651
1651
|
|
|
1652
1652
|
int32 result = swe_lun_eclipse_how(NUM2DBL(tjd), NUM2INT(ifl), geopos, attr, serr);
|
|
1653
1653
|
if (result < 0)
|
|
1654
|
-
rb_raise(rb_eRuntimeError, serr);
|
|
1654
|
+
rb_raise(rb_eRuntimeError, "%s", serr);
|
|
1655
1655
|
|
|
1656
1656
|
VALUE output = rb_ary_new();
|
|
1657
1657
|
rb_ary_push(output, INT2NUM(result)); // eclipse type flags
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: swisseph
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Lowenfels
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-02-
|
|
10
|
+
date: 2026-02-06 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: minitest
|
|
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
109
109
|
requirements:
|
|
110
110
|
- - ">="
|
|
111
111
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: '
|
|
112
|
+
version: '3.0'
|
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|