equationoftime 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.buildpath +5 -0
- data/.project +17 -0
- data/.rvmrc +1 -0
- data/.settings/org.eclipse.ltk.core.refactoring.prefs +2 -0
- data/Makefile +238 -0
- data/Rakefile +40 -3
- data/analemma_data.yml +2925 -0
- data/equationoftime.gemspec +6 -3
- data/examples/analemma_data_generator.rb +12 -12
- data/examples/celes_parts/.RUBYARCHDIR.time +0 -0
- data/examples/celes_parts/.cproject +56 -0
- data/examples/celes_parts/.project +78 -0
- data/examples/celes_parts/a2af.c +120 -0
- data/examples/celes_parts/a2tf.c +116 -0
- data/examples/celes_parts/af2a.c +107 -0
- data/examples/celes_parts/anp.c +82 -0
- data/examples/celes_parts/anpm.c +82 -0
- data/examples/celes_parts/bi00.c +116 -0
- data/examples/celes_parts/bp00.c +173 -0
- data/examples/celes_parts/bp06.c +136 -0
- data/examples/celes_parts/bpn2xy.c +100 -0
- data/examples/celes_parts/c2i00a.c +139 -0
- data/examples/celes_parts/c2i00b.c +139 -0
- data/examples/celes_parts/c2i06a.c +136 -0
- data/examples/celes_parts/c2ibpn.c +142 -0
- data/examples/celes_parts/c2ixy.c +131 -0
- data/examples/celes_parts/c2ixys.c +123 -0
- data/examples/celes_parts/c2s.c +96 -0
- data/examples/celes_parts/c2t00a.c +154 -0
- data/examples/celes_parts/c2t00b.c +150 -0
- data/examples/celes_parts/c2t06a.c +152 -0
- data/examples/celes_parts/c2tcio.c +122 -0
- data/examples/celes_parts/c2teqx.c +122 -0
- data/examples/celes_parts/c2tpe.c +167 -0
- data/examples/celes_parts/c2txy.c +159 -0
- data/examples/celes_parts/cal2jd.c +139 -0
- data/examples/celes_parts/celes_core.c +2522 -0
- data/examples/celes_parts/cp.c +80 -0
- data/examples/celes_parts/cpv.c +82 -0
- data/examples/celes_parts/cr.c +83 -0
- data/examples/celes_parts/d2dtf.c +206 -0
- data/examples/celes_parts/d2tf.c +160 -0
- data/examples/celes_parts/dat.c +289 -0
- data/examples/celes_parts/depend +25 -0
- data/examples/celes_parts/dtdb.c +1213 -0
- data/examples/celes_parts/dtf2d.c +196 -0
- data/examples/celes_parts/ee00.c +128 -0
- data/examples/celes_parts/ee00a.c +135 -0
- data/examples/celes_parts/ee00b.c +141 -0
- data/examples/celes_parts/ee06a.c +122 -0
- data/examples/celes_parts/eect00.c +282 -0
- data/examples/celes_parts/eform.c +147 -0
- data/examples/celes_parts/eo06a.c +131 -0
- data/examples/celes_parts/eors.c +108 -0
- data/examples/celes_parts/epb.c +96 -0
- data/examples/celes_parts/epb2jd.c +91 -0
- data/examples/celes_parts/epj.c +93 -0
- data/examples/celes_parts/epj2jd.c +91 -0
- data/examples/celes_parts/epv00.c +2589 -0
- data/examples/celes_parts/eqeq94.c +131 -0
- data/examples/celes_parts/era00.c +136 -0
- data/examples/celes_parts/extconf.rb +4 -0
- data/examples/celes_parts/fad03.c +103 -0
- data/examples/celes_parts/fae03.c +102 -0
- data/examples/celes_parts/faf03.c +106 -0
- data/examples/celes_parts/faju03.c +102 -0
- data/examples/celes_parts/fal03.c +103 -0
- data/examples/celes_parts/falp03.c +103 -0
- data/examples/celes_parts/fama03.c +102 -0
- data/examples/celes_parts/fame03.c +102 -0
- data/examples/celes_parts/fane03.c +99 -0
- data/examples/celes_parts/faom03.c +104 -0
- data/examples/celes_parts/fapa03.c +103 -0
- data/examples/celes_parts/fasa03.c +102 -0
- data/examples/celes_parts/faur03.c +99 -0
- data/examples/celes_parts/fave03.c +102 -0
- data/examples/celes_parts/fk52h.c +143 -0
- data/examples/celes_parts/fk5hip.c +126 -0
- data/examples/celes_parts/fk5hz.c +160 -0
- data/examples/celes_parts/fw2m.c +134 -0
- data/examples/celes_parts/fw2xy.c +120 -0
- data/examples/celes_parts/gc2gd.c +134 -0
- data/examples/celes_parts/gc2gde.c +200 -0
- data/examples/celes_parts/gd2gc.c +134 -0
- data/examples/celes_parts/gd2gce.c +138 -0
- data/examples/celes_parts/gmst00.c +145 -0
- data/examples/celes_parts/gmst06.c +136 -0
- data/examples/celes_parts/gmst82.c +151 -0
- data/examples/celes_parts/gst00a.c +138 -0
- data/examples/celes_parts/gst00b.c +146 -0
- data/examples/celes_parts/gst06.c +140 -0
- data/examples/celes_parts/gst06a.c +131 -0
- data/examples/celes_parts/gst94.c +131 -0
- data/examples/celes_parts/h2fk5.c +148 -0
- data/examples/celes_parts/hfk5z.c +175 -0
- data/examples/celes_parts/ir.c +83 -0
- data/examples/celes_parts/jd2cal.c +155 -0
- data/examples/celes_parts/jdcalf.c +161 -0
- data/examples/celes_parts/num00a.c +121 -0
- data/examples/celes_parts/num00b.c +121 -0
- data/examples/celes_parts/num06a.c +125 -0
- data/examples/celes_parts/numat.c +109 -0
- data/examples/celes_parts/nut00a.c +2047 -0
- data/examples/celes_parts/nut00b.c +372 -0
- data/examples/celes_parts/nut06a.c +153 -0
- data/examples/celes_parts/nut80.c +325 -0
- data/examples/celes_parts/nutm80.c +117 -0
- data/examples/celes_parts/obl06.c +118 -0
- data/examples/celes_parts/obl80.c +118 -0
- data/examples/celes_parts/p06e.c +321 -0
- data/examples/celes_parts/p2pv.c +83 -0
- data/examples/celes_parts/p2s.c +91 -0
- data/examples/celes_parts/pap.c +139 -0
- data/examples/celes_parts/pas.c +96 -0
- data/examples/celes_parts/pb06.c +144 -0
- data/examples/celes_parts/pdp.c +84 -0
- data/examples/celes_parts/pfw06.c +165 -0
- data/examples/celes_parts/plan94.c +514 -0
- data/examples/celes_parts/pm.c +83 -0
- data/examples/celes_parts/pmat00.c +118 -0
- data/examples/celes_parts/pmat06.c +122 -0
- data/examples/celes_parts/pmat76.c +141 -0
- data/examples/celes_parts/pmp.c +85 -0
- data/examples/celes_parts/pn.c +109 -0
- data/examples/celes_parts/pn00.c +177 -0
- data/examples/celes_parts/pn00a.c +162 -0
- data/examples/celes_parts/pn00b.c +162 -0
- data/examples/celes_parts/pn06.c +187 -0
- data/examples/celes_parts/pn06a.c +152 -0
- data/examples/celes_parts/pnm00a.c +121 -0
- data/examples/celes_parts/pnm00b.c +121 -0
- data/examples/celes_parts/pnm06a.c +124 -0
- data/examples/celes_parts/pnm80.c +126 -0
- data/examples/celes_parts/pom00.c +115 -0
- data/examples/celes_parts/ppp.c +85 -0
- data/examples/celes_parts/ppsp.c +94 -0
- data/examples/celes_parts/pr00.c +142 -0
- data/examples/celes_parts/prec76.c +148 -0
- data/examples/celes_parts/pv2p.c +81 -0
- data/examples/celes_parts/pv2s.c +144 -0
- data/examples/celes_parts/pvdpv.c +102 -0
- data/examples/celes_parts/pvm.c +86 -0
- data/examples/celes_parts/pvmpv.c +87 -0
- data/examples/celes_parts/pvppv.c +87 -0
- data/examples/celes_parts/pvstar.c +207 -0
- data/examples/celes_parts/pvu.c +93 -0
- data/examples/celes_parts/pvup.c +88 -0
- data/examples/celes_parts/pvxpv.c +107 -0
- data/examples/celes_parts/pxp.c +94 -0
- data/examples/celes_parts/rm2v.c +111 -0
- data/examples/celes_parts/rv2m.c +118 -0
- data/examples/celes_parts/rx.c +110 -0
- data/examples/celes_parts/rxp.c +99 -0
- data/examples/celes_parts/rxpv.c +86 -0
- data/examples/celes_parts/rxr.c +99 -0
- data/examples/celes_parts/ry.c +110 -0
- data/examples/celes_parts/rz.c +110 -0
- data/examples/celes_parts/s00.c +371 -0
- data/examples/celes_parts/s00a.c +143 -0
- data/examples/celes_parts/s00b.c +143 -0
- data/examples/celes_parts/s06.c +368 -0
- data/examples/celes_parts/s06a.c +145 -0
- data/examples/celes_parts/s2c.c +85 -0
- data/examples/celes_parts/s2p.c +88 -0
- data/examples/celes_parts/s2pv.c +103 -0
- data/examples/celes_parts/s2xpv.c +87 -0
- data/examples/celes_parts/sepp.c +105 -0
- data/examples/celes_parts/seps.c +93 -0
- data/examples/celes_parts/sofa.h +379 -0
- data/examples/celes_parts/sofam.h +155 -0
- data/examples/celes_parts/sp00.c +118 -0
- data/examples/celes_parts/starpm.c +205 -0
- data/examples/celes_parts/starpv.c +264 -0
- data/examples/celes_parts/sxp.c +84 -0
- data/examples/celes_parts/sxpv.c +85 -0
- data/examples/celes_parts/taitt.c +110 -0
- data/examples/celes_parts/taiut1.c +112 -0
- data/examples/celes_parts/taiutc.c +182 -0
- data/examples/celes_parts/tcbtdb.c +132 -0
- data/examples/celes_parts/tcgtt.c +109 -0
- data/examples/celes_parts/tdbtcb.c +137 -0
- data/examples/celes_parts/tdbtt.c +122 -0
- data/examples/celes_parts/test_celes.rb +48 -0
- data/examples/celes_parts/tf2a.c +107 -0
- data/examples/celes_parts/tf2d.c +107 -0
- data/examples/celes_parts/tr.c +93 -0
- data/examples/celes_parts/trxp.c +93 -0
- data/examples/celes_parts/trxpv.c +93 -0
- data/examples/celes_parts/tttai.c +110 -0
- data/examples/celes_parts/tttcg.c +112 -0
- data/examples/celes_parts/tttdb.c +121 -0
- data/examples/celes_parts/ttut1.c +110 -0
- data/examples/celes_parts/ut1tai.c +111 -0
- data/examples/celes_parts/ut1tt.c +110 -0
- data/examples/celes_parts/ut1utc.c +193 -0
- data/examples/celes_parts/utctai.c +163 -0
- data/examples/celes_parts/utcut1.c +151 -0
- data/examples/celes_parts/xy06.c +2758 -0
- data/examples/celes_parts/xys00a.c +133 -0
- data/examples/celes_parts/xys00b.c +133 -0
- data/examples/celes_parts/xys06a.c +133 -0
- data/examples/celes_parts/zp.c +77 -0
- data/examples/celes_parts/zpv.c +79 -0
- data/examples/celes_parts/zr.c +83 -0
- data/examples/check_date_type.rb +2 -4
- data/examples/compare_geoc_long_ra.rb +19 -11
- data/examples/data_table_for_astro_dog.rb +40 -0
- data/examples/earth_rotation.rb +28 -3
- data/examples/eot.c +15 -0
- data/examples/eot.h +2 -0
- data/examples/eot_methods_list.rb +30 -3
- data/examples/eot_suntimes.rb +99 -95
- data/examples/extconf.rb +2 -0
- data/examples/{read_nutation_data.rb → gmst_gast_non_sofa.rb} +103 -98
- data/examples/nutation_table5_3a.yaml +1658 -1658
- data/examples/rbeot.c +24 -0
- data/examples/test_eot.rb +17 -0
- data/examples/test_poly_eval.rb +6 -17
- data/examples/time_scales.rb +4 -7
- data/examples/times_year.rb +50 -0
- data/examples/usage_example.rb +15 -5
- data/examples/use_angles.rb +151 -87
- data/lib/eot/angles.rb +130 -177
- data/lib/eot/constants.rb +41 -44
- data/lib/eot/displays.rb +40 -37
- data/lib/eot/geo_lat_lng_smt.rb +7 -6
- data/lib/eot/init.rb +62 -39
- data/lib/eot/nutation.rb +53 -45
- data/lib/eot/times.rb +32 -41
- data/lib/eot/utilities.rb +11 -90
- data/lib/eot/version.rb +3 -2
- data/rise_set_data.yml +1461 -0
- data/run_tests_eclipse.rb +1 -0
- data/tests/minitest/aliased_angles_spec.rb +119 -165
- data/tests/minitest/aliased_displays_spec.rb +41 -39
- data/tests/minitest/aliased_utilities_spec.rb +11 -22
- data/tests/minitest/angles_spec.rb +134 -181
- data/tests/minitest/constants_spec.rb +4 -10
- data/tests/minitest/delta_epsilon_spec.rb +13 -16
- data/tests/minitest/displays_spec.rb +39 -37
- data/tests/minitest/geo_spec.rb +15 -11
- data/tests/minitest/init_spec.rb +30 -16
- data/tests/minitest/nutation_spec.rb +19 -13
- data/tests/minitest/times_spec.rb +77 -75
- data/tests/minitest/utilities_spec.rb +10 -94
- data/wiki.md +7 -9
- metadata +218 -26
- data/examples/data_table.rb +0 -26
- data/lib/eot/nutation_table5_3a.yaml +0 -9532
- data/tests/minitest/aliased_times_spec.rb +0 -36
@@ -0,0 +1 @@
|
|
1
|
+
system 'rake'
|
@@ -1,183 +1,137 @@
|
|
1
1
|
# aliased_angles_spec.rb
|
2
2
|
#
|
3
|
-
# uncomment below for
|
3
|
+
# comment out next two lines and uncomment below for rpec tests.
|
4
4
|
gem 'minitest'
|
5
5
|
require 'minitest/autorun'
|
6
6
|
# require_relative '../spec_config'
|
7
|
+
|
7
8
|
lib = File.expand_path('../../../lib', __FILE__)
|
8
|
-
# puts "Loading gem from #{lib}/eot.rb"
|
9
9
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
10
10
|
require 'eot'
|
11
11
|
|
12
|
-
Eot_aliased_angles = Eot.new
|
13
|
-
|
12
|
+
Eot_aliased_angles = Eot.new()
|
14
13
|
|
15
|
-
describe '
|
16
|
-
|
17
|
-
# set ma attribute first as it gets tested anyway but a lot of methods
|
18
|
-
# now rely on @ma so we don't have to keep calling it unless we change
|
19
|
-
# @ajd attribute.
|
14
|
+
describe 'tests ajd of 2456885.0' do
|
20
15
|
|
21
|
-
before(:each) do
|
22
|
-
|
23
|
-
|
24
|
-
|
16
|
+
before(:each) do
|
17
|
+
Eot_aliased_angles.ajd = 2456885.0
|
18
|
+
ajd = Eot_aliased_angles.ajd
|
19
|
+
# somtimes need date to check values somewhere else
|
20
|
+
Eot_aliased_angles.date = Eot_aliased_angles.ajd_to_datetime(ajd)
|
25
21
|
end
|
26
22
|
|
27
23
|
it 'expected 2456885.0 for Eot_aliased_angles.ajd'do
|
28
|
-
assert_equal 2456885.0, Eot_aliased_angles.ajd
|
29
|
-
|
30
|
-
|
24
|
+
assert_equal 2456885.0, Eot_aliased_angles.ajd
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'expected "2014-08-15T12:00:00+00:00" for Eot_aliased_angles.date'.to_s do
|
28
|
+
assert_equal "2014-08-15T12:00:00+00:00", Eot_aliased_angles.date.to_s
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'expected 220.63461047270653 for Eot_aliased_angles.ma'do
|
32
|
+
assert_equal 220.63461047270653, Eot_aliased_angles.ma * Eot::R2D
|
33
|
+
end
|
31
34
|
|
32
|
-
it 'expected
|
33
|
-
assert_equal
|
34
|
-
assert_equal 279.2295199333757, Eot_aliased_angles.apparent_longitude(nil)
|
35
|
-
assert_equal 279.2295199333757, Eot_aliased_angles.apparent_longitude(0)
|
35
|
+
it 'expected 142.59259890360846 returned by Eot_aliased_angles.apparent_longitude()? ' do
|
36
|
+
assert_equal 142.59259890360846, Eot_aliased_angles.apparent_longitude() * Eot::R2D
|
36
37
|
end
|
37
38
|
|
38
|
-
it 'expected 0.
|
39
|
-
assert_equal 0.
|
40
|
-
assert_equal 0.16038975882741865, Eot_aliased_angles.cosine_apparent_longitude(nil)
|
41
|
-
assert_equal 0.16038975882741865, Eot_aliased_angles.cosine_apparent_longitude(0)
|
39
|
+
it 'expected -0.7943361570447087 returned by Eot_aliased_angles.cosine_apparent_longitude()? ' do
|
40
|
+
assert_equal -0.7943361570447087, Eot_aliased_angles.cosine_apparent_longitude()
|
42
41
|
end
|
43
42
|
|
44
|
-
it 'expected 0.
|
45
|
-
assert_equal 0.
|
46
|
-
assert_equal 0.16055519782509398, Eot_aliased_angles.cosine_true_longitude(nil)
|
47
|
-
assert_equal 0.16055519782509398, Eot_aliased_angles.cosine_true_longitude(0)
|
43
|
+
it 'expected -0.7943772759574979 returned by Eot_aliased_angles.cosine_true_longitude()? ' do
|
44
|
+
assert_equal -0.7943772759574979, Eot_aliased_angles.cosine_true_longitude()
|
48
45
|
end
|
49
46
|
|
50
|
-
it 'expected 0.
|
51
|
-
assert_equal 0.
|
52
|
-
assert_equal 0.9174932093012645, Eot_aliased_angles.cosine_true_obliquity(nil)
|
53
|
-
assert_equal 0.9174932093012645, Eot_aliased_angles.cosine_true_obliquity(0)
|
47
|
+
it 'expected 0.9175115346811911 returned by Eot_aliased_angles.cosine_true_obliquity()? ' do
|
48
|
+
assert_equal 0.9175115346811911, Eot_aliased_angles.cosine_true_obliquity()
|
54
49
|
end
|
55
50
|
|
56
|
-
it 'expected
|
57
|
-
assert_equal
|
58
|
-
assert_equal -23.116504240687046, Eot_aliased_angles.declination(nil)
|
59
|
-
assert_equal -23.116504240687046, Eot_aliased_angles.declination(0)
|
51
|
+
it 'expected 13.98097819689927 returned by Eot_aliased_angles.declination()? ' do
|
52
|
+
assert_equal 13.98097819689927, Eot_aliased_angles.declination() * Eot::R2D
|
60
53
|
end
|
61
54
|
|
62
|
-
it 'expected -
|
63
|
-
assert_equal -
|
64
|
-
assert_equal -0.8041525701173668, Eot_aliased_angles.delta_t_ecliptic(nil)
|
65
|
-
assert_equal -0.8041525701173668, Eot_aliased_angles.delta_t_ecliptic(0)
|
55
|
+
it 'expected -2.3470147361251383 returned by Eot_aliased_angles.delta_t_ecliptic()? ' do
|
56
|
+
assert_equal -2.3470147361251383, Eot_aliased_angles.delta_t_ecliptic() * Eot::R2D
|
66
57
|
end
|
67
58
|
|
68
|
-
it 'expected 1.
|
69
|
-
assert_equal 1.
|
70
|
-
assert_equal 1.2273333530652906, Eot_aliased_angles.delta_t_elliptic(nil)
|
71
|
-
assert_equal 1.2273333530652906, Eot_aliased_angles.delta_t_elliptic(0)
|
59
|
+
it 'expected 1.2268888346559275 returned by Eot_aliased_angles.delta_t_elliptic()? ' do
|
60
|
+
assert_equal 1.2268888346559275, Eot_aliased_angles.delta_t_elliptic() * Eot::R2D
|
72
61
|
end
|
73
62
|
|
74
|
-
it 'expected 0.
|
75
|
-
assert_equal 0.
|
76
|
-
assert_equal 0.016708617, Eot_aliased_angles.eccentricity_earth_orbit(nil)
|
77
|
-
assert_equal 0.016708617, Eot_aliased_angles.eccentricity_earth_orbit(0)
|
63
|
+
it 'expected 0.016702468499021204 returned by Eot_aliased_angles.eccentricity_earth_orbit()? ' do
|
64
|
+
assert_equal 0.016702468499021204, Eot_aliased_angles.eccentricity_earth_orbit()
|
78
65
|
end
|
79
66
|
|
80
|
-
it 'expected -1.
|
81
|
-
assert_equal -1.
|
82
|
-
assert_equal -1.227333353065282, Eot_aliased_angles.equation_of_center(nil)
|
83
|
-
assert_equal -1.227333353065282, Eot_aliased_angles.equation_of_center(0)
|
67
|
+
it 'expected -1.2268888346559395 returned by Eot_aliased_angles.equation_of_center()? ' do
|
68
|
+
assert_equal -1.2268888346559395, Eot_aliased_angles.equation_of_center() * Eot::R2D
|
84
69
|
end
|
85
70
|
|
86
|
-
it 'expected
|
87
|
-
assert_equal
|
88
|
-
assert_equal 280.4664567, Eot_aliased_angles.geometric_mean_longitude(nil)
|
89
|
-
assert_equal 280.4664567, Eot_aliased_angles.geometric_mean_longitude(0)
|
71
|
+
it 'expected 143.82336613827107 returned by Eot_aliased_angles.geometric_mean_longitude()? ' do
|
72
|
+
assert_equal 143.82336613827107, Eot_aliased_angles.geometric_mean_longitude() * Eot::R2D
|
90
73
|
end
|
91
74
|
|
92
|
-
it 'expected
|
93
|
-
assert_equal
|
94
|
-
assert_equal 90.9060538240478, Eot_aliased_angles.horizon_angle(nil)
|
95
|
-
assert_equal 90.9060538240478, Eot_aliased_angles.horizon_angle(0)
|
75
|
+
it 'expected 109.68262604883732 returned by Eot_aliased_angles.horizon_angle()? ' do
|
76
|
+
assert_equal 109.68262604883732, Eot_aliased_angles.horizon_angle() * Eot::R2D
|
96
77
|
end
|
97
78
|
|
98
|
-
it 'expected 220.
|
99
|
-
assert_equal 220.
|
79
|
+
it 'expected 220.63461047270653 returned by Eot_aliased_angles.mean_anomaly()? ' do
|
80
|
+
assert_equal 220.63461047270653, Eot_aliased_angles.mean_anomaly() * Eot::R2D
|
100
81
|
end
|
101
82
|
|
102
|
-
it 'expected
|
103
|
-
assert_equal
|
104
|
-
assert_equal 280.460622404583, Eot_aliased_angles.mean_longitude_aries(nil)
|
105
|
-
assert_equal 280.460622404583, Eot_aliased_angles.mean_longitude_aries(0)
|
83
|
+
it 'expected 143.81755546193716 returned by Eot_aliased_angles.mean_longitude_aries()? ' do
|
84
|
+
assert_equal 143.81755546193716, Eot_aliased_angles.mean_longitude_aries() * Eot::R2D
|
106
85
|
end
|
107
86
|
|
108
|
-
it 'expected 23.
|
109
|
-
assert_equal 23.
|
110
|
-
assert_equal 23.439279444444445, Eot_aliased_angles.mean_obliquity(nil)
|
111
|
-
assert_equal 23.439279444444445, Eot_aliased_angles.mean_obliquity(0)
|
87
|
+
it 'expected 23.437377335837343 returned by Eot_aliased_angles.mean_obliquity()? ' do
|
88
|
+
assert_equal 23.437377335837343, Eot_aliased_angles.mean_obliquity() * Eot::R2D
|
112
89
|
end
|
113
90
|
|
114
|
-
it 'expected 23.
|
115
|
-
assert_equal 23.
|
116
|
-
assert_equal 23.439279444444445, Eot_aliased_angles.mean_obliquity_of_ecliptic(nil)
|
117
|
-
assert_equal 23.439279444444445, Eot_aliased_angles.mean_obliquity_of_ecliptic(0)
|
91
|
+
it 'expected 23.437377335837343 returned by Eot_aliased_angles.mean_obliquity_of_ecliptic()? ' do
|
92
|
+
assert_equal 23.437377335837343, Eot_aliased_angles.mean_obliquity_of_ecliptic() * Eot::R2D
|
118
93
|
end
|
119
94
|
|
120
|
-
it 'expected 23.
|
121
|
-
assert_equal 23.
|
122
|
-
assert_equal 23.43768541308359, Eot_aliased_angles.obliquity_correction(nil)
|
123
|
-
assert_equal 23.43768541308359, Eot_aliased_angles.obliquity_correction(0)
|
95
|
+
it 'expected 23.43504551637491 returned by Eot_aliased_angles.obliquity_correction()? ' do
|
96
|
+
assert_equal 23.43504551637491, Eot_aliased_angles.obliquity_correction() * Eot::R2D
|
124
97
|
end
|
125
98
|
|
126
|
-
it 'expected
|
127
|
-
assert_equal
|
128
|
-
assert_equal 280.0432759170521, Eot_aliased_angles.right_ascension(nil)
|
129
|
-
assert_equal 280.0432759170521, Eot_aliased_angles.right_ascension(0)
|
99
|
+
it 'expected 144.94349203974028 returned by Eot_aliased_angles.right_ascension()? ' do
|
100
|
+
assert_equal 144.94349203974028, Eot_aliased_angles.right_ascension() * Eot::R2D
|
130
101
|
end
|
131
102
|
|
132
|
-
it 'expected
|
133
|
-
assert_equal
|
134
|
-
assert_equal -0.9870537600674456, Eot_aliased_angles.sine_apparent_longitude(nil)
|
135
|
-
assert_equal -0.9870537600674456, Eot_aliased_angles.sine_apparent_longitude(0)
|
103
|
+
it 'expected 0.6074784519729435 returned by Eot_aliased_angles.sine_apparent_longitude()? ' do
|
104
|
+
assert_equal 0.6074784519729435, Eot_aliased_angles.sine_apparent_longitude()
|
136
105
|
end
|
137
106
|
|
138
|
-
it 'expected
|
139
|
-
assert_equal
|
140
|
-
assert_equal -0.9870268630849643, Eot_aliased_angles.sine_true_longitude(nil)
|
141
|
-
assert_equal -0.9870268630849643, Eot_aliased_angles.sine_true_longitude(0)
|
107
|
+
it 'expected 0.6074246812917181 returned by Eot_aliased_angles.sine_true_longitude()? ' do
|
108
|
+
assert_equal 0.6074246812917181, Eot_aliased_angles.sine_true_longitude()
|
142
109
|
end
|
143
110
|
|
144
|
-
it 'expected 219.
|
145
|
-
assert_equal 219.
|
146
|
-
assert_equal 219.40727712019643, Eot_aliased_angles.true_anomaly(nil)
|
147
|
-
assert_equal 219.40727712019643, Eot_aliased_angles.true_anomaly(0)
|
111
|
+
it 'expected 219.40772163805062 returned by Eot_aliased_angles.true_anomaly()? ' do
|
112
|
+
assert_equal 219.40772163805062, Eot_aliased_angles.true_anomaly() * Eot::R2D
|
148
113
|
end
|
149
114
|
|
150
|
-
it 'expected
|
151
|
-
assert_equal
|
152
|
-
assert_equal 279.2391233469347, Eot_aliased_angles.true_longitude(nil)
|
153
|
-
assert_equal 279.2391233469347, Eot_aliased_angles.true_longitude(0)
|
115
|
+
it 'expected 142.59647730361513 returned by Eot_aliased_angles.true_longitude()? ' do
|
116
|
+
assert_equal 142.59647730361513, Eot_aliased_angles.true_longitude() * Eot::R2D
|
154
117
|
end
|
155
118
|
|
156
|
-
it 'expected
|
157
|
-
assert_equal
|
158
|
-
assert_equal 280.45708542258194, Eot_aliased_angles.true_longitude_aries(nil)
|
159
|
-
assert_equal 280.45708542258194, Eot_aliased_angles.true_longitude_aries(0)
|
119
|
+
it 'expected 143.81952716284977 returned by Eot_aliased_angles.true_longitude_aries()? ' do
|
120
|
+
assert_equal 143.81952716284977, Eot_aliased_angles.true_longitude_aries() * Eot::R2D
|
160
121
|
end
|
161
122
|
|
162
|
-
it 'expected 23.
|
163
|
-
assert_equal 23.
|
164
|
-
assert_equal 23.43768541308359, Eot_aliased_angles.true_obliquity(nil)
|
165
|
-
assert_equal 23.43768541308359, Eot_aliased_angles.true_obliquity(0)
|
123
|
+
it 'expected 23.43504551637491 returned by Eot_aliased_angles.true_obliquity()? ' do
|
124
|
+
assert_equal 23.43504551637491, Eot_aliased_angles.true_obliquity() * Eot::R2D
|
166
125
|
end
|
167
126
|
end
|
168
127
|
|
169
|
-
describe '
|
128
|
+
describe 'tests ajd of 2455055.5' do
|
170
129
|
|
171
|
-
# set ma attribute first as it gets tested anyway but a lot of methods
|
172
|
-
# now rely on @ma so we don't have to keep calling it unless we change
|
173
|
-
# @ajd attribute
|
174
130
|
before(:each) do
|
175
|
-
|
176
|
-
Eot_aliased_angles.ajd =
|
177
|
-
|
178
|
-
Eot_aliased_angles.date =
|
179
|
-
Eot_aliased_angles.ma_Sun
|
180
|
-
@ta = Eot_aliased_angles.time_julian_century(@ajd)
|
131
|
+
ajd = 2455055.0
|
132
|
+
Eot_aliased_angles.ajd = ajd
|
133
|
+
# check date for this ajd when needed.
|
134
|
+
Eot_aliased_angles.date = Eot_aliased_angles.ajd_to_datetime(ajd)
|
181
135
|
end
|
182
136
|
|
183
137
|
it 'expected 2455055.0, returned by Eot_aliased_angles.' do
|
@@ -188,100 +142,100 @@ describe 'EOT angles tjc array for jd 2455055.5 a non default value' do
|
|
188
142
|
assert_equal "2009-08-11T12:00:00+00:00", Eot_aliased_angles.date.to_s
|
189
143
|
end
|
190
144
|
|
191
|
-
it 'expected 216.
|
192
|
-
assert_equal 216.
|
145
|
+
it 'expected 216.98609672458667, returned by Eot_aliased_angles.ma' do
|
146
|
+
assert_equal 216.98609672458667, Eot_aliased_angles.ma * Eot::R2D
|
193
147
|
end
|
194
148
|
|
195
|
-
it 'expected Eot_aliased_angles.ma returned by Eot_angles.mean_anomaly()' do
|
196
|
-
assert_equal
|
149
|
+
it 'expected 216.98609672458667 Eot_aliased_angles.ma returned by Eot_angles.mean_anomaly()' do
|
150
|
+
assert_equal 216.98609672458667, Eot_aliased_angles.mean_anomaly() * Eot::R2D
|
197
151
|
end
|
198
152
|
|
199
|
-
it 'expected 138.
|
200
|
-
assert_equal 138.
|
153
|
+
it 'expected 138.95453031577227 returned by Eot_aliased_angles.apparent_longitude()? ' do
|
154
|
+
assert_equal 138.95453031577227, Eot_aliased_angles.apparent_longitude() * Eot::R2D
|
201
155
|
end
|
202
156
|
|
203
|
-
it 'expected -0.
|
204
|
-
assert_equal -0.
|
157
|
+
it 'expected -0.7541886969974998 returned by Eot_aliased_angles.cosine_apparent_longitude()? ' do
|
158
|
+
assert_equal -0.7541886969974998, Eot_aliased_angles.cosine_apparent_longitude()
|
205
159
|
end
|
206
160
|
|
207
|
-
it 'expected -0.
|
208
|
-
assert_equal -0.
|
161
|
+
it 'expected -0.7542060769936675 returned by Eot_aliased_angles.cosine_true_longitude()? ' do
|
162
|
+
assert_equal -0.7542060769936675, Eot_aliased_angles.cosine_true_longitude()
|
209
163
|
end
|
210
164
|
|
211
|
-
it 'expected 0.
|
212
|
-
assert_equal 0.
|
165
|
+
it 'expected 0.9174818088112336 returned by Eot_aliased_angles.cosine_true_obliquity()? ' do
|
166
|
+
assert_equal 0.9174818088112336, Eot_aliased_angles.cosine_true_obliquity()
|
213
167
|
end
|
214
168
|
|
215
|
-
it 'expected 15.
|
216
|
-
assert_equal 15.
|
169
|
+
it 'expected 15.141505645852742 returned by Eot_aliased_angles.declination()? ' do
|
170
|
+
assert_equal 15.141505645852742, Eot_aliased_angles.declination() * Eot::R2D
|
217
171
|
end
|
218
172
|
|
219
|
-
it 'expected -2.
|
220
|
-
assert_equal -2.
|
173
|
+
it 'expected -2.4249052816675642 returned by Eot_aliased_angles.delta_t_ecliptic()? ' do
|
174
|
+
assert_equal -2.4249052816675642, Eot_aliased_angles.delta_t_ecliptic() * Eot::R2D
|
221
175
|
end
|
222
176
|
|
223
|
-
it 'expected 1.
|
224
|
-
assert_equal 1.
|
177
|
+
it 'expected 1.1326466587390922 returned by Eot_aliased_angles.delta_t_elliptic()? ' do
|
178
|
+
assert_equal 1.1326466587390922, Eot_aliased_angles.delta_t_elliptic() * Eot::R2D
|
225
179
|
end
|
226
180
|
|
227
|
-
it 'expected 0.016704576164208475 returned by Eot_aliased_angles.eccentricity_earth_orbit(
|
228
|
-
assert_equal 0.016704576164208475, Eot_aliased_angles.eccentricity_earth_orbit(
|
229
|
-
end
|
181
|
+
it 'expected 0.016704576164208475 returned by Eot_aliased_angles.eccentricity_earth_orbit()? ' do
|
182
|
+
assert_equal 0.016704576164208475, Eot_aliased_angles.eccentricity_earth_orbit()
|
183
|
+
end
|
230
184
|
|
231
|
-
it 'expected -1.
|
232
|
-
assert_equal -1.
|
185
|
+
it 'expected -1.132646658739101 returned by Eot_aliased_angles.equation_of_center()? ' do
|
186
|
+
assert_equal -1.132646658739101, Eot_aliased_angles.equation_of_center() * Eot::R2D
|
233
187
|
end
|
234
188
|
|
235
|
-
it 'expected 140.08869346549056 returned by Eot_aliased_angles.geometric_mean_longitude(
|
236
|
-
assert_equal 140.08869346549056, Eot_aliased_angles.geometric_mean_longitude(
|
189
|
+
it 'expected 140.08869346549056 returned by Eot_aliased_angles.geometric_mean_longitude()? ' do
|
190
|
+
assert_equal 140.08869346549056, Eot_aliased_angles.geometric_mean_longitude() * Eot::R2D
|
237
191
|
end
|
238
192
|
|
239
|
-
it 'expected
|
240
|
-
assert_equal
|
193
|
+
it 'expected 111.35205810460306 returned by Eot_aliased_angles.horizon_angle()? ' do
|
194
|
+
assert_equal 111.35205810460306, Eot_aliased_angles.horizon_angle() * Eot::R2D
|
241
195
|
end
|
242
196
|
|
243
|
-
it 'expected 216.
|
244
|
-
assert_equal 216.
|
197
|
+
it 'expected 216.98609672458667 returned by Eot_aliased_angles.mean_anomaly()? ' do
|
198
|
+
assert_equal 216.98609672458667, Eot_aliased_angles.mean_anomaly() * Eot::R2D
|
245
199
|
end
|
246
200
|
|
247
|
-
it 'expected 140.
|
248
|
-
assert_equal 140.
|
201
|
+
it 'expected 140.08287430391974 returned by Eot_aliased_angles.mean_longitude_aries()? ' do
|
202
|
+
assert_equal 140.08287430391974, Eot_aliased_angles.mean_longitude_aries() * Eot::R2D
|
249
203
|
end
|
250
204
|
|
251
|
-
it 'expected 23.43802918164109 returned by Eot_aliased_angles.mean_obliquity(
|
252
|
-
assert_equal 23.43802918164109, Eot_aliased_angles.mean_obliquity(
|
205
|
+
it 'expected 23.43802918164109 returned by Eot_aliased_angles.mean_obliquity()? ' do
|
206
|
+
assert_equal 23.43802918164109, Eot_aliased_angles.mean_obliquity() * Eot::R2D
|
253
207
|
end
|
254
208
|
|
255
|
-
it 'expected 23.
|
256
|
-
assert_equal 23.
|
209
|
+
it 'expected 23.439327590332425 returned by Eot_aliased_angles.obliquity_correction()? ' do
|
210
|
+
assert_equal 23.439327590332425, Eot_aliased_angles.obliquity_correction() * Eot::R2D
|
257
211
|
end
|
258
212
|
|
259
|
-
it 'expected 141.
|
260
|
-
assert_equal 141.
|
213
|
+
it 'expected 141.38095208841904 returned by Eot_aliased_angles.right_ascension()? ' do
|
214
|
+
assert_equal 141.38095208841904, Eot_aliased_angles.right_ascension() * Eot::R2D
|
261
215
|
end
|
262
216
|
|
263
|
-
it 'expected 0.
|
264
|
-
assert_equal 0.
|
217
|
+
it 'expected 0.6566577566139103 returned by Eot_aliased_angles.sine_apparent_longitude()? ' do
|
218
|
+
assert_equal 0.6566577566139103, Eot_aliased_angles.sine_apparent_longitude()
|
265
219
|
end
|
266
220
|
|
267
|
-
it 'expected 0.
|
268
|
-
assert_equal 0.
|
221
|
+
it 'expected 0.6566377946979767 returned by Eot_aliased_angles.sine_true_longitude()? ' do
|
222
|
+
assert_equal 0.6566377946979767, Eot_aliased_angles.sine_true_longitude()
|
269
223
|
end
|
270
224
|
|
271
|
-
it 'expected 215.
|
272
|
-
assert_equal 215.
|
225
|
+
it 'expected 215.85345006584757 returned by Eot_aliased_angles.true_anomaly()? ' do
|
226
|
+
assert_equal 215.85345006584757, Eot_aliased_angles.true_anomaly() * Eot::R2D
|
273
227
|
end
|
274
228
|
|
275
|
-
it 'expected 138.
|
276
|
-
assert_equal 138.
|
229
|
+
it 'expected 138.9560468067515 returned by Eot_aliased_angles.true_longitude()? ' do
|
230
|
+
assert_equal 138.9560468067515, Eot_aliased_angles.true_longitude() * Eot::R2D
|
277
231
|
end
|
278
232
|
|
279
|
-
it 'expected 140.
|
280
|
-
assert_equal 140.
|
233
|
+
it 'expected 140.0868895077245 returned by Eot_aliased_angles.true_longitude_aries()? ' do
|
234
|
+
assert_equal 140.0868895077245, Eot_aliased_angles.true_longitude_aries() * Eot::R2D
|
281
235
|
end
|
282
236
|
|
283
|
-
it 'expected 23.
|
284
|
-
assert_equal 23.
|
237
|
+
it 'expected 23.439327590332425 returned by Eot_aliased_angles.true_obliquity()? ' do
|
238
|
+
assert_equal 23.439327590332425, Eot_aliased_angles.true_obliquity() * Eot::R2D
|
285
239
|
end
|
286
240
|
|
287
241
|
end
|
@@ -1,43 +1,45 @@
|
|
1
1
|
# aliased_displays_spec.rb
|
2
2
|
#
|
3
|
-
# uncomment below for
|
3
|
+
# comment out next two lines and uncomment below for rpec tests.
|
4
4
|
gem 'minitest'
|
5
5
|
require 'minitest/autorun'
|
6
6
|
# require_relative '../spec_config'
|
7
|
+
|
7
8
|
lib = File.expand_path('../../../lib', __FILE__)
|
8
|
-
# puts "Loading gem from #{lib}/eot.rb"
|
9
9
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
10
10
|
require 'eot'
|
11
11
|
|
12
12
|
Eot_aliased_displays = Eot.new
|
13
13
|
|
14
|
-
describe '
|
14
|
+
describe 'Eot_aliased_displays using ajd of 2456885.0' do
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
16
|
+
before(:each) do
|
17
|
+
ajd = 2456885.0
|
18
|
+
Eot_aliased_displays.ajd = ajd
|
19
|
+
|
20
|
+
# check date for this ajd when needed.
|
21
|
+
Eot_aliased_displays.date = Eot_aliased_displays.ajd_to_datetime(ajd)
|
22
|
+
|
23
|
+
end
|
25
24
|
|
26
|
-
it 'expected
|
25
|
+
it 'expected 2456885.0 , returned by Eot_aliased_displays.' do
|
27
26
|
assert_equal 2456885.0, Eot_aliased_displays.ajd
|
28
|
-
|
29
|
-
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'expected "2014-08-15T12:00:00+00:00", returned by Eot_aliased_displays.date.to_s' do
|
30
|
+
assert_equal "2014-08-15T12:00:00+00:00", Eot_aliased_displays.date.to_s
|
31
|
+
end
|
30
32
|
|
31
|
-
it 'expected
|
32
|
-
assert_equal
|
33
|
-
|
34
|
-
|
33
|
+
it 'expected 220.63461047270653, returned by Eot_aliased_displays.' do
|
34
|
+
assert_equal 220.63461047270653, Eot_aliased_displays.ma * Eot::R2D
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'expected "+142:35:33.356" returned by Eot_aliased_displays.apparent_longitude_string()? ' do
|
38
|
+
assert_equal "+142:35:33.356", Eot_aliased_displays.apparent_longitude_string()
|
35
39
|
end
|
36
40
|
|
37
|
-
it 'expected "
|
38
|
-
assert_equal "
|
39
|
-
assert_equal "-023:06:59.415", Eot_aliased_displays.declination_string(nil)
|
40
|
-
assert_equal "-023:06:59.415", Eot_aliased_displays.declination_string(0)
|
41
|
+
it 'expected "+013:58:51.521" returned by Eot_aliased_displays.declination_string()? ' do
|
42
|
+
assert_equal "+013:58:51.521", Eot_aliased_displays.declination_string()
|
41
43
|
end
|
42
44
|
|
43
45
|
it 'expected "-04m, 28.9s" returned by Eot_aliased_displays.display_equation_of_time()? ' do
|
@@ -50,12 +52,20 @@ describe 'assert_equal Eot aliased_displays default, nil' do
|
|
50
52
|
assert_equal "12:00:00.000", Eot_aliased_displays.display_time_string(0)
|
51
53
|
end
|
52
54
|
|
55
|
+
it 'expected "12:00:00.000" returned by Eot_aliased_displays.display_time_string(Eot_aliased_displays.date)? ' do
|
56
|
+
assert_equal "12:00:00.000", Eot_aliased_displays.display_time_string(Eot_aliased_displays.date)
|
57
|
+
end
|
58
|
+
|
53
59
|
it 'expected "2000-01-01" returned by Eot_aliased_displays.jd_to_date_string()? ' do
|
54
60
|
assert_equal "2000-01-01", Eot_aliased_displays.jd_to_date_string()
|
55
61
|
assert_equal "2000-01-01", Eot_aliased_displays.jd_to_date_string(nil)
|
56
62
|
assert_equal "2000-01-01", Eot_aliased_displays.jd_to_date_string(0)
|
57
63
|
end
|
58
64
|
|
65
|
+
it 'expected "2014-08-15" returned by Eot_aliased_displays.jd_to_date_string(Eot_aliased_displays.ajd)? ' do
|
66
|
+
assert_equal "2014-08-15", Eot_aliased_displays.jd_to_date_string(Eot_aliased_displays.ajd)
|
67
|
+
end
|
68
|
+
|
59
69
|
it 'expected "12:00:00" returned by Eot_aliased_displays.julian_period_day_fraction_to_time()? ' do
|
60
70
|
assert_equal "12:00:00", Eot_aliased_displays.julian_period_day_fraction_to_time()
|
61
71
|
assert_equal "12:00:00", Eot_aliased_displays.julian_period_day_fraction_to_time(nil)
|
@@ -66,28 +76,20 @@ describe 'assert_equal Eot aliased_displays default, nil' do
|
|
66
76
|
assert_equal "+220:38:04.597", Eot_aliased_displays.mean_anomaly_string()
|
67
77
|
end
|
68
78
|
|
69
|
-
it 'expected "+
|
70
|
-
assert_equal "+
|
71
|
-
assert_equal "+280:02:35.793", Eot_aliased_displays.right_ascension_string(nil)
|
72
|
-
assert_equal "+280:02:35.793", Eot_aliased_displays.right_ascension_string(0)
|
79
|
+
it 'expected "+144:56:36.571" returned by Eot_aliased_displays.right_ascension_string()? ' do
|
80
|
+
assert_equal "+144:56:36.571", Eot_aliased_displays.right_ascension_string()
|
73
81
|
end
|
74
82
|
|
75
|
-
it 'expected "+219:24:
|
76
|
-
assert_equal "+219:24:
|
77
|
-
assert_equal "+219:24:26.197", Eot_aliased_displays.true_anomaly_string(nil)
|
78
|
-
assert_equal "+219:24:26.197", Eot_aliased_displays.true_anomaly_string(0)
|
83
|
+
it 'expected "+219:24:27.797" returned by Eot_aliased_displays.true_anomaly_string()? ' do
|
84
|
+
assert_equal "+219:24:27.797", Eot_aliased_displays.true_anomaly_string()
|
79
85
|
end
|
80
86
|
|
81
|
-
it 'expected "+
|
82
|
-
assert_equal "+
|
83
|
-
assert_equal "+279:14:20.844", Eot_aliased_displays.true_longitude_string(nil)
|
84
|
-
assert_equal "+279:14:20.844", Eot_aliased_displays.true_longitude_string(0)
|
87
|
+
it 'expected "+142:35:47.3184" returned by Eot_aliased_displays.true_longitude_string()? ' do
|
88
|
+
assert_equal "+142:35:47.318", Eot_aliased_displays.true_longitude_string()
|
85
89
|
end
|
86
90
|
|
87
|
-
it 'expected "+023:26:
|
88
|
-
assert_equal "+023:26:
|
89
|
-
assert_equal "+023:26:15.667", Eot_aliased_displays.true_obliquity_string(nil)
|
90
|
-
assert_equal "+023:26:15.667", Eot_aliased_displays.true_obliquity_string(0)
|
91
|
+
it 'expected "+023:26:06.163" returned by Eot_aliased_displays.true_obliquity_string()? ' do
|
92
|
+
assert_equal "+023:26:06.163", Eot_aliased_displays.true_obliquity_string()
|
91
93
|
end
|
92
94
|
|
93
95
|
end
|