equationoftime 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/.buildpath +5 -0
  3. data/.project +17 -0
  4. data/.rvmrc +1 -0
  5. data/.settings/org.eclipse.ltk.core.refactoring.prefs +2 -0
  6. data/Makefile +238 -0
  7. data/Rakefile +40 -3
  8. data/analemma_data.yml +2925 -0
  9. data/equationoftime.gemspec +6 -3
  10. data/examples/analemma_data_generator.rb +12 -12
  11. data/examples/celes_parts/.RUBYARCHDIR.time +0 -0
  12. data/examples/celes_parts/.cproject +56 -0
  13. data/examples/celes_parts/.project +78 -0
  14. data/examples/celes_parts/a2af.c +120 -0
  15. data/examples/celes_parts/a2tf.c +116 -0
  16. data/examples/celes_parts/af2a.c +107 -0
  17. data/examples/celes_parts/anp.c +82 -0
  18. data/examples/celes_parts/anpm.c +82 -0
  19. data/examples/celes_parts/bi00.c +116 -0
  20. data/examples/celes_parts/bp00.c +173 -0
  21. data/examples/celes_parts/bp06.c +136 -0
  22. data/examples/celes_parts/bpn2xy.c +100 -0
  23. data/examples/celes_parts/c2i00a.c +139 -0
  24. data/examples/celes_parts/c2i00b.c +139 -0
  25. data/examples/celes_parts/c2i06a.c +136 -0
  26. data/examples/celes_parts/c2ibpn.c +142 -0
  27. data/examples/celes_parts/c2ixy.c +131 -0
  28. data/examples/celes_parts/c2ixys.c +123 -0
  29. data/examples/celes_parts/c2s.c +96 -0
  30. data/examples/celes_parts/c2t00a.c +154 -0
  31. data/examples/celes_parts/c2t00b.c +150 -0
  32. data/examples/celes_parts/c2t06a.c +152 -0
  33. data/examples/celes_parts/c2tcio.c +122 -0
  34. data/examples/celes_parts/c2teqx.c +122 -0
  35. data/examples/celes_parts/c2tpe.c +167 -0
  36. data/examples/celes_parts/c2txy.c +159 -0
  37. data/examples/celes_parts/cal2jd.c +139 -0
  38. data/examples/celes_parts/celes_core.c +2522 -0
  39. data/examples/celes_parts/cp.c +80 -0
  40. data/examples/celes_parts/cpv.c +82 -0
  41. data/examples/celes_parts/cr.c +83 -0
  42. data/examples/celes_parts/d2dtf.c +206 -0
  43. data/examples/celes_parts/d2tf.c +160 -0
  44. data/examples/celes_parts/dat.c +289 -0
  45. data/examples/celes_parts/depend +25 -0
  46. data/examples/celes_parts/dtdb.c +1213 -0
  47. data/examples/celes_parts/dtf2d.c +196 -0
  48. data/examples/celes_parts/ee00.c +128 -0
  49. data/examples/celes_parts/ee00a.c +135 -0
  50. data/examples/celes_parts/ee00b.c +141 -0
  51. data/examples/celes_parts/ee06a.c +122 -0
  52. data/examples/celes_parts/eect00.c +282 -0
  53. data/examples/celes_parts/eform.c +147 -0
  54. data/examples/celes_parts/eo06a.c +131 -0
  55. data/examples/celes_parts/eors.c +108 -0
  56. data/examples/celes_parts/epb.c +96 -0
  57. data/examples/celes_parts/epb2jd.c +91 -0
  58. data/examples/celes_parts/epj.c +93 -0
  59. data/examples/celes_parts/epj2jd.c +91 -0
  60. data/examples/celes_parts/epv00.c +2589 -0
  61. data/examples/celes_parts/eqeq94.c +131 -0
  62. data/examples/celes_parts/era00.c +136 -0
  63. data/examples/celes_parts/extconf.rb +4 -0
  64. data/examples/celes_parts/fad03.c +103 -0
  65. data/examples/celes_parts/fae03.c +102 -0
  66. data/examples/celes_parts/faf03.c +106 -0
  67. data/examples/celes_parts/faju03.c +102 -0
  68. data/examples/celes_parts/fal03.c +103 -0
  69. data/examples/celes_parts/falp03.c +103 -0
  70. data/examples/celes_parts/fama03.c +102 -0
  71. data/examples/celes_parts/fame03.c +102 -0
  72. data/examples/celes_parts/fane03.c +99 -0
  73. data/examples/celes_parts/faom03.c +104 -0
  74. data/examples/celes_parts/fapa03.c +103 -0
  75. data/examples/celes_parts/fasa03.c +102 -0
  76. data/examples/celes_parts/faur03.c +99 -0
  77. data/examples/celes_parts/fave03.c +102 -0
  78. data/examples/celes_parts/fk52h.c +143 -0
  79. data/examples/celes_parts/fk5hip.c +126 -0
  80. data/examples/celes_parts/fk5hz.c +160 -0
  81. data/examples/celes_parts/fw2m.c +134 -0
  82. data/examples/celes_parts/fw2xy.c +120 -0
  83. data/examples/celes_parts/gc2gd.c +134 -0
  84. data/examples/celes_parts/gc2gde.c +200 -0
  85. data/examples/celes_parts/gd2gc.c +134 -0
  86. data/examples/celes_parts/gd2gce.c +138 -0
  87. data/examples/celes_parts/gmst00.c +145 -0
  88. data/examples/celes_parts/gmst06.c +136 -0
  89. data/examples/celes_parts/gmst82.c +151 -0
  90. data/examples/celes_parts/gst00a.c +138 -0
  91. data/examples/celes_parts/gst00b.c +146 -0
  92. data/examples/celes_parts/gst06.c +140 -0
  93. data/examples/celes_parts/gst06a.c +131 -0
  94. data/examples/celes_parts/gst94.c +131 -0
  95. data/examples/celes_parts/h2fk5.c +148 -0
  96. data/examples/celes_parts/hfk5z.c +175 -0
  97. data/examples/celes_parts/ir.c +83 -0
  98. data/examples/celes_parts/jd2cal.c +155 -0
  99. data/examples/celes_parts/jdcalf.c +161 -0
  100. data/examples/celes_parts/num00a.c +121 -0
  101. data/examples/celes_parts/num00b.c +121 -0
  102. data/examples/celes_parts/num06a.c +125 -0
  103. data/examples/celes_parts/numat.c +109 -0
  104. data/examples/celes_parts/nut00a.c +2047 -0
  105. data/examples/celes_parts/nut00b.c +372 -0
  106. data/examples/celes_parts/nut06a.c +153 -0
  107. data/examples/celes_parts/nut80.c +325 -0
  108. data/examples/celes_parts/nutm80.c +117 -0
  109. data/examples/celes_parts/obl06.c +118 -0
  110. data/examples/celes_parts/obl80.c +118 -0
  111. data/examples/celes_parts/p06e.c +321 -0
  112. data/examples/celes_parts/p2pv.c +83 -0
  113. data/examples/celes_parts/p2s.c +91 -0
  114. data/examples/celes_parts/pap.c +139 -0
  115. data/examples/celes_parts/pas.c +96 -0
  116. data/examples/celes_parts/pb06.c +144 -0
  117. data/examples/celes_parts/pdp.c +84 -0
  118. data/examples/celes_parts/pfw06.c +165 -0
  119. data/examples/celes_parts/plan94.c +514 -0
  120. data/examples/celes_parts/pm.c +83 -0
  121. data/examples/celes_parts/pmat00.c +118 -0
  122. data/examples/celes_parts/pmat06.c +122 -0
  123. data/examples/celes_parts/pmat76.c +141 -0
  124. data/examples/celes_parts/pmp.c +85 -0
  125. data/examples/celes_parts/pn.c +109 -0
  126. data/examples/celes_parts/pn00.c +177 -0
  127. data/examples/celes_parts/pn00a.c +162 -0
  128. data/examples/celes_parts/pn00b.c +162 -0
  129. data/examples/celes_parts/pn06.c +187 -0
  130. data/examples/celes_parts/pn06a.c +152 -0
  131. data/examples/celes_parts/pnm00a.c +121 -0
  132. data/examples/celes_parts/pnm00b.c +121 -0
  133. data/examples/celes_parts/pnm06a.c +124 -0
  134. data/examples/celes_parts/pnm80.c +126 -0
  135. data/examples/celes_parts/pom00.c +115 -0
  136. data/examples/celes_parts/ppp.c +85 -0
  137. data/examples/celes_parts/ppsp.c +94 -0
  138. data/examples/celes_parts/pr00.c +142 -0
  139. data/examples/celes_parts/prec76.c +148 -0
  140. data/examples/celes_parts/pv2p.c +81 -0
  141. data/examples/celes_parts/pv2s.c +144 -0
  142. data/examples/celes_parts/pvdpv.c +102 -0
  143. data/examples/celes_parts/pvm.c +86 -0
  144. data/examples/celes_parts/pvmpv.c +87 -0
  145. data/examples/celes_parts/pvppv.c +87 -0
  146. data/examples/celes_parts/pvstar.c +207 -0
  147. data/examples/celes_parts/pvu.c +93 -0
  148. data/examples/celes_parts/pvup.c +88 -0
  149. data/examples/celes_parts/pvxpv.c +107 -0
  150. data/examples/celes_parts/pxp.c +94 -0
  151. data/examples/celes_parts/rm2v.c +111 -0
  152. data/examples/celes_parts/rv2m.c +118 -0
  153. data/examples/celes_parts/rx.c +110 -0
  154. data/examples/celes_parts/rxp.c +99 -0
  155. data/examples/celes_parts/rxpv.c +86 -0
  156. data/examples/celes_parts/rxr.c +99 -0
  157. data/examples/celes_parts/ry.c +110 -0
  158. data/examples/celes_parts/rz.c +110 -0
  159. data/examples/celes_parts/s00.c +371 -0
  160. data/examples/celes_parts/s00a.c +143 -0
  161. data/examples/celes_parts/s00b.c +143 -0
  162. data/examples/celes_parts/s06.c +368 -0
  163. data/examples/celes_parts/s06a.c +145 -0
  164. data/examples/celes_parts/s2c.c +85 -0
  165. data/examples/celes_parts/s2p.c +88 -0
  166. data/examples/celes_parts/s2pv.c +103 -0
  167. data/examples/celes_parts/s2xpv.c +87 -0
  168. data/examples/celes_parts/sepp.c +105 -0
  169. data/examples/celes_parts/seps.c +93 -0
  170. data/examples/celes_parts/sofa.h +379 -0
  171. data/examples/celes_parts/sofam.h +155 -0
  172. data/examples/celes_parts/sp00.c +118 -0
  173. data/examples/celes_parts/starpm.c +205 -0
  174. data/examples/celes_parts/starpv.c +264 -0
  175. data/examples/celes_parts/sxp.c +84 -0
  176. data/examples/celes_parts/sxpv.c +85 -0
  177. data/examples/celes_parts/taitt.c +110 -0
  178. data/examples/celes_parts/taiut1.c +112 -0
  179. data/examples/celes_parts/taiutc.c +182 -0
  180. data/examples/celes_parts/tcbtdb.c +132 -0
  181. data/examples/celes_parts/tcgtt.c +109 -0
  182. data/examples/celes_parts/tdbtcb.c +137 -0
  183. data/examples/celes_parts/tdbtt.c +122 -0
  184. data/examples/celes_parts/test_celes.rb +48 -0
  185. data/examples/celes_parts/tf2a.c +107 -0
  186. data/examples/celes_parts/tf2d.c +107 -0
  187. data/examples/celes_parts/tr.c +93 -0
  188. data/examples/celes_parts/trxp.c +93 -0
  189. data/examples/celes_parts/trxpv.c +93 -0
  190. data/examples/celes_parts/tttai.c +110 -0
  191. data/examples/celes_parts/tttcg.c +112 -0
  192. data/examples/celes_parts/tttdb.c +121 -0
  193. data/examples/celes_parts/ttut1.c +110 -0
  194. data/examples/celes_parts/ut1tai.c +111 -0
  195. data/examples/celes_parts/ut1tt.c +110 -0
  196. data/examples/celes_parts/ut1utc.c +193 -0
  197. data/examples/celes_parts/utctai.c +163 -0
  198. data/examples/celes_parts/utcut1.c +151 -0
  199. data/examples/celes_parts/xy06.c +2758 -0
  200. data/examples/celes_parts/xys00a.c +133 -0
  201. data/examples/celes_parts/xys00b.c +133 -0
  202. data/examples/celes_parts/xys06a.c +133 -0
  203. data/examples/celes_parts/zp.c +77 -0
  204. data/examples/celes_parts/zpv.c +79 -0
  205. data/examples/celes_parts/zr.c +83 -0
  206. data/examples/check_date_type.rb +2 -4
  207. data/examples/compare_geoc_long_ra.rb +19 -11
  208. data/examples/data_table_for_astro_dog.rb +40 -0
  209. data/examples/earth_rotation.rb +28 -3
  210. data/examples/eot.c +15 -0
  211. data/examples/eot.h +2 -0
  212. data/examples/eot_methods_list.rb +30 -3
  213. data/examples/eot_suntimes.rb +99 -95
  214. data/examples/extconf.rb +2 -0
  215. data/examples/{read_nutation_data.rb → gmst_gast_non_sofa.rb} +103 -98
  216. data/examples/nutation_table5_3a.yaml +1658 -1658
  217. data/examples/rbeot.c +24 -0
  218. data/examples/test_eot.rb +17 -0
  219. data/examples/test_poly_eval.rb +6 -17
  220. data/examples/time_scales.rb +4 -7
  221. data/examples/times_year.rb +50 -0
  222. data/examples/usage_example.rb +15 -5
  223. data/examples/use_angles.rb +151 -87
  224. data/lib/eot/angles.rb +130 -177
  225. data/lib/eot/constants.rb +41 -44
  226. data/lib/eot/displays.rb +40 -37
  227. data/lib/eot/geo_lat_lng_smt.rb +7 -6
  228. data/lib/eot/init.rb +62 -39
  229. data/lib/eot/nutation.rb +53 -45
  230. data/lib/eot/times.rb +32 -41
  231. data/lib/eot/utilities.rb +11 -90
  232. data/lib/eot/version.rb +3 -2
  233. data/rise_set_data.yml +1461 -0
  234. data/run_tests_eclipse.rb +1 -0
  235. data/tests/minitest/aliased_angles_spec.rb +119 -165
  236. data/tests/minitest/aliased_displays_spec.rb +41 -39
  237. data/tests/minitest/aliased_utilities_spec.rb +11 -22
  238. data/tests/minitest/angles_spec.rb +134 -181
  239. data/tests/minitest/constants_spec.rb +4 -10
  240. data/tests/minitest/delta_epsilon_spec.rb +13 -16
  241. data/tests/minitest/displays_spec.rb +39 -37
  242. data/tests/minitest/geo_spec.rb +15 -11
  243. data/tests/minitest/init_spec.rb +30 -16
  244. data/tests/minitest/nutation_spec.rb +19 -13
  245. data/tests/minitest/times_spec.rb +77 -75
  246. data/tests/minitest/utilities_spec.rb +10 -94
  247. data/wiki.md +7 -9
  248. metadata +218 -26
  249. data/examples/data_table.rb +0 -26
  250. data/lib/eot/nutation_table5_3a.yaml +0 -9532
  251. 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 minitest
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 'Eot_aliased_utilities defaults' do
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
- @ajd = 2456885.0
22
- Eot_aliased_utilities.ajd = @ajd
23
- Eot_aliased_utilities.ma_Sun()
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
- assert_equal 220.63461047326172, Eot_aliased_utilities.ma
29
- end
25
+ assert_equal 2456885.0, Eot_aliased_utilities.ajd
26
+ end
30
27
 
31
- it 'expected 0.0 returned by Eot_aliased_utilities.degrees_to_radians() ' do
32
- assert_equal 0.0, Eot_aliased_utilities.degrees_to_radians()
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 rspec
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
- # set ma attribute first as it gets tested anyway but a lot of methods
15
- # now rely on @ma so we don't have to keep calling it unless we change
16
- # @ajd attribute.
17
-
14
+ describe 'Tests ajd of 2456885.0' do
15
+
18
16
  before(:each) do
19
- @ajd = 2456885.0
20
- Eot_angles.ajd = @ajd
21
- Eot_angles.ma_Sun()
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
- assert_equal 220.63461047326172, Eot_angles.ma
27
- end
28
-
29
- it 'expected 279.2295199333757 returned by Eot_angles.al_Sun()? ' do
30
- assert_equal 279.2295199333757, Eot_angles.al_Sun()
31
- assert_equal 279.2295199333757, Eot_angles.al_Sun(nil)
32
- assert_equal 279.2295199333757, Eot_angles.al_Sun(0)
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.227333353065282 returned by Eot_angles.centre()? ' do
36
- assert_equal -1.227333353065282, Eot_angles.center()
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.16038975882741865 returned by Eot_angles.cosine_al_Sun()? ' do
42
- assert_equal 0.16038975882741865, Eot_angles.cosine_al_Sun()
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.16055519782509398 returned by Eot_angles.cosine_tl_Sun()? ' do
48
- assert_equal 0.16055519782509398, Eot_angles.cosine_tl_Sun()
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.9174932093012645 returned by Eot_angles.cosine_to_Earth()? ' do
54
- assert_equal 0.9174932093012645, Eot_angles.cosine_to_Earth()
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 -23.116504240687046 returned by Eot_angles.dec_Sun()? ' do
60
- assert_equal -23.116504240687046, Eot_angles.dec_Sun()
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.0015940313608572006 returned by Eot_angles.delta_epsilon()? ' do
66
- assert_equal -0.0015940313608572006, Eot_angles.delta_epsilon()
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 -0.8041525701173668 returned by Eot_angles.delta_oblique()? ' do
72
- assert_equal -0.8041525701173668, Eot_angles.delta_oblique()
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 1.2273333530652906 returned by Eot_angles.delta_orbit()? ' do
78
- assert_equal 1.2273333530652906, Eot_angles.delta_orbit()
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 -0.0038550497869660255 returned by Eot_angles.delta_psi()? ' do
84
- assert_equal -0.0038550497869660255, Eot_angles.delta_psi()
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.016708617 returned by Eot_angles.eccentricity_Earth()? ' do
90
- assert_equal 0.016708617, Eot_angles.eccentricity_Earth()
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 -0.0035369820010596148 returned by Eot_angles.eq_of_equinox()? ' do
96
- assert_equal -0.0035369820010596148, Eot_angles.eq_of_equinox()
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.120130505656931 returned by Eot_angles.eot()? ' do
102
- assert_equal -1.120130505656931, Eot_angles.eot()
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 280.4664567 returned by Eot_angles.gml_Sun()? ' do
106
- assert_equal 280.4664567, Eot_angles.gml_Sun()
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 90.9060538240478 returned by Eot_angles.ha_Sun()? ' do
112
- assert_equal 90.9060538240478, Eot_angles.ha_Sun()
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.63461047326172 returned by Eot_angles.ma_Sun()? ' do
118
- assert_equal 220.63461047326172, Eot_angles.ma_Sun()
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 280.460622404583 returned by Eot_angles.ml_Aries()? ' do
122
- assert_equal 280.460622404583, Eot_angles.ml_Aries()
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.439279444444445 returned by Eot_angles.mo_Earth()? ' do
128
- assert_equal 23.439279444444445, Eot_angles.mo_Earth()
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 125.04455501000001 returned by Eot_angles.omega()? ' do
134
- assert_equal 125.04455501000001, Eot_angles.omega()
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 280.0432759170521 returned by Eot_angles.ra_Sun()? ' do
140
- assert_equal 280.0432759170521, Eot_angles.ra_Sun()
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 -0.9870537600674456 returned by Eot_angles.sine_al_Sun()? ' do
146
- assert_equal -0.9870537600674456, Eot_angles.sine_al_Sun()
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 -0.9870268630849643 returned by Eot_angles.sine_tl_Sun()? ' do
152
- assert_equal -0.9870268630849643, Eot_angles.sine_tl_Sun()
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.40727712019643 returned by Eot_angles.ta_Sun()? ' do
158
- assert_equal 219.40727712019643, Eot_angles.ta_Sun()
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 280.45708542258194 returned by Eot_angles.tl_Aries()? ' do
164
- assert_equal 280.45708542258194, Eot_angles.tl_Aries()
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 279.2391233469347 returned by Eot_angles.tl_Sun()? ' do
170
- assert_equal 279.2391233469347, Eot_angles.tl_Sun()
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.43768541308359 returned by Eot_angles.to_Earth()? ' do
176
- assert_equal 23.43768541308359, Eot_angles.to_Earth()
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 ' Eot angles tjc array for jd 2455055.5 a non default value' do
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
- @ajd = 2455055.0
191
- Eot_angles.ajd = @ajd
192
- @dt = Eot_angles.ajd_to_datetime(@ajd)
193
- Eot_angles.date = @dt
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, returned by Eot_angles.' do
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", returned by Eot_angles.date.to_s' do
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.98609672514223, returned by Eot_angles.' do
207
- assert_equal 216.98609672514223, Eot_angles.ma
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.95453031575755 returned by Eot_angles.al_Sun(@ta)? ' do
211
- assert_equal 138.95453031575755, Eot_angles.al_Sun(@ta)
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.1326466587538162 returned by Eot_angles.centre(@ta)? ' do
215
- assert_equal -1.1326466587538162, Eot_angles.center(@ta)
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.7541886969973313 returned by Eot_angles.cosine_al_Sun(@ta)? ' do
219
- assert_equal -0.7541886969973313, Eot_angles.cosine_al_Sun(@ta)
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.7542060769934986 returned by Eot_angles.cosine_tl_Sun(@ta)? ' do
223
- assert_equal -0.7542060769934986, Eot_angles.cosine_tl_Sun(@ta)
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.9174818406562965 returned by Eot_angles.cosine_to_Earth(@ta)? ' do
227
- assert_equal 0.9174818406562965, Eot_angles.cosine_to_Earth(@ta)
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 15.141502782959178 returned by Eot_angles.dec_Sun(@ta)? ' do
231
- assert_equal 15.141502782959178, Eot_angles.dec_Sun(@ta)
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.001293821738156411 returned by Eot_angles.delta_epsilon(@ta)? ' do
235
- assert_equal 0.001293821738156411, Eot_angles.delta_epsilon(@ta).round(18)
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.42490431188628 returned by Eot_angles.delta_oblique(@ta)? ' do
239
- assert_equal -2.42490431188628, Eot_angles.delta_oblique(@ta)
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.1326466587538278 returned by Eot_angles.delta_orbit(@ta)? ' do
243
- assert_equal 1.1326466587538278, Eot_angles.delta_orbit(@ta)
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.0043768851558214535 returned by Eot_angles.delta_psi(@ta)? ' do
247
- assert_equal 0.0043768851558214535, Eot_angles.delta_psi(@ta)
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 0.016704576164208475 returned by Eot_angles.eccentricity_Earth(@ta)? ' do
251
- assert_equal 0.016704576164208475, Eot_angles.eccentricity_Earth(@ta)
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.004015712649104288 returned by Eot_angles.eq_of_equinox(@ta)? ' do
255
- assert_equal 0.004015712649104288, Eot_angles.eq_of_equinox(@ta)
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.2922576531324523 returned by Eot_angles.eot()? ' do
259
- assert_equal -1.2922576531324523, Eot_angles.eot()
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 returned by Eot_angles.gml_Sun(@ta)? ' do
263
- assert_equal 140.08869346549056, Eot_angles.gml_Sun(@ta)
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 90.86327177163999 returned by Eot_angles.ha_Sun(@ta)? ' do
267
- assert_equal 90.86327177163999, Eot_angles.ha_Sun(@ta)
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.98609672514223 returned by Eot_angles.ma_Sun()? ' do
271
- assert_equal 216.98609672514223, Eot_angles.ma_Sun()
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.08287431273857 returned by Eot_angles.ml_Aries(@ta)? ' do
275
- assert_equal 140.08287431273857, Eot_angles.ml_Aries(@ta)
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 returned by Eot_angles.mo_Earth(@ta)? ' do
279
- assert_equal 23.43802918164109, Eot_angles.mo_Earth(@ta)
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.82314052284639 returned by Eot_angles.omega(@ta)? ' do
283
- assert_equal -60.82314052284639, Eot_angles.omega(@ta)
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.38095111862302 returned by Eot_angles.ra_Sun(@ta)? ' do
287
- assert_equal 141.38095111862302, Eot_angles.ra_Sun(@ta)
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.6566577566141039 returned by Eot_angles.sine_al_Sun(@ta)? ' do
291
- assert_equal 0.6566577566141039, Eot_angles.sine_al_Sun(@ta)
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.6566377946981706 returned by Eot_angles.sine_tl_Sun(@ta)? ' do
295
- assert_equal 0.6566377946981706, Eot_angles.sine_tl_Sun(@ta)
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.8534500663884 returned by Eot_angles.ta_Sun(@ta)? ' do
299
- assert_equal 215.8534500663884, Eot_angles.ta_Sun(@ta)
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.08689002538767 returned by Eot_angles.tl_Aries(@ta)? ' do
303
- assert_equal 140.08689002538767, Eot_angles.tl_Aries(@ta)
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.95604680673674 returned by Eot_angles.tl_Sun(@ta)? ' do
307
- assert_equal 138.95604680673674, Eot_angles.tl_Sun(@ta)
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.439323003379247 returned by Eot_angles.to_Earth(@ta)? ' do
311
- assert_equal 23.439323003379247, Eot_angles.to_Earth(@ta)
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