equationoftime 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.autotest +39 -0
- data/.gemtest +0 -0
- data/.minitest.rb +2 -0
- data/.ruby-version +1 -0
- data/.settings/org.eclipse.ltk.core.refactoring.prefs +2 -0
- data/CHANGELOG.rdoc +6 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +44 -3
- data/Guardfile +29 -0
- data/{LICENSE.md → LICENSE.rdoc} +0 -0
- data/Manifest.txt +82 -0
- data/README.rdoc +66 -0
- data/Rakefile +60 -45
- data/equationoftime.gemspec +17 -9
- data/examples/Equation_of_Time.jpg +0 -0
- data/examples/analemma_data_generator.rb +58 -0
- data/examples/check_date_type.rb +60 -0
- data/examples/compare_geoc_long_ra.rb +44 -0
- data/examples/data_table_for_astro_dog.rb +45 -0
- data/examples/earth_rotation.rb +42 -0
- data/examples/eot_methods_list.rb +48 -0
- data/examples/eot_plot.r +57 -0
- data/examples/eot_suntimes.rb +149 -0
- data/examples/equation_of_time.py +186 -0
- data/examples/figure_1.jpg +0 -0
- data/examples/file_converter.rb +31 -0
- data/examples/from_readme.rb +14 -0
- data/examples/from_wiki.rb +46 -0
- data/examples/geo_locator.rb +16 -0
- data/examples/getjd.rb +45 -0
- data/examples/gmst_gast_non_sofa.rb +406 -0
- data/examples/input_suntimes.rb +24 -0
- data/examples/julian_day_formula.rb +29 -0
- data/examples/julian_day_formula.txt +12 -0
- data/examples/my_time_conversion.rb +21 -0
- data/examples/nutation_series.txt +678 -0
- data/examples/nutation_table5_3a.txt +682 -0
- data/examples/ptime.rb +162 -0
- data/examples/suntimes.rb +30 -0
- data/examples/suntimes_test.rb +50 -0
- data/examples/t_sofa.rb +8228 -0
- data/examples/test_celes.rb +51 -0
- data/examples/test_ceot.rb +55 -0
- data/examples/test_poly_eval.rb +32 -0
- data/examples/time_scales.rb +29 -0
- data/examples/times_year.rb +53 -0
- data/examples/usage_example.rb +26 -0
- data/examples/use_angles.rb +222 -0
- data/ext/{ceot/eot.c → eot/ceot.c} +1 -1
- data/ext/{ceot/eot.h → eot/ceot.h} +0 -0
- data/ext/{ceot/ceot.c → eot/eot.c} +2 -2
- data/ext/{ceot → eot}/extconf.rb +1 -1
- data/lib/eot.rb +2 -1
- data/lib/eot/angles.rb +28 -28
- data/lib/eot/constants.rb +2 -0
- data/lib/eot/displays.rb +17 -17
- data/lib/eot/eot.so +0 -0
- data/lib/eot/geo_lat_lng_smt.rb +44 -31
- data/lib/eot/init.rb +20 -19
- data/lib/eot/nutation.rb +1 -1
- data/lib/eot/times.rb +22 -22
- data/lib/eot/utilities.rb +5 -5
- data/lib/eot/version.rb +2 -6
- data/test/aliased_angles_spec.rb +239 -0
- data/test/aliased_displays_spec.rb +105 -0
- data/test/aliased_utilities_spec.rb +36 -0
- data/test/angles_spec.rb +264 -0
- data/test/constants_spec.rb +20 -0
- data/test/displays_spec.rb +110 -0
- data/test/geo_spec.rb +38 -0
- data/test/init_spec.rb +44 -0
- data/test/nutation_spec.rb +37 -0
- data/test/spec_config.rb +8 -0
- data/test/times_spec.rb +133 -0
- data/test/utilities_spec.rb +35 -0
- metadata +109 -115
- data/.gitignore +0 -24
- data/.rvmrc +0 -1
- data/README.md +0 -83
- data/README2.txt +0 -70
- data/wiki.md +0 -43
- data/wiki2.md +0 -4
data/lib/eot/init.rb
CHANGED
@@ -8,11 +8,11 @@ require_relative 'times'
|
|
8
8
|
class Eot
|
9
9
|
|
10
10
|
|
11
|
-
# From init.rb
|
11
|
+
# From init.rb:
|
12
12
|
# address used for GeoLatLng.addr
|
13
13
|
attr_accessor :addr
|
14
14
|
|
15
|
-
# From init.rb
|
15
|
+
# From init.rb:
|
16
16
|
# Astronomical Julian Day Number is an instance of DateTime class.
|
17
17
|
# When new Equation of Time class is initialized
|
18
18
|
# @ajd = DateTime.now.to_time.utc.to_datetime.jd.to_f
|
@@ -29,53 +29,53 @@ class Eot
|
|
29
29
|
@ma = Celes.falp03(@ta)
|
30
30
|
end
|
31
31
|
|
32
|
-
# From init.rb
|
32
|
+
# From init.rb:
|
33
33
|
# Nutation Data is an instance of Array class.
|
34
34
|
# @data = nutation_table5_3a.yaml
|
35
35
|
# YAML File loaded when new Eot class is initialized.
|
36
36
|
#attr_reader :data
|
37
37
|
|
38
|
-
# From init.rb
|
38
|
+
# From init.rb:
|
39
39
|
# @date is an instance of DateTime class.
|
40
40
|
# When new Eot class is initialized @date = ajd_to_datetime(@ajd)
|
41
41
|
attr_accessor :date
|
42
42
|
|
43
|
-
# From init.rb
|
43
|
+
# From init.rb:
|
44
44
|
# Julian Day Number is an instance of DateTime class.
|
45
45
|
# When new Eot class is initialized @jd = @ajd
|
46
46
|
attr_accessor :jd
|
47
47
|
|
48
|
-
# From init.rb
|
48
|
+
# From init.rb:
|
49
49
|
# Latitude input is an instance of Float class.
|
50
50
|
# When new Eot class is initialized @latitude = 0.0
|
51
51
|
# May use GeoLatLng class to set it also but please comment that out
|
52
52
|
# if no internet connection is present via proxies or firewalls :D
|
53
53
|
attr_accessor :latitude
|
54
54
|
|
55
|
-
# From init.rb
|
55
|
+
# From init.rb:
|
56
56
|
# Longitude input is an instance of Float class.
|
57
57
|
# When new Eot class is initialized @longitude = 0.0
|
58
58
|
# May use GeoLatLng class to set it also but please comment that out
|
59
59
|
# if no internet connection is present via proxies or firewalls :D
|
60
60
|
attr_accessor :longitude
|
61
61
|
|
62
|
-
# From init.rb
|
62
|
+
# From init.rb:
|
63
63
|
# Mean Anomaly gets called a lot so class attribute saves it.
|
64
64
|
# @ma = Celes.falp03(@ta)
|
65
65
|
attr_accessor :ma
|
66
66
|
|
67
67
|
|
68
|
-
# From init.rb
|
68
|
+
# From init.rb:
|
69
69
|
# JCT gets called a lot so class attribute it.
|
70
70
|
# Setting @ajd will set this and @ma
|
71
71
|
# @ta = (( @ajd - DJ00 ) / DJC).to_f
|
72
72
|
attr_accessor :ta
|
73
73
|
|
74
|
-
# From init.rb
|
74
|
+
# From init.rb:
|
75
75
|
# Initialize to set attributes
|
76
76
|
# You may use GeoLatLng to set up @latitude and @longitude but you need to have
|
77
77
|
# internet so if not please comment it out for now.
|
78
|
-
def initialize(
|
78
|
+
def initialize()
|
79
79
|
|
80
80
|
# file_path = File.expand_path( File.dirname( __FILE__ ) + "/nutation_table5_3a.yaml" )
|
81
81
|
# @data = YAML::load( File.open( file_path, 'r'), :safe => true ).freeze
|
@@ -88,11 +88,11 @@ class Eot
|
|
88
88
|
@ma = Celes.falp03(@ta)
|
89
89
|
|
90
90
|
# comment out below if you do not have internet connection
|
91
|
-
geo = GeoLatLng.new()
|
92
|
-
@addr = geo.addr
|
91
|
+
geo = GeoLatLng.new()
|
93
92
|
geo.get_coordinates_from_address
|
94
|
-
@
|
95
|
-
@
|
93
|
+
@addr = geo.addr
|
94
|
+
@latitude = geo.lat
|
95
|
+
@longitude = geo.lng
|
96
96
|
end
|
97
97
|
|
98
98
|
end
|
@@ -106,7 +106,7 @@ if __FILE__ == $PROGRAM_NAME
|
|
106
106
|
require 'eot'
|
107
107
|
eot = Eot.new
|
108
108
|
|
109
|
-
p eot.ajd
|
109
|
+
# p eot.ajd
|
110
110
|
p eot.date
|
111
111
|
p eot.jd
|
112
112
|
|
@@ -116,8 +116,9 @@ if __FILE__ == $PROGRAM_NAME
|
|
116
116
|
p eot.latitude
|
117
117
|
p eot.longitude
|
118
118
|
|
119
|
-
spec = File.expand_path('../../../tests/minitest', __FILE__)
|
120
|
-
$LOAD_PATH.unshift(spec) unless $LOAD_PATH.include?(spec)
|
121
|
-
require 'init_spec'
|
119
|
+
#~ spec = File.expand_path('../../../tests/minitest', __FILE__)
|
120
|
+
#~ $LOAD_PATH.unshift(spec) unless $LOAD_PATH.include?(spec)
|
121
|
+
#~ require 'init_spec'
|
122
|
+
system 'rake test'
|
122
123
|
|
123
124
|
end
|
data/lib/eot/nutation.rb
CHANGED
data/lib/eot/times.rb
CHANGED
@@ -2,35 +2,35 @@
|
|
2
2
|
|
3
3
|
class Eot
|
4
4
|
|
5
|
-
# From times.rb
|
5
|
+
# From times.rb:
|
6
6
|
# Pass in an AJD number
|
7
7
|
# Returns a DateTime object
|
8
8
|
def ajd_to_datetime(ajd)
|
9
9
|
DateTime.jd(ajd + 0.5)
|
10
10
|
end
|
11
11
|
|
12
|
-
# From times.rb
|
12
|
+
# From times.rb:
|
13
13
|
# Uses @ajd attribute
|
14
14
|
# Returns EOT as an AJD Julian number
|
15
15
|
def eot_jd
|
16
16
|
time_eot() / DAY_MINUTES
|
17
17
|
end
|
18
18
|
|
19
|
-
# From times.rb
|
19
|
+
# From times.rb:
|
20
20
|
# Uses @ajd and @longitude attributes
|
21
21
|
# Returns DateTime object of local noon or solar transit
|
22
22
|
def local_noon_dt()
|
23
23
|
ajd_to_datetime(@ajd - @longitude / 360.0 - eot_jd())
|
24
24
|
end
|
25
25
|
|
26
|
-
# From times.rb
|
26
|
+
# From times.rb:
|
27
27
|
# Uses @ajd and @longitude attributes
|
28
28
|
# Returns DateTime object of local mean noon or solar transit
|
29
29
|
def mean_local_noon_dt()
|
30
30
|
ajd_to_datetime(@ajd - @longitude / 360.0)
|
31
31
|
end
|
32
32
|
|
33
|
-
# From times.rb
|
33
|
+
# From times.rb:
|
34
34
|
# sets @ajd to DateTime.now
|
35
35
|
# Returns EOT (equation of time) now in decimal minutes form
|
36
36
|
def now()
|
@@ -39,56 +39,56 @@ class Eot
|
|
39
39
|
time_eot()
|
40
40
|
end
|
41
41
|
|
42
|
-
# From times.rb
|
42
|
+
# From times.rb:
|
43
43
|
# Uses @ajd attribute
|
44
44
|
# Returns a DateTime object of local sunrise
|
45
45
|
def sunrise_dt()
|
46
46
|
ajd_to_datetime(sunrise_jd())
|
47
47
|
end
|
48
48
|
|
49
|
-
# From times.rb
|
49
|
+
# From times.rb:
|
50
50
|
# Uses @ajd attribute
|
51
51
|
# Returns Sunrise as a Julian Day Number
|
52
52
|
def sunrise_jd()
|
53
53
|
local_noon_dt().ajd - ha_Sun() * R2D / 360.0
|
54
54
|
end
|
55
55
|
|
56
|
-
# From times.rb
|
56
|
+
# From times.rb:
|
57
57
|
# Uses @ajd attribute
|
58
58
|
# Returns a DateTime object of local sunset
|
59
59
|
def sunset_dt()
|
60
60
|
ajd_to_datetime(sunset_jd())
|
61
61
|
end
|
62
62
|
|
63
|
-
# From times.rb
|
63
|
+
# From times.rb:
|
64
64
|
# Uses @ajd attribute
|
65
65
|
# Returns Sunset as a Julian Day Number
|
66
66
|
def sunset_jd()
|
67
67
|
local_noon_dt().ajd + ha_Sun() * R2D / 360.0
|
68
68
|
end
|
69
69
|
|
70
|
-
# From times.rb
|
70
|
+
# From times.rb:
|
71
71
|
# Uses @ajd attribute
|
72
72
|
# Returns Oblique component of EOT in decimal minutes time
|
73
73
|
def time_delta_oblique()
|
74
74
|
(tl_Sun() - ra_Sun()) * R2D * SM
|
75
75
|
end
|
76
76
|
|
77
|
-
# From times.rb
|
77
|
+
# From times.rb:
|
78
78
|
# Uses @ajd attribute
|
79
79
|
# Returns Orbit component of EOT in decimal minutes time
|
80
80
|
def time_delta_orbit()
|
81
81
|
(@ma - ta_Sun()) * R2D * SM
|
82
82
|
end
|
83
83
|
|
84
|
-
# From times.rb
|
84
|
+
# From times.rb:
|
85
85
|
# Uses @ajd attribute
|
86
86
|
# Returns EOT as a float for decimal minutes time
|
87
87
|
def time_eot()
|
88
88
|
eot() * R2D * SM
|
89
89
|
end
|
90
90
|
|
91
|
-
# From times.rb
|
91
|
+
# From times.rb:
|
92
92
|
# All calculations with ( ta ) were based on this.
|
93
93
|
# Julian Century Time is a fractional century
|
94
94
|
# Julian Day Number DJ00 is subtracted from the JDN or AJDN and then divided
|
@@ -96,15 +96,15 @@ class Eot
|
|
96
96
|
# Deprecated
|
97
97
|
def time_julian_century()
|
98
98
|
t1 = ( @ajd - DJ00 ) / DJC
|
99
|
-
t2 = t1 * t1
|
100
|
-
t3 = t1 * t2
|
101
|
-
t4 = t2 * t2
|
102
|
-
t5 = t2 * t3
|
103
|
-
t6 = t3 * t3
|
104
|
-
t7 = t3 * t4
|
105
|
-
t8 = t4 * t4
|
106
|
-
t9 = t4 * t5
|
107
|
-
t10 = t5 * t5
|
99
|
+
# t2 = t1 * t1
|
100
|
+
# t3 = t1 * t2
|
101
|
+
# t4 = t2 * t2
|
102
|
+
# t5 = t2 * t3
|
103
|
+
# t6 = t3 * t3
|
104
|
+
# t7 = t3 * t4
|
105
|
+
# t8 = t4 * t4
|
106
|
+
# t9 = t4 * t5
|
107
|
+
# t10 = t5 * t5
|
108
108
|
# @ta = [ t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 ]
|
109
109
|
@ta = t1
|
110
110
|
end
|
data/lib/eot/utilities.rb
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
# utilities.rb
|
2
2
|
|
3
3
|
class Eot
|
4
|
-
# From utilities.rb
|
4
|
+
# From utilities.rb:
|
5
5
|
# A check for default J2000
|
6
6
|
# sets default when arg is nil
|
7
7
|
def check_jd_nil( jd = DJ00 )
|
8
8
|
jd.nil? ? jd = DJ00 : jd
|
9
9
|
end
|
10
10
|
|
11
|
-
# From utilities.rb
|
11
|
+
# From utilities.rb:
|
12
12
|
# A check for default J2000
|
13
13
|
# sets default when arg is zero
|
14
14
|
def check_jd_zero( jd = DJ00 )
|
15
15
|
jd == 0 ? jd = DJ00 : jd = check_jd_nil( jd )
|
16
16
|
end
|
17
17
|
|
18
|
-
# From utilities.rb
|
18
|
+
# From utilities.rb:
|
19
19
|
# A check for default DT2000
|
20
20
|
# sets default when arg is nil
|
21
21
|
def check_t_nil( dt = DT2000 )
|
22
22
|
dt.nil? ? dt = DT2000 : dt
|
23
23
|
end
|
24
24
|
|
25
|
-
# From utilities.rb
|
25
|
+
# From utilities.rb:
|
26
26
|
# A check for default DT2000
|
27
27
|
# sets default when arg is zero
|
28
28
|
def check_t_zero( dt = DT2000 )
|
29
29
|
dt == 0 ? dt = DT2000 : dt = check_t_nil( dt )
|
30
30
|
end
|
31
31
|
|
32
|
-
# From utilities.rb
|
32
|
+
# From utilities.rb:
|
33
33
|
# Keeps large angles in range of 360.0
|
34
34
|
# aliased by truncate
|
35
35
|
def mod_360( x = 0.0 )
|
data/lib/eot/version.rb
CHANGED
@@ -0,0 +1,239 @@
|
|
1
|
+
# aliased_angles_spec.rb
|
2
|
+
#
|
3
|
+
|
4
|
+
require_relative 'spec_config'
|
5
|
+
|
6
|
+
lib = File.expand_path('../../../lib', __FILE__)
|
7
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
8
|
+
require 'eot'
|
9
|
+
|
10
|
+
Eot_aliased_angles = Eot.new()
|
11
|
+
|
12
|
+
describe 'tests ajd of 2456885.0' do
|
13
|
+
|
14
|
+
before(:each) do
|
15
|
+
Eot_aliased_angles.ajd = 2456885.0
|
16
|
+
ajd = Eot_aliased_angles.ajd
|
17
|
+
# somtimes need date to check values somewhere else
|
18
|
+
Eot_aliased_angles.date = Eot_aliased_angles.ajd_to_datetime(ajd)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'expected 2456885.0 for Eot_aliased_angles.ajd'do
|
22
|
+
assert_equal( 2456885.0, Eot_aliased_angles.ajd )
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'expected "2014-08-15T12:00:00+00:00" for Eot_aliased_angles.date'.to_s do
|
26
|
+
assert_equal( "2014-08-15T12:00:00+00:00", Eot_aliased_angles.date.to_s )
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'expected 3.8508003966038915 for Eot_aliased_angles.ma'do
|
30
|
+
assert_equal( 3.8508003966038915, Eot_aliased_angles.ma )
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'expected 2.4887103398436143 returned by Eot_aliased_angles.apparent_longitude()? ' do
|
34
|
+
assert_equal( 2.4887103398436143, Eot_aliased_angles.apparent_longitude() )
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'expected -0.7943361570447028 returned by Eot_aliased_angles.cosine_apparent_longitude()? ' do
|
38
|
+
assert_equal( -0.7943361570447028, Eot_aliased_angles.cosine_apparent_longitude() )
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'expected -0.7943772759574919 returned by Eot_aliased_angles.cosine_true_longitude()? ' do
|
42
|
+
assert_equal( -0.7943772759574919, Eot_aliased_angles.cosine_true_longitude() )
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'expected 0.9175115346811911 returned by Eot_aliased_angles.cosine_true_obliquity()? ' do
|
46
|
+
assert_equal( 0.9175115346811911, Eot_aliased_angles.cosine_true_obliquity() )
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'expected 0.24401410218543554 returned by Eot_aliased_angles.declination()? ' do
|
50
|
+
assert_equal( 0.24401410218543554, Eot_aliased_angles.declination() )
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'expected -0.04103082558803539 returned by Eot_aliased_angles.delta_t_ecliptic()? ' do
|
54
|
+
assert_equal( -0.04103082558803539, Eot_aliased_angles.delta_t_ecliptic() )
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'expected 0.021413249720702243 returned by Eot_aliased_angles.delta_t_elliptic()? ' do
|
58
|
+
assert_equal( 0.021413249720702243, Eot_aliased_angles.delta_t_elliptic() )
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'expected 0.016702468499021204 returned by Eot_aliased_angles.eccentricity_earth_orbit()? ' do
|
62
|
+
assert_equal( 0.016702468499021204, Eot_aliased_angles.eccentricity_earth_orbit() )
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'expected -0.021413249720702462 returned by Eot_aliased_angles.equation_of_center()? ' do
|
66
|
+
assert_equal( -0.021413249720702462, Eot_aliased_angles.equation_of_center() )
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'expected 2.5101912804141424 returned by Eot_aliased_angles.geometric_mean_longitude()? ' do
|
70
|
+
assert_equal( 2.5101912804141424, Eot_aliased_angles.geometric_mean_longitude() )
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'expected 1.9143229567859146 returned by Eot_aliased_angles.horizon_angle()? ' do
|
74
|
+
assert_equal( 1.9143229567859146, Eot_aliased_angles.horizon_angle() )
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'expected 3.8508003966038915 returned by Eot_aliased_angles.mean_anomaly()? ' do
|
78
|
+
assert_equal( 3.8508003966038915, Eot_aliased_angles.mean_anomaly() )
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'expected 2.510089864980358 returned by Eot_aliased_angles.mean_longitude_aries()? ' do
|
82
|
+
assert_equal( 2.510089864980358, Eot_aliased_angles.mean_longitude_aries() )
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'expected 0.40905940254265843 returned by Eot_aliased_angles.mean_obliquity()? ' do
|
86
|
+
assert_equal( 0.40905940254265843, Eot_aliased_angles.mean_obliquity() )
|
87
|
+
end
|
88
|
+
|
89
|
+
it 'expected 0.40905940254265843 returned by Eot_aliased_angles.mean_obliquity_of_ecliptic()? ' do
|
90
|
+
assert_equal( 0.40905940254265843, Eot_aliased_angles.mean_obliquity_of_ecliptic() )
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'expected 0.40901870461547685 returned by Eot_aliased_angles.obliquity_correction()? ' do
|
94
|
+
assert_equal( 0.40901870461547685, Eot_aliased_angles.obliquity_correction() )
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'expected 2.5297411654316497 returned by Eot_aliased_angles.right_ascension()? ' do
|
98
|
+
assert_equal( 2.5297411654316497, Eot_aliased_angles.right_ascension() )
|
99
|
+
end
|
100
|
+
|
101
|
+
it 'expected 0.6074784519729512 returned by Eot_aliased_angles.sine_apparent_longitude()? ' do
|
102
|
+
assert_equal( 0.6074784519729512, Eot_aliased_angles.sine_apparent_longitude() )
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'expected 0.6074246812917259 returned by Eot_aliased_angles.sine_true_longitude()? ' do
|
106
|
+
assert_equal( 0.6074246812917259, Eot_aliased_angles.sine_true_longitude() )
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'expected 3.8293871468831893 returned by Eot_aliased_angles.true_anomaly()? ' do
|
110
|
+
assert_equal( 3.8293871468831893, Eot_aliased_angles.true_anomaly() )
|
111
|
+
end
|
112
|
+
|
113
|
+
it 'expected 2.48877803069344 returned by Eot_aliased_angles.true_longitude()? ' do
|
114
|
+
assert_equal( 2.48877803069344, Eot_aliased_angles.true_longitude() )
|
115
|
+
end
|
116
|
+
|
117
|
+
it 'expected 2.5101242776531474 returned by Eot_aliased_angles.true_longitude_aries()? ' do
|
118
|
+
assert_equal( 2.5101242776531474, Eot_aliased_angles.true_longitude_aries() )
|
119
|
+
end
|
120
|
+
|
121
|
+
it 'expected 0.40901870461547685 returned by Eot_aliased_angles.true_obliquity()? ' do
|
122
|
+
assert_equal( 0.40901870461547685, Eot_aliased_angles.true_obliquity() )
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
describe 'tests ajd of 2455055.5' do
|
127
|
+
|
128
|
+
before(:each) do
|
129
|
+
Eot_aliased_angles.ajd = 2455055.0
|
130
|
+
ajd = Eot_aliased_angles.ajd
|
131
|
+
# check date for this ajd when needed.
|
132
|
+
Eot_aliased_angles.date = Eot_aliased_angles.ajd_to_datetime(ajd)
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'expected 455055.0, returned by Eot_aliased_angles.' do
|
136
|
+
assert_equal( 2455055.0, Eot_aliased_angles.ajd )
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'expected "2009-08-11T12:00:00+00:00", returned by Eot_aliased_angles.date.to_s' do
|
140
|
+
assert_equal( "2009-08-11T12:00:00+00:00", Eot_aliased_angles.date.to_s )
|
141
|
+
end
|
142
|
+
|
143
|
+
it 'expected 3.7871218188949207, returned by Eot_aliased_angles.ma' do
|
144
|
+
assert_equal( 3.7871218188949207, Eot_aliased_angles.ma )
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'expected 3.7871218188949207 Eot_aliased_angles.ma returned by Eot_angles.mean_anomaly()' do
|
148
|
+
assert_equal( 3.7871218188949207, Eot_aliased_angles.mean_anomaly() )
|
149
|
+
end
|
150
|
+
|
151
|
+
it 'expected 2.4252140645725033 returned by Eot_aliased_angles.apparent_longitude()? ' do
|
152
|
+
assert_equal( 2.4252140645725033, Eot_aliased_angles.apparent_longitude() )
|
153
|
+
end
|
154
|
+
|
155
|
+
it 'expected -0.7541886969975007 returned by Eot_aliased_angles.cosine_apparent_longitude()? ' do
|
156
|
+
assert_equal( -0.7541886969975007, Eot_aliased_angles.cosine_apparent_longitude() )
|
157
|
+
end
|
158
|
+
|
159
|
+
it 'expected -0.7542060769936684 returned by Eot_aliased_angles.cosine_true_longitude()? ' do
|
160
|
+
assert_equal( -0.7542060769936684, Eot_aliased_angles.cosine_true_longitude() )
|
161
|
+
end
|
162
|
+
|
163
|
+
it 'expected 0.9174818088112336 returned by Eot_aliased_angles.cosine_true_obliquity()? ' do
|
164
|
+
assert_equal( 0.9174818088112336, Eot_aliased_angles.cosine_true_obliquity() )
|
165
|
+
end
|
166
|
+
|
167
|
+
it 'expected 0.26426912722944046 returned by Eot_aliased_angles.declination()? ' do
|
168
|
+
assert_equal( 0.26426912722944046, Eot_aliased_angles.declination() )
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'expected -0.04234904897476355 returned by Eot_aliased_angles.delta_t_ecliptic()? ' do
|
172
|
+
assert_equal( -0.04234904897476355, Eot_aliased_angles.delta_t_ecliptic() )
|
173
|
+
end
|
174
|
+
|
175
|
+
it 'expected 0.019768413456709766 returned by Eot_aliased_angles.delta_t_elliptic()? ' do
|
176
|
+
assert_equal( 0.019768413456709766, Eot_aliased_angles.delta_t_elliptic() )
|
177
|
+
end
|
178
|
+
|
179
|
+
it 'expected 0.016704576164208475 returned by Eot_aliased_angles.eccentricity_earth_orbit()? ' do
|
180
|
+
assert_equal( 0.016704576164208475, Eot_aliased_angles.eccentricity_earth_orbit() )
|
181
|
+
end
|
182
|
+
|
183
|
+
it 'expected -0.019768413456709915 returned by Eot_aliased_angles.equation_of_center()? ' do
|
184
|
+
assert_equal( -0.019768413456709915, Eot_aliased_angles.equation_of_center() )
|
185
|
+
end
|
186
|
+
|
187
|
+
it 'expected 2.445008945789877 returned by Eot_aliased_angles.geometric_mean_longitude()? ' do
|
188
|
+
assert_equal( 2.445008945789877, Eot_aliased_angles.geometric_mean_longitude() )
|
189
|
+
end
|
190
|
+
|
191
|
+
it 'expected 1.9434600427973594 returned by Eot_aliased_angles.horizon_angle()? ' do
|
192
|
+
assert_equal( 1.9434600427973594, Eot_aliased_angles.horizon_angle() )
|
193
|
+
end
|
194
|
+
|
195
|
+
it 'expected 3.7871218188949207 returned by Eot_aliased_angles.mean_anomaly()? ' do
|
196
|
+
assert_equal( 3.7871218188949207, Eot_aliased_angles.mean_anomaly() )
|
197
|
+
end
|
198
|
+
|
199
|
+
it 'expected 2.444907382260759 returned by Eot_aliased_angles.mean_longitude_aries()? ' do
|
200
|
+
assert_equal( 2.444907382260759, Eot_aliased_angles.mean_longitude_aries() )
|
201
|
+
end
|
202
|
+
|
203
|
+
it 'expected 0.4090707793981491 returned by Eot_aliased_angles.mean_obliquity()? ' do
|
204
|
+
assert_equal( 0.4090707793981491, Eot_aliased_angles.mean_obliquity() )
|
205
|
+
end
|
206
|
+
|
207
|
+
it 'expected 0.4090934409048494 returned by Eot_aliased_angles.obliquity_correction()? ' do
|
208
|
+
assert_equal( 0.4090934409048494, Eot_aliased_angles.obliquity_correction() )
|
209
|
+
end
|
210
|
+
|
211
|
+
it 'expected 2.467563113547267 returned by Eot_aliased_angles.right_ascension()? ' do
|
212
|
+
assert_equal( 2.467563113547267, Eot_aliased_angles.right_ascension() )
|
213
|
+
end
|
214
|
+
|
215
|
+
it 'expected 0.6566577566139093 returned by Eot_aliased_angles.sine_apparent_longitude()? ' do
|
216
|
+
assert_equal( 0.6566577566139093, Eot_aliased_angles.sine_apparent_longitude() )
|
217
|
+
end
|
218
|
+
|
219
|
+
it 'expected 0.6566377946979757 returned by Eot_aliased_angles.sine_true_longitude()? ' do
|
220
|
+
assert_equal( 0.6566377946979757, Eot_aliased_angles.sine_true_longitude() )
|
221
|
+
end
|
222
|
+
|
223
|
+
it 'expected 3.767353405438211 returned by Eot_aliased_angles.true_anomaly()? ' do
|
224
|
+
assert_equal( 3.767353405438211, Eot_aliased_angles.true_anomaly() )
|
225
|
+
end
|
226
|
+
|
227
|
+
it 'expected 2.4252405323331674 returned by Eot_aliased_angles.true_longitude()? ' do
|
228
|
+
assert_equal( 2.4252405323331674, Eot_aliased_angles.true_longitude() )
|
229
|
+
end
|
230
|
+
|
231
|
+
it 'expected 2.4449774607872907 returned by Eot_aliased_angles.true_longitude_aries()? ' do
|
232
|
+
assert_equal( 2.4449774607872907, Eot_aliased_angles.true_longitude_aries() )
|
233
|
+
end
|
234
|
+
|
235
|
+
it 'expected 0.4090934409048494 returned by Eot_aliased_angles.true_obliquity()? ' do
|
236
|
+
assert_equal( 0.4090934409048494, Eot_aliased_angles.true_obliquity() )
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|