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
@@ -1,44 +1,33 @@
|
|
1
1
|
# aliased_utilities_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_utilities = Eot.new
|
13
13
|
|
14
|
-
describe '
|
14
|
+
describe 'tests ajd of 2456885.0' do
|
15
15
|
|
16
|
-
# set ma attribute first as it gets tested anyway but a lot of methods
|
17
|
-
# now rely on @ma so we don't have to keep calling it unless we change
|
18
|
-
# @ajd attribute.
|
19
16
|
|
20
17
|
before(:each) do
|
21
|
-
|
22
|
-
Eot_aliased_utilities.ajd
|
23
|
-
|
18
|
+
ajd = 2456885.0
|
19
|
+
Eot_aliased_utilities.ajd = ajd
|
20
|
+
# check date for this ajd when needed.
|
21
|
+
Eot_aliased_utilities.date = Eot_aliased_utilities.ajd_to_datetime(ajd)
|
24
22
|
end
|
25
23
|
|
26
24
|
it 'expected 2456885.0 for Eot_aliased_utilities.ajd'do
|
27
|
-
assert_equal 2456885.0, Eot_aliased_utilities.ajd
|
28
|
-
|
29
|
-
end
|
25
|
+
assert_equal 2456885.0, Eot_aliased_utilities.ajd
|
26
|
+
end
|
30
27
|
|
31
|
-
it 'expected
|
32
|
-
assert_equal
|
33
|
-
assert_equal 0.0, Eot_aliased_utilities.degrees_to_radians(nil)
|
34
|
-
assert_equal 0.0, Eot_aliased_utilities.degrees_to_radians(0)
|
28
|
+
it 'expected 220.63461047270653 for Eot_aliased_utilities.ma'do
|
29
|
+
assert_equal 220.63461047270653, Eot_aliased_utilities.ma * Eot::R2D
|
35
30
|
end
|
36
|
-
|
37
|
-
it 'expected 0.0 returned by Eot_aliased_utilities.radians_to_degrees() ' do
|
38
|
-
assert_equal 0.0, Eot_aliased_utilities.radians_to_degrees()
|
39
|
-
assert_equal 0.0, Eot_aliased_utilities.radians_to_degrees(nil)
|
40
|
-
assert_equal 0.0, Eot_aliased_utilities.radians_to_degrees(0)
|
41
|
-
end
|
42
31
|
|
43
32
|
it 'expected 0.0 returned by Eot_aliased_utilities.truncate() ' do
|
44
33
|
assert_equal 0.0, Eot_aliased_utilities.truncate()
|
@@ -1,313 +1,266 @@
|
|
1
1
|
# angles_spec.rb
|
2
2
|
#
|
3
|
-
# comment 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
|
-
require 'eot'
|
10
|
+
require 'eot'
|
11
|
+
|
11
12
|
Eot_angles = Eot.new
|
12
|
-
describe 'Eot angles default, nil, 0' do
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
# @ajd attribute.
|
17
|
-
|
14
|
+
describe 'Tests ajd of 2456885.0' do
|
15
|
+
|
18
16
|
before(:each) do
|
19
|
-
|
20
|
-
Eot_angles.ajd
|
21
|
-
|
17
|
+
ajd = 2456885.0
|
18
|
+
Eot_angles.ajd = ajd
|
19
|
+
# check date for this ajd when needed.
|
20
|
+
Eot_angles.date = Eot_angles.ajd_to_datetime(ajd)
|
22
21
|
end
|
23
22
|
|
24
23
|
it 'expected 2456885.0 for Eot_angles.ajd'do
|
25
|
-
assert_equal 2456885.0, Eot_angles.ajd
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
assert_equal 2456885.0, Eot_angles.ajd
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'expected "2014-08-15T12:00:00+00:00" for Eot_angles.date'.to_s do
|
28
|
+
assert_equal "2014-08-15T12:00:00+00:00", Eot_angles.date.to_s
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'expected 220.63461047270653 for Eot_angles.ma'do
|
32
|
+
assert_equal 220.63461047270653, Eot_angles.ma * Eot::R2D
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'expected 142.59259890360846 from Eot_angles.al_Sun()? ' do
|
36
|
+
assert_equal 142.59259890360846, Eot_angles.al_Sun() * Eot::R2D
|
33
37
|
end
|
34
38
|
|
35
|
-
it 'expected -1.
|
36
|
-
assert_equal -1.
|
37
|
-
assert_equal -1.227333353065282, Eot_angles.center(nil)
|
38
|
-
assert_equal -1.227333353065282, Eot_angles.center(0)
|
39
|
+
it 'expected -1.2268888346559395 from Eot_angles.centre()? ' do
|
40
|
+
assert_equal -1.2268888346559395, Eot_angles.center() * Eot::R2D
|
39
41
|
end
|
40
42
|
|
41
|
-
it 'expected 0.
|
42
|
-
assert_equal 0.
|
43
|
-
assert_equal 0.16038975882741865, Eot_angles.cosine_al_Sun(nil)
|
44
|
-
assert_equal 0.16038975882741865, Eot_angles.cosine_al_Sun(0)
|
43
|
+
it 'expected -0.7943361570447087 from Eot_angles.cosine_al_Sun()? ' do
|
44
|
+
assert_equal -0.7943361570447087, Eot_angles.cosine_al_Sun()
|
45
45
|
end
|
46
46
|
|
47
|
-
it 'expected 0.
|
48
|
-
assert_equal 0.
|
49
|
-
assert_equal 0.16055519782509398, Eot_angles.cosine_tl_Sun(nil)
|
50
|
-
assert_equal 0.16055519782509398, Eot_angles.cosine_tl_Sun(0)
|
47
|
+
it 'expected -0.7943772759574979 from Eot_angles.cosine_tl_Sun()? ' do
|
48
|
+
assert_equal -0.7943772759574979, Eot_angles.cosine_tl_Sun()
|
51
49
|
end
|
52
50
|
|
53
|
-
it 'expected 0.
|
54
|
-
assert_equal 0.
|
55
|
-
assert_equal 0.9174932093012645, Eot_angles.cosine_to_Earth(nil)
|
56
|
-
assert_equal 0.9174932093012645, Eot_angles.cosine_to_Earth(0)
|
51
|
+
it 'expected 0.9175115346811911 from Eot_angles.cosine_to_Earth()? ' do
|
52
|
+
assert_equal 0.9175115346811911, Eot_angles.cosine_to_Earth()
|
57
53
|
end
|
58
54
|
|
59
|
-
it 'expected
|
60
|
-
assert_equal
|
61
|
-
assert_equal -23.116504240687046, Eot_angles.dec_Sun(nil)
|
62
|
-
assert_equal -23.116504240687046, Eot_angles.dec_Sun(0)
|
55
|
+
it 'expected 13.98097819689927 from Eot_angles.dec_Sun()? ' do
|
56
|
+
assert_equal 13.98097819689927, Eot_angles.dec_Sun() * Eot::R2D
|
63
57
|
end
|
64
58
|
|
65
|
-
it 'expected -0.
|
66
|
-
assert_equal -0.
|
67
|
-
assert_equal -0.0015940313608572006, Eot_angles.delta_epsilon(nil)
|
68
|
-
assert_equal -0.0015940313608572006, Eot_angles.delta_epsilon(0)
|
59
|
+
it 'expected -0.0023318194624360874 from Eot_angles.delta_epsilon()? ' do
|
60
|
+
assert_equal -0.0023318194624360874, Eot_angles.delta_epsilon() * Eot::R2D
|
69
61
|
end
|
70
62
|
|
71
|
-
it 'expected -
|
72
|
-
assert_equal -
|
73
|
-
assert_equal -0.8041525701173668, Eot_angles.delta_oblique(nil)
|
74
|
-
assert_equal -0.8041525701173668, Eot_angles.delta_oblique(0)
|
63
|
+
it 'expected -2.3470147361251383 from Eot_angles.delta_oblique()? ' do
|
64
|
+
assert_equal -2.3470147361251383, Eot_angles.delta_oblique() * Eot::R2D
|
75
65
|
end
|
76
66
|
|
77
|
-
it 'expected
|
78
|
-
assert_equal
|
79
|
-
assert_equal 1.2273333530652906, Eot_angles.delta_orbit(nil)
|
80
|
-
assert_equal 1.2273333530652906, Eot_angles.delta_orbit(0)
|
67
|
+
it 'expected 1.2268888346559275 from Eot_angles.delta_orbit()? ' do
|
68
|
+
assert_equal 1.2268888346559275, Eot_angles.delta_orbit() * Eot::R2D
|
81
69
|
end
|
82
70
|
|
83
|
-
it 'expected
|
84
|
-
assert_equal
|
85
|
-
assert_equal -0.0038550497869660255, Eot_angles.delta_psi(nil)
|
86
|
-
assert_equal -0.0038550497869660255, Eot_angles.delta_psi(0)
|
71
|
+
it 'expected 0.0021493011786421477 from Eot_angles.delta_psi()? ' do
|
72
|
+
assert_equal 0.0021493011786421477, Eot_angles.delta_psi() * Eot::R2D
|
87
73
|
end
|
88
74
|
|
89
|
-
it 'expected 0.
|
90
|
-
assert_equal 0.
|
91
|
-
assert_equal 0.016708617, Eot_angles.eccentricity_Earth(nil)
|
92
|
-
assert_equal 0.016708617, Eot_angles.eccentricity_Earth(0)
|
75
|
+
it 'expected 0.016702468499021204 from Eot_angles.eccentricity_Earth()? ' do
|
76
|
+
assert_equal 0.016702468499021204, Eot_angles.eccentricity_Earth()
|
93
77
|
end
|
94
78
|
|
95
|
-
it 'expected
|
96
|
-
assert_equal
|
97
|
-
assert_equal -0.0035369820010596148, Eot_angles.eq_of_equinox(nil)
|
98
|
-
assert_equal -0.0035369820010596148, Eot_angles.eq_of_equinox(0)
|
79
|
+
it 'expected 0.0019720086229080497 from Eot_angles.eq_of_equinox()? ' do
|
80
|
+
assert_equal 0.0019720086229080497, Eot_angles.eq_of_equinox() * Eot::R2D
|
99
81
|
end
|
100
82
|
|
101
|
-
it 'expected -1.
|
102
|
-
assert_equal -1.
|
83
|
+
it 'expected -1.1201259014692109 from Eot_angles.eot()? ' do
|
84
|
+
assert_equal -1.1201259014692109, Eot_angles.eot() * Eot::R2D
|
103
85
|
end
|
104
86
|
|
105
|
-
it 'expected
|
106
|
-
assert_equal
|
107
|
-
assert_equal 280.4664567, Eot_angles.gml_Sun(nil)
|
108
|
-
assert_equal 280.4664567, Eot_angles.gml_Sun(0)
|
87
|
+
it 'expected 143.82336613827107 from Eot_angles.gml_Sun()? ' do
|
88
|
+
assert_equal 143.82336613827107, Eot_angles.gml_Sun() * Eot::R2D
|
109
89
|
end
|
110
90
|
|
111
|
-
it 'expected
|
112
|
-
assert_equal
|
113
|
-
assert_equal 90.9060538240478, Eot_angles.ha_Sun(nil)
|
114
|
-
assert_equal 90.9060538240478, Eot_angles.ha_Sun(0)
|
91
|
+
it 'expected 109.68262604883732 from Eot_angles.ha_Sun()? ' do
|
92
|
+
assert_equal 109.68262604883732, Eot_angles.ha_Sun() * Eot::R2D
|
115
93
|
end
|
116
94
|
|
117
|
-
it 'expected 220.
|
118
|
-
assert_equal 220.
|
95
|
+
it 'expected 220.63461047270653 from Eot_angles.ma_Sun()? ' do
|
96
|
+
assert_equal 220.63461047270653, Eot_angles.ma_Sun() * Eot::R2D
|
119
97
|
end
|
120
98
|
|
121
|
-
it 'expected
|
122
|
-
assert_equal
|
123
|
-
assert_equal 280.460622404583, Eot_angles.ml_Aries(nil)
|
124
|
-
assert_equal 280.460622404583, Eot_angles.ml_Aries(0)
|
99
|
+
it 'expected 143.81755546193716 from Eot_angles.ml_Aries()? ' do
|
100
|
+
assert_equal 143.81755546193716, Eot_angles.ml_Aries() * Eot::R2D
|
125
101
|
end
|
126
102
|
|
127
|
-
it 'expected 23.
|
128
|
-
assert_equal 23.
|
129
|
-
assert_equal 23.439279444444445, Eot_angles.mo_Earth(nil)
|
130
|
-
assert_equal 23.439279444444445, Eot_angles.mo_Earth(0)
|
103
|
+
it 'expected 23.437377335837343 from Eot_angles.mo_Earth()? ' do
|
104
|
+
assert_equal 23.437377335837343, Eot_angles.mo_Earth() * Eot::R2D
|
131
105
|
end
|
132
106
|
|
133
|
-
it 'expected
|
134
|
-
assert_equal
|
135
|
-
assert_equal 125.04455501000001, Eot_angles.omega(nil)
|
136
|
-
assert_equal 125.04455501000001, Eot_angles.omega(0)
|
107
|
+
it 'expected -157.728505037307 from Eot_angles.omega()? ' do
|
108
|
+
assert_equal -157.728505037307, Eot_angles.omega() * Eot::R2D
|
137
109
|
end
|
138
110
|
|
139
|
-
it 'expected
|
140
|
-
assert_equal
|
141
|
-
assert_equal 280.0432759170521, Eot_angles.ra_Sun(nil)
|
142
|
-
assert_equal 280.0432759170521, Eot_angles.ra_Sun(0)
|
111
|
+
it 'expected 144.94349203974028 from Eot_angles.ra_Sun()? ' do
|
112
|
+
assert_equal 144.94349203974028, Eot_angles.ra_Sun() * Eot::R2D
|
143
113
|
end
|
144
114
|
|
145
|
-
it 'expected
|
146
|
-
assert_equal
|
147
|
-
assert_equal -0.9870537600674456, Eot_angles.sine_al_Sun(nil)
|
148
|
-
assert_equal -0.9870537600674456, Eot_angles.sine_al_Sun(0)
|
115
|
+
it 'expected 0.6074784519729435 from Eot_angles.sine_al_Sun()? ' do
|
116
|
+
assert_equal 0.6074784519729435, Eot_angles.sine_al_Sun()
|
149
117
|
end
|
150
118
|
|
151
|
-
it 'expected
|
152
|
-
assert_equal
|
153
|
-
assert_equal -0.9870268630849643, Eot_angles.sine_tl_Sun(nil)
|
154
|
-
assert_equal -0.9870268630849643, Eot_angles.sine_tl_Sun(0)
|
119
|
+
it 'expected 0.6074246812917181 from Eot_angles.sine_tl_Sun()? ' do
|
120
|
+
assert_equal 0.6074246812917181, Eot_angles.sine_tl_Sun()
|
155
121
|
end
|
156
122
|
|
157
|
-
it 'expected 219.
|
158
|
-
assert_equal 219.
|
159
|
-
assert_equal 219.40727712019643, Eot_angles.ta_Sun(nil)
|
160
|
-
assert_equal 219.40727712019643, Eot_angles.ta_Sun(0)
|
123
|
+
it 'expected 219.40772163805062 from Eot_angles.ta_Sun()? ' do
|
124
|
+
assert_equal 219.40772163805062, Eot_angles.ta_Sun() * Eot::R2D
|
161
125
|
end
|
162
126
|
|
163
|
-
it 'expected
|
164
|
-
assert_equal
|
165
|
-
assert_equal 280.45708542258194, Eot_angles.tl_Aries(nil)
|
166
|
-
assert_equal 280.45708542258194, Eot_angles.tl_Aries(0)
|
127
|
+
it 'expected 143.81952716284977 from Eot_angles.tl_Aries()? ' do
|
128
|
+
assert_equal 143.81952716284977, Eot_angles.tl_Aries() * Eot::R2D
|
167
129
|
end
|
168
130
|
|
169
|
-
it 'expected
|
170
|
-
assert_equal
|
171
|
-
assert_equal 279.2391233469347, Eot_angles.tl_Sun(nil)
|
172
|
-
assert_equal 279.2391233469347, Eot_angles.tl_Sun(0)
|
131
|
+
it 'expected 142.59647730361513 from Eot_angles.tl_Sun()? ' do
|
132
|
+
assert_equal 142.59647730361513, Eot_angles.tl_Sun() * Eot::R2D
|
173
133
|
end
|
174
134
|
|
175
|
-
it 'expected 23.
|
176
|
-
assert_equal 23.
|
177
|
-
assert_equal 23.43768541308359, Eot_angles.to_Earth(nil)
|
178
|
-
assert_equal 23.43768541308359, Eot_angles.to_Earth(0)
|
135
|
+
it 'expected 23.43504551637491 from Eot_angles.to_Earth()? ' do
|
136
|
+
assert_equal 23.43504551637491, Eot_angles.to_Earth() * Eot::R2D
|
179
137
|
end
|
180
138
|
end
|
181
139
|
|
182
140
|
|
183
141
|
|
184
|
-
describe '
|
142
|
+
describe 'Tests ajd of 2455055.5 ' do
|
185
143
|
|
186
|
-
# set ma attribute first as it gets tested anyway but a lot of methods
|
187
|
-
# now rely on @ma so we don't have to keep calling it unless we change
|
188
|
-
# @ajd attribute
|
189
144
|
before(:each) do
|
190
|
-
|
191
|
-
Eot_angles.ajd =
|
192
|
-
|
193
|
-
Eot_angles.date =
|
194
|
-
Eot_angles.ma_Sun
|
195
|
-
@ta = Eot_angles.time_julian_century(@ajd)
|
145
|
+
ajd = 2455055.0
|
146
|
+
Eot_angles.ajd = ajd
|
147
|
+
# check date for this ajd when needed.
|
148
|
+
Eot_angles.date = Eot_angles.ajd_to_datetime(ajd)
|
196
149
|
end
|
197
150
|
|
198
|
-
it 'expected 2455055.0,
|
151
|
+
it 'expected 2455055.0, from Eot_angles.' do
|
199
152
|
assert_equal 2455055.0, Eot_angles.ajd
|
200
153
|
end
|
201
154
|
|
202
|
-
it 'expected "2009-08-11T12:00:00+00:00",
|
155
|
+
it 'expected "2009-08-11T12:00:00+00:00", from Eot_angles.date.to_s' do
|
203
156
|
assert_equal "2009-08-11T12:00:00+00:00", Eot_angles.date.to_s
|
204
157
|
end
|
205
158
|
|
206
|
-
it 'expected 216.
|
207
|
-
assert_equal 216.
|
159
|
+
it 'expected 216.98609672458667, from Eot_angles.' do
|
160
|
+
assert_equal 216.98609672458667, Eot_angles.ma * Eot::R2D
|
208
161
|
end
|
209
162
|
|
210
|
-
it 'expected 138.
|
211
|
-
assert_equal 138.
|
163
|
+
it 'expected 138.95453031577227 from Eot_angles.al_Sun()? ' do
|
164
|
+
assert_equal 138.95453031577227, Eot_angles.al_Sun() * Eot::R2D
|
212
165
|
end
|
213
166
|
|
214
|
-
it 'expected -1.
|
215
|
-
assert_equal -1.
|
167
|
+
it 'expected -1.132646658739101 from Eot_angles.centre()? ' do
|
168
|
+
assert_equal -1.132646658739101, Eot_angles.center() * Eot::R2D
|
216
169
|
end
|
217
170
|
|
218
|
-
it 'expected -0.
|
219
|
-
assert_equal -0.
|
171
|
+
it 'expected -0.7541886969974998 from Eot_angles.cosine_al_Sun()? ' do
|
172
|
+
assert_equal -0.7541886969974998, Eot_angles.cosine_al_Sun()
|
220
173
|
end
|
221
174
|
|
222
|
-
it 'expected -0.
|
223
|
-
assert_equal -0.
|
175
|
+
it 'expected -0.7542060769936675 from Eot_angles.cosine_tl_Sun()? ' do
|
176
|
+
assert_equal -0.7542060769936675, Eot_angles.cosine_tl_Sun()
|
224
177
|
end
|
225
178
|
|
226
|
-
it 'expected 0.
|
227
|
-
assert_equal 0.
|
179
|
+
it 'expected 0.9174818088112336 from Eot_angles.cosine_to_Earth()? ' do
|
180
|
+
assert_equal 0.9174818088112336, Eot_angles.cosine_to_Earth()
|
228
181
|
end
|
229
182
|
|
230
|
-
it 'expected
|
231
|
-
|
183
|
+
it 'expected 15.141505645852742 from Eot_angles.dec_Sun()? ' do
|
184
|
+
assert_equal 15.141505645852742, Eot_angles.dec_Sun() * Eot::R2D
|
232
185
|
end
|
233
186
|
|
234
|
-
it 'expected 0.
|
235
|
-
assert_equal 0.
|
187
|
+
it 'expected 0.0012984086913317787 from Eot_angles.delta_epsilon()? ' do
|
188
|
+
assert_equal 0.0012984086913317787, Eot_angles.delta_epsilon() * Eot::R2D
|
236
189
|
end
|
237
190
|
|
238
|
-
it 'expected -2.
|
239
|
-
assert_equal -2.
|
191
|
+
it 'expected -2.4249052816675642 from Eot_angles.delta_oblique()? ' do
|
192
|
+
assert_equal -2.4249052816675642, Eot_angles.delta_oblique() * Eot::R2D
|
240
193
|
end
|
241
194
|
|
242
|
-
it 'expected 1.
|
243
|
-
assert_equal 1.
|
195
|
+
it 'expected 1.1326466587390922 from Eot_angles.delta_orbit()? ' do
|
196
|
+
assert_equal 1.1326466587390922, Eot_angles.delta_orbit() * Eot::R2D
|
244
197
|
end
|
245
198
|
|
246
|
-
it 'expected 0.
|
247
|
-
assert_equal 0.
|
199
|
+
it 'expected 0.0043770202752654004 from Eot_angles.delta_psi()? ' do
|
200
|
+
assert_equal 0.0043770202752654004, Eot_angles.delta_psi() * Eot::R2D
|
248
201
|
end
|
249
202
|
|
250
|
-
it 'expected
|
251
|
-
|
203
|
+
it 'expected 0.016704576164208475 from Eot_angles.eccentricity_Earth()? ' do
|
204
|
+
assert_equal 0.016704576164208475, Eot_angles.eccentricity_Earth()
|
252
205
|
end
|
253
206
|
|
254
|
-
it 'expected 0.
|
255
|
-
assert_equal 0.
|
207
|
+
it 'expected 0.004015836479353944 from Eot_angles.eq_of_equinox()? ' do
|
208
|
+
assert_equal 0.004015836479353944, Eot_angles.eq_of_equinox() * Eot::R2D
|
256
209
|
end
|
257
210
|
|
258
|
-
it 'expected -1.
|
259
|
-
assert_equal -1.
|
211
|
+
it 'expected -1.2922586229284718 from Eot_angles.eot()? ' do
|
212
|
+
assert_equal -1.2922586229284718, Eot_angles.eot() * Eot::R2D
|
260
213
|
end
|
261
214
|
|
262
|
-
it 'expected 140.08869346549056
|
263
|
-
assert_equal 140.08869346549056, Eot_angles.gml_Sun(
|
215
|
+
it 'expected 140.08869346549056 from Eot_angles.gml_Sun()? ' do
|
216
|
+
assert_equal 140.08869346549056, Eot_angles.gml_Sun() * Eot::R2D
|
264
217
|
end
|
265
218
|
|
266
|
-
it 'expected
|
267
|
-
assert_equal
|
219
|
+
it 'expected 111.35205810460306 from Eot_angles.ha_Sun()? ' do
|
220
|
+
assert_equal 111.35205810460306, Eot_angles.ha_Sun() * Eot::R2D
|
268
221
|
end
|
269
222
|
|
270
|
-
it 'expected 216.
|
271
|
-
assert_equal 216.
|
223
|
+
it 'expected 216.98609672458667 from Eot_angles.ma_Sun()? ' do
|
224
|
+
assert_equal 216.98609672458667, Eot_angles.ma_Sun() * Eot::R2D
|
272
225
|
end
|
273
226
|
|
274
|
-
it 'expected 140.
|
275
|
-
assert_equal 140.
|
227
|
+
it 'expected 140.08287430391974 from Eot_angles.ml_Aries()? ' do
|
228
|
+
assert_equal 140.08287430391974, Eot_angles.ml_Aries() * Eot::R2D
|
276
229
|
end
|
277
230
|
|
278
|
-
it 'expected 23.43802918164109
|
279
|
-
assert_equal 23.43802918164109, Eot_angles.mo_Earth(
|
231
|
+
it 'expected 23.43802918164109 from Eot_angles.mo_Earth()? ' do
|
232
|
+
assert_equal 23.43802918164109, Eot_angles.mo_Earth() * Eot::R2D
|
280
233
|
end
|
281
234
|
|
282
|
-
it 'expected -60.
|
283
|
-
assert_equal -60.
|
235
|
+
it 'expected -60.823140522846394 from Eot_angles.omega()? ' do
|
236
|
+
assert_equal -60.823140522846394, Eot_angles.omega() * Eot::R2D
|
284
237
|
end
|
285
238
|
|
286
|
-
it 'expected 141.
|
287
|
-
assert_equal 141.
|
239
|
+
it 'expected 141.38095208841904 from Eot_angles.ra_Sun()? ' do
|
240
|
+
assert_equal 141.38095208841904, Eot_angles.ra_Sun() * Eot::R2D
|
288
241
|
end
|
289
242
|
|
290
|
-
it 'expected 0.
|
291
|
-
assert_equal 0.
|
243
|
+
it 'expected 0.6566577566139103 from Eot_angles.sine_al_Sun()? ' do
|
244
|
+
assert_equal 0.6566577566139103, Eot_angles.sine_al_Sun()
|
292
245
|
end
|
293
246
|
|
294
|
-
it 'expected 0.
|
295
|
-
assert_equal 0.
|
247
|
+
it 'expected 0.6566377946979767 from Eot_angles.sine_tl_Sun()? ' do
|
248
|
+
assert_equal 0.6566377946979767, Eot_angles.sine_tl_Sun()
|
296
249
|
end
|
297
250
|
|
298
|
-
it 'expected 215.
|
299
|
-
assert_equal 215.
|
251
|
+
it 'expected 215.85345006584757 from Eot_angles.ta_Sun()? ' do
|
252
|
+
assert_equal 215.85345006584757, Eot_angles.ta_Sun() * Eot::R2D
|
300
253
|
end
|
301
254
|
|
302
|
-
it 'expected 140.
|
303
|
-
assert_equal 140.
|
255
|
+
it 'expected 140.0868895077245 from Eot_angles.tl_Aries()? ' do
|
256
|
+
assert_equal 140.0868895077245, Eot_angles.tl_Aries() * Eot::R2D
|
304
257
|
end
|
305
258
|
|
306
|
-
it 'expected 138.
|
307
|
-
assert_equal 138.
|
259
|
+
it 'expected 138.9560468067515 from Eot_angles.tl_Sun()? ' do
|
260
|
+
assert_equal 138.9560468067515, Eot_angles.tl_Sun() * Eot::R2D
|
308
261
|
end
|
309
262
|
|
310
|
-
it 'expected 23.
|
311
|
-
assert_equal 23.
|
263
|
+
it 'expected 23.439327590332425 from Eot_angles.to_Earth()? ' do
|
264
|
+
assert_equal 23.439327590332425, Eot_angles.to_Earth() * Eot::R2D
|
312
265
|
end
|
313
266
|
end
|