equationoftime 4.1.7 → 4.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTNjYzYxZjhhMzRmNzQwYmU1MTFiNWQ1MTBiM2ZkYWQ0YTQ4M2QzOQ==
4
+ YzU2M2VkNzlhNzc3NGE0NDRmZjNkMWVhYzhlODBlYTc2OWRhYTliYg==
5
5
  data.tar.gz: !binary |-
6
- ZGE4MmE5ZDQwMTVjZTM5NDVkZjhjMzU4Mjk1ODk2YzhiMmUxNDEwNA==
6
+ MDY3NzA5ZDhkYTg4NmQ5NzBjNTU0ZDMwZGViOGY2ODYzYzgyYTZkNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODYyODg2MjBlOTFkMzY3YjNjYTZlY2E4MzE2MzNjN2E3ZGEzMTIzMTUwMTc2
10
- ZjVjYjgxNDM2NDM2YzBlMGVjYWQ2MTQ5MGNhYTczZjg4ZmUwODFkMGM0Njlk
11
- ZTViZjU1NTlhOWY1MzNhNGFiODFhYWNlMDFjZDM0NjlhMTI5NDI=
9
+ NTY2MTZkODJkOTZmMGI1YzAwNWMyMWU5Nzc1YmFkNmI0ZGZjZWY1YTMzZDMx
10
+ OThmYzc4NTZmMGEyYWYzZWVjMzJlMWMxMjIyYmJhMjM5YjlhYjZkNGI2MzM0
11
+ ZjllMjFhYTg2Njk4MzI0OGExMDgwYzU3ODNiMmVlYzk2ZDY4NDA=
12
12
  data.tar.gz: !binary |-
13
- NmNhZTc3MTM0NGI2ODVhNTQxMzNkZjk5NmJjZTg4MjA5YTcwODMwMzQ0Mjhk
14
- MzNmMzk2MTdmMWJkZjhmZGU0MjY5NjA4ZTQ5YTczOWMzZTQxYzUwNzAzODMy
15
- OWY3OWU2MjY2YTEwMGYyYjcxNTQ0NDJjZmEyZjc2Yzk2ODM2NTI=
13
+ Zjg4YTZlMTA4NTAzZDRlNmZhYzRkMWE4ZGZmMTg0OGJmMDdkYjIxMzE2OGE5
14
+ YWIyODA5MDM4MzBmODNjMTBmYWU4MTY1ZTJiOTI3ZDE1MDMzMTQwODcyY2Fj
15
+ ZjNmNWIzNjA1ZTc0NjBhMTgwNjhjNWFlMDMxMDk3OTAwMzU1NjA=
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+
3
+ rbenv:
4
+
5
+ - 1.9.3
6
+
7
+ script: bundle exec rake test
data/Gemfile CHANGED
@@ -12,7 +12,6 @@ gemspec
12
12
  group :development, :test do
13
13
  gem 'rubocop'
14
14
  gem 'hoe'
15
- gem 'rake'
16
15
  gem 'rake-compiler', '~> 0.9.3'
17
16
  gem 'guard'
18
17
  gem 'minitest'
@@ -27,6 +27,7 @@ ext/eot/ceot.h
27
27
  ext/eot/eot.c
28
28
  ext/eot/extconf.rb
29
29
  lib/eot.rb
30
+ lib/eot/all.rb
30
31
  lib/eot/angle_displays.rb
31
32
  lib/eot/angles.rb
32
33
  lib/eot/constants.rb
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
- # -*- ruby -*-
2
- require "rubygems"
1
+
2
+ # require "rubygems"
3
3
  require 'bundler/gem_tasks'
4
4
  # require "bundler/install_tasks"
5
5
  require 'hoe'
@@ -10,8 +10,15 @@ require 'rake/testtask'
10
10
  require 'rdoc/task'
11
11
  require 'rspec/core/rake_task'
12
12
  require 'yard'
13
+ # begin
14
+ # require 'rubygems/gempackagetask'
15
+ # rescue LoadError
16
+ # end
17
+ # require 'rake/clean'
18
+ # require 'rbconfig'
19
+ # include RbConfig
13
20
 
14
- Hoe.plugins.delete :newb
21
+ # Hoe.plugins.delete :newb
15
22
  # Hoe.plugins.delete :test
16
23
  Hoe.plugins.delete :signing
17
24
  Hoe.plugins.delete :publish
@@ -22,13 +29,34 @@ Hoe.plugins.delete :debug
22
29
  Hoe.plugins.delete :rcov
23
30
  Hoe.plugins.delete :gemcutter
24
31
  Hoe.plugins.delete :racc
25
- Hoe.plugins.delete :inline
32
+ # Hoe.plugins.delete :inline
26
33
  Hoe.plugins.delete :gem_prelude_sucks
27
34
  Hoe.plugins.delete :flog
28
35
  Hoe.plugins.delete :flay
29
- Hoe.plugins.delete :deps
30
- Hoe.plugins.delete :minitest
36
+ # Hoe.plugins.delete :deps
37
+ # Hoe.plugins.delete :minitest
31
38
  Hoe.plugins.delete :rdoc
39
+ # Hoe.plugins.delete :travis
40
+
41
+ # Hoe.plugin :newb
42
+ # Hoe.plugin :test
43
+ # Hoe.plugin :signing
44
+ # Hoe.plugin :publish
45
+ # Hoe.plugin :clean
46
+ # Hoe.plugin :package
47
+ # Hoe.plugin :compiler
48
+ # Hoe.plugin :debug
49
+ # Hoe.plugin :rcov
50
+ # Hoe.plugin :gemcutter
51
+ # Hoe.plugin :racc
52
+ # Hoe.plugin :inline
53
+ # Hoe.plugin :gem_prelude_sucks
54
+ # Hoe.plugin :flog
55
+ # Hoe.plugin :flay
56
+ # Hoe.plugin :deps
57
+ Hoe.plugin :minitest
58
+ # Hoe.plugin :rdoc
59
+ Hoe.plugin :travis
32
60
 
33
61
  Hoe.spec 'equationoftime' do
34
62
  developer('Douglas Allen', 'kb9agt@gmail.com')
@@ -62,16 +90,16 @@ end
62
90
  # end
63
91
 
64
92
  YARD::Rake::YardocTask.new(:yardoc) do |t|
65
- t.files = ['lib/**/*.rb']
93
+ t.files = ['lib/eot/*.rb']
66
94
  # puts t.methods
67
95
  end
68
96
 
69
97
  desc 'generate API documentation to rdocs/index.html'
70
- Rake::RDocTask.new(:rdox) do |rd|
98
+ Rake::RDocTask.new(:docs) do |rd|
71
99
 
72
100
  rd.rdoc_dir = 'rdocs'
73
101
 
74
- rd.rdoc_files.include 'lib/**/*.rb', 'README.rdoc', 'wiki.md'
102
+ rd.rdoc_files.include 'lib/eot/*.rb', 'README.rdoc', 'wiki.md'
75
103
 
76
104
  rd.options << '--line-numbers'
77
105
 
@@ -18,18 +18,27 @@ Gem::Specification.new do |spec|
18
18
  spec.license = 'MIT'
19
19
 
20
20
  # Manifest
21
- spec.files = Dir.glob('ext/**/*.{c,h,rb, so}') + Dir.glob('**') +
22
- Dir.glob('lib/**/*.rb') + Dir.glob('.*')
21
+ # spec.files = Dir.glob('ext/**/*.{c,h,rb, so}') + Dir.glob('**') +
22
+ # Dir.glob('lib/**/*.rb') + Dir.glob('.*')
23
23
  # spec.files = `git ls-files -z`.split($/)#split("\x0")
24
+ # spec.files = `git ls-files -z`.split("\x0")
25
+ spec.files = `git ls-files`.split($/)
24
26
  spec.extensions << 'ext/eot/extconf.rb'
25
27
  # spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
26
28
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
27
29
  spec.require_paths = ['lib']
30
+ spec.has_rdoc = true
31
+ spec.rdoc_options <<
32
+ '--title' << 'Equation of Time -- Solar Position Calculator in Ruby' <<
33
+ '--line-numbers'
28
34
  spec.platform = Gem::Platform::RUBY
35
+ spec.add_runtime_dependency 'addressable', '~> 2.3.6'
36
+ spec.add_runtime_dependency 'rest-client'
37
+ spec.add_runtime_dependency 'celes', '~> 0.0.1'
29
38
  # note: the last good build was with these development dependencies below
30
39
  spec.add_development_dependency 'bundler', '~> 1.7'
31
40
  spec.add_development_dependency 'rake', '~> 10.0'
32
- # spec. add_development_dependency 'rake-compiler', '~> 0.9.3'
41
+ # spec.add_development_dependency 'rake-compiler', '~> 0.9.3'
33
42
  # spec.add_development_dependency "hoe", "~> 3.12.0"
34
43
  # spec.add_development_dependency "guard", "~> 2.6.1"
35
44
  # spec.add_development_dependency "guard-minitest", "~> 2.3.2"
@@ -38,11 +47,5 @@ Gem::Specification.new do |spec|
38
47
  # spec.add_development_dependency "rspec", "~> 3.1.0"
39
48
  # spec.add_development_dependency "yard", "~> 0.8.7.4"
40
49
  # spec.add_development_dependency "rdoc", "~> 4.1.2"
41
- spec.add_runtime_dependency 'addressable', '~> 2.3.6'
42
- spec.add_runtime_dependency 'celes', '~> 0.0.1'
43
- # spec.add_runtime_dependency "astro-algo"
44
- # spec.add_runtime_dependency "multi_xml"
45
- spec.add_runtime_dependency 'rest-client'
46
- # spec.add_runtime_dependency "safe_yaml"
47
50
 
48
51
  end
@@ -0,0 +1,10 @@
1
+ require 'celes'
2
+ require 'date'
3
+ p d = DateTime.now.to_time.utc.to_datetime
4
+ djm0, djm = Celes::cal2jd(d.year, d.month, d.day + d.day_fraction)
5
+ p djm0
6
+ p djm
7
+ p djm + djm0
8
+ p d.ajd.to_f
9
+ p d.day_fraction.to_f
10
+ p (d.ajd - d.day_fraction).to_f
@@ -0,0 +1,23 @@
1
+ require 'celes'
2
+
3
+ puts '3 decimal places for 2.345 radians in'
4
+ s, idmsf = Celes.a2af(3, 2.345)
5
+ p s
6
+ p idmsf
7
+
8
+ puts '3 decimal places for -3.01234 radians in'
9
+ s, ihmsf = Celes.a2tf(3, -3.01234)
10
+ p s
11
+ p ihmsf
12
+
13
+ puts 'formatted -45:13:27.2 degrees in'
14
+ a = Celes.af2a('-', 45, 13, 27.2, &a)
15
+ p a
16
+
17
+ puts 'normalize range 0-2pi radians'
18
+ a = Celes.anp(-0.1)
19
+ p a
20
+
21
+ puts 'normalize range -pi-+pi radians'
22
+ a = Celes.anpm(-4.0)
23
+ p a
@@ -0,0 +1,14 @@
1
+ require 'eot'
2
+ eot = Eot.new
3
+ puts "My Longitude: #{eot.longitude = -75.324}"
4
+ puts "The current UTC noon as ajd: #{eot.ajd}"
5
+ puts "My mean local noon as ajd : #{eot.mean_local_noon_jd}"
6
+ puts "My true local noon as ajd : #{eot.local_noon_dt.ajd.to_f}"
7
+ eot_jd = eot.mean_local_noon_jd - eot.local_noon_dt.ajd
8
+ puts "Note: ajd and jd decimals only go so far and so slight difference here"
9
+ puts "and obviously some rounding occurs when looking at the second ajd above."
10
+ puts "mean - true: #{e1 = eot_jd}"
11
+ puts "eot.eot_jd : #{e2 = eot.eot_jd}"
12
+ puts "The differnce: #{e1 - e2}"
13
+ puts "which in minutes is: #{1440.0 * (e1 - e2)}"
14
+ puts "and in arc minutes is: #{15.0 * 1440.0 * (e1 - e2)}"
@@ -0,0 +1,7 @@
1
+ # eot_methods_list.rb
2
+
3
+ require 'eot'
4
+ eot = Eot.new
5
+ list = eot.public_methods(false).sort
6
+ list.each { |i| puts i.to_sym }
7
+ puts Time.now
@@ -0,0 +1,11 @@
1
+ require 'eot'
2
+ eot = Eot.new
3
+ puts 'My Local Apparent Sidereal Time'
4
+ loop do
5
+ eot.ajd = DateTime.now.to_time.utc.to_datetime.ajd
6
+ gst = eot.string_deg_to_time(eot.tl_aries - -88.75 * Eot::D2R)
7
+ era = eot.string_deg_to_time(eot.era - -88.75 * Eot::D2R)
8
+ puts "LST gst #{gst} LST era #{era}"
9
+ # the number is syncing my machine. machine may vary in this.
10
+ sleep 0.99613381875
11
+ end
@@ -0,0 +1,6 @@
1
+ require 'celes'
2
+
3
+ puts '3 decimal places for 2.345 radians in'
4
+ s, idmsf = Celes.a2af(3, 2.345)
5
+ p s
6
+ p idmsf
@@ -0,0 +1,8229 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if RUBY_VERSION < "1.9.0"
4
+ require 'rubygems'
5
+ end
6
+ require 'celes'
7
+
8
+ $verbose = false
9
+
10
+ if RUBY_VERSION < "1.9.0"
11
+ class String
12
+ # fixes older ruby versions < 1.9.0
13
+ def ord
14
+ self[0]
15
+ end
16
+ end
17
+ end
18
+
19
+
20
+ def viv(value, ok_value, func, test)
21
+ if value != ok_value
22
+ $status = 1
23
+ puts "#{func} failed: #{test} want #{ok_value} got #{value}"
24
+ elsif $verbose
25
+ puts "#{func} passed: #{test} want #{ok_value} got #{value}"
26
+ end
27
+ end
28
+
29
+ def vvd(value , ok_value, eps, func, test)
30
+ a = value - ok_value
31
+ if a.abs > eps
32
+ $status = 1
33
+ f = (ok_value / a).abs
34
+ puts "#{func} failed: #{test} want %.20g got %.20g (1/%.3g)" %
35
+ [ok_value, value, f]
36
+ elsif $verbose
37
+ puts "#{func} passed: #{test} want %.20g got %.20g" %
38
+ [ok_value, value]
39
+ end
40
+ end
41
+
42
+
43
+ #static void t_a2af(int *status)
44
+ #{
45
+ # int idmsf[4]
46
+ # char s
47
+ #
48
+ #
49
+ # Celes::a2af(4, 2.345, &s, idmsf)
50
+ #
51
+ # viv(s, '+', "Celes::a2af", "s")
52
+ #
53
+ # viv(idmsf[0], 134, "Celes::a2af", "0")
54
+ # viv(idmsf[1], 21, "Celes::a2af", "1")
55
+ # viv(idmsf[2], 30, "Celes::a2af", "2")
56
+ # viv(idmsf[3], 9706, "Celes::a2af", "3")
57
+ #
58
+ #}
59
+ def t_a2af
60
+ s, idmsf = Celes::a2af(4, 2.345)
61
+
62
+ viv(s.ord, '+'.ord, "Celes::a2af", "s")
63
+
64
+ viv(idmsf[0], 134, "Celes::a2af", "0")
65
+ viv(idmsf[1], 21, "Celes::a2af", "1")
66
+ viv(idmsf[2], 30, "Celes::a2af", "2")
67
+ viv(idmsf[3], 9706, "Celes::a2af", "3")
68
+ end
69
+
70
+ #static void t_a2tf(int *status)
71
+ #{
72
+ # int ihmsf[4]
73
+ # char s
74
+ #
75
+ #
76
+ # Celes::a2tf(4, -3.01234, &s, ihmsf)
77
+ #
78
+ # viv((int)s, '-', "Celes::a2tf", "s")
79
+ #
80
+ # viv(ihmsf[0], 11, "Celes::a2tf", "0")
81
+ # viv(ihmsf[1], 30, "Celes::a2tf", "1")
82
+ # viv(ihmsf[2], 22, "Celes::a2tf", "2")
83
+ # viv(ihmsf[3], 6484, "Celes::a2tf", "3")
84
+ #
85
+ #}
86
+ def t_a2tf
87
+ s, ihmsf = Celes::a2tf(4, -3.01234)
88
+
89
+ viv(s.ord, '-'.ord, "Celes::a2tf", "s")
90
+
91
+ viv(ihmsf[0], 11, "Celes::a2tf", "0")
92
+ viv(ihmsf[1], 30, "Celes::a2tf", "1")
93
+ viv(ihmsf[2], 22, "Celes::a2tf", "2")
94
+ viv(ihmsf[3], 6484, "Celes::a2tf", "3")
95
+ end
96
+
97
+ #static void t_af2a(int *status)
98
+ #{
99
+ # double a
100
+ # int j
101
+ #
102
+ #
103
+ # j = Celes::af2a('-', 45, 13, 27.2, &a)
104
+ #
105
+ # vvd(a, -0.7893115794313644842, 1e-12, "Celes::af2a", "a")
106
+ # viv(j, 0, "Celes::af2a", "j")
107
+ #
108
+ #}
109
+ def t_af2a
110
+ a = Celes::af2a('-', 45, 13, 27.2, &a)
111
+
112
+ vvd(a, -0.7893115794313644842, 1e-12, "Celes::af2a", "a")
113
+ viv(Celes::status, 0, "Celes::af2a", "j")
114
+ end
115
+
116
+ #static void t_anp(int *status)
117
+ #{
118
+ # vvd(Celes::anp(-0.1), 6.183185307179586477, 1e-12, "Celes::anp", "")
119
+ #}
120
+ def t_anp
121
+ vvd(Celes::anp(-0.1), 6.183185307179586477, 1e-12, "Celes::anp", "")
122
+ end
123
+
124
+ #static void t_anpm(int *status)
125
+ #{
126
+ # vvd(Celes::anpm(-4.0), 2.283185307179586477, 1e-12, "Celes::anpm", "")
127
+ #}
128
+ def t_anpm
129
+ vvd(Celes::anpm(-4.0), 2.283185307179586477, 1e-12, "Celes::anpm", "")
130
+ end
131
+
132
+ #static void t_bi00(int *status)
133
+ #{
134
+ # double dpsibi, depsbi, dra
135
+ #
136
+ # Celes::bi00(&dpsibi, &depsbi, &dra)
137
+ #
138
+ # vvd(dpsibi, -0.2025309152835086613e-6, 1e-12,
139
+ # "Celes::bi00", "dpsibi")
140
+ # vvd(depsbi, -0.3306041454222147847e-7, 1e-12,
141
+ # "Celes::bi00", "depsbi")
142
+ # vvd(dra, -0.7078279744199225506e-7, 1e-12,
143
+ # "Celes::bi00", "dra")
144
+ #}
145
+ def t_bi00
146
+ dpsibi, depsbi, dra = Celes::bi00
147
+
148
+ vvd(dpsibi, -0.2025309152835086613e-6, 1e-12,
149
+ "Celes::bi00", "dpsibi")
150
+ vvd(depsbi, -0.3306041454222147847e-7, 1e-12,
151
+ "Celes::bi00", "depsbi")
152
+ vvd(dra, -0.7078279744199225506e-7, 1e-12,
153
+ "Celes::bi00", "dra")
154
+ end
155
+
156
+ #static void t_bp00(int *status)
157
+ #{
158
+ # double rb[3][3], rp[3][3], rbp[3][3]
159
+ #
160
+ #
161
+ # Celes::bp00(2400000.5, 50123.9999, rb, rp, rbp)
162
+ #
163
+ # vvd(rb[0][0], 0.9999999999999942498, 1e-12,
164
+ # "Celes::bp00", "rb11")
165
+ # vvd(rb[0][1], -0.7078279744199196626e-7, 1e-16,
166
+ # "Celes::bp00", "rb12")
167
+ # vvd(rb[0][2], 0.8056217146976134152e-7, 1e-16,
168
+ # "Celes::bp00", "rb13")
169
+ # vvd(rb[1][0], 0.7078279477857337206e-7, 1e-16,
170
+ # "Celes::bp00", "rb21")
171
+ # vvd(rb[1][1], 0.9999999999999969484, 1e-12,
172
+ # "Celes::bp00", "rb22")
173
+ # vvd(rb[1][2], 0.3306041454222136517e-7, 1e-16,
174
+ # "Celes::bp00", "rb23")
175
+ # vvd(rb[2][0], -0.8056217380986972157e-7, 1e-16,
176
+ # "Celes::bp00", "rb31")
177
+ # vvd(rb[2][1], -0.3306040883980552500e-7, 1e-16,
178
+ # "Celes::bp00", "rb32")
179
+ # vvd(rb[2][2], 0.9999999999999962084, 1e-12,
180
+ # "Celes::bp00", "rb33")
181
+ #
182
+ # vvd(rp[0][0], 0.9999995504864048241, 1e-12,
183
+ # "Celes::bp00", "rp11")
184
+ # vvd(rp[0][1], 0.8696113836207084411e-3, 1e-14,
185
+ # "Celes::bp00", "rp12")
186
+ # vvd(rp[0][2], 0.3778928813389333402e-3, 1e-14,
187
+ # "Celes::bp00", "rp13")
188
+ # vvd(rp[1][0], -0.8696113818227265968e-3, 1e-14,
189
+ # "Celes::bp00", "rp21")
190
+ # vvd(rp[1][1], 0.9999996218879365258, 1e-12,
191
+ # "Celes::bp00", "rp22")
192
+ # vvd(rp[1][2], -0.1690679263009242066e-6, 1e-14,
193
+ # "Celes::bp00", "rp23")
194
+ # vvd(rp[2][0], -0.3778928854764695214e-3, 1e-14,
195
+ # "Celes::bp00", "rp31")
196
+ # vvd(rp[2][1], -0.1595521004195286491e-6, 1e-14,
197
+ # "Celes::bp00", "rp32")
198
+ # vvd(rp[2][2], 0.9999999285984682756, 1e-12,
199
+ # "Celes::bp00", "rp33")
200
+ #
201
+ # vvd(rbp[0][0], 0.9999995505175087260, 1e-12,
202
+ # "Celes::bp00", "rbp11")
203
+ # vvd(rbp[0][1], 0.8695405883617884705e-3, 1e-14,
204
+ # "Celes::bp00", "rbp12")
205
+ # vvd(rbp[0][2], 0.3779734722239007105e-3, 1e-14,
206
+ # "Celes::bp00", "rbp13")
207
+ # vvd(rbp[1][0], -0.8695405990410863719e-3, 1e-14,
208
+ # "Celes::bp00", "rbp21")
209
+ # vvd(rbp[1][1], 0.9999996219494925900, 1e-12,
210
+ # "Celes::bp00", "rbp22")
211
+ # vvd(rbp[1][2], -0.1360775820404982209e-6, 1e-14,
212
+ # "Celes::bp00", "rbp23")
213
+ # vvd(rbp[2][0], -0.3779734476558184991e-3, 1e-14,
214
+ # "Celes::bp00", "rbp31")
215
+ # vvd(rbp[2][1], -0.1925857585832024058e-6, 1e-14,
216
+ # "Celes::bp00", "rbp32")
217
+ # vvd(rbp[2][2], 0.9999999285680153377, 1e-12,
218
+ # "Celes::bp00", "rbp33")
219
+ #}
220
+ def t_bp00
221
+ rb, rp, rbp = Celes::bp00(2400000.5, 50123.9999)
222
+
223
+ vvd(rb[0][0], 0.9999999999999942498, 1e-12,
224
+ "Celes::bp00", "rb11")
225
+ vvd(rb[0][1], -0.7078279744199196626e-7, 1e-16,
226
+ "Celes::bp00", "rb12")
227
+ vvd(rb[0][2], 0.8056217146976134152e-7, 1e-16,
228
+ "Celes::bp00", "rb13")
229
+ vvd(rb[1][0], 0.7078279477857337206e-7, 1e-16,
230
+ "Celes::bp00", "rb21")
231
+ vvd(rb[1][1], 0.9999999999999969484, 1e-12,
232
+ "Celes::bp00", "rb22")
233
+ vvd(rb[1][2], 0.3306041454222136517e-7, 1e-16,
234
+ "Celes::bp00", "rb23")
235
+ vvd(rb[2][0], -0.8056217380986972157e-7, 1e-16,
236
+ "Celes::bp00", "rb31")
237
+ vvd(rb[2][1], -0.3306040883980552500e-7, 1e-16,
238
+ "Celes::bp00", "rb32")
239
+ vvd(rb[2][2], 0.9999999999999962084, 1e-12,
240
+ "Celes::bp00", "rb33")
241
+
242
+ vvd(rp[0][0], 0.9999995504864048241, 1e-12,
243
+ "Celes::bp00", "rp11")
244
+ vvd(rp[0][1], 0.8696113836207084411e-3, 1e-14,
245
+ "Celes::bp00", "rp12")
246
+ vvd(rp[0][2], 0.3778928813389333402e-3, 1e-14,
247
+ "Celes::bp00", "rp13")
248
+ vvd(rp[1][0], -0.8696113818227265968e-3, 1e-14,
249
+ "Celes::bp00", "rp21")
250
+ vvd(rp[1][1], 0.9999996218879365258, 1e-12,
251
+ "Celes::bp00", "rp22")
252
+ vvd(rp[1][2], -0.1690679263009242066e-6, 1e-14,
253
+ "Celes::bp00", "rp23")
254
+ vvd(rp[2][0], -0.3778928854764695214e-3, 1e-14,
255
+ "Celes::bp00", "rp31")
256
+ vvd(rp[2][1], -0.1595521004195286491e-6, 1e-14,
257
+ "Celes::bp00", "rp32")
258
+ vvd(rp[2][2], 0.9999999285984682756, 1e-12,
259
+ "Celes::bp00", "rp33")
260
+
261
+ vvd(rbp[0][0], 0.9999995505175087260, 1e-12,
262
+ "Celes::bp00", "rbp11")
263
+ vvd(rbp[0][1], 0.8695405883617884705e-3, 1e-14,
264
+ "Celes::bp00", "rbp12")
265
+ vvd(rbp[0][2], 0.3779734722239007105e-3, 1e-14,
266
+ "Celes::bp00", "rbp13")
267
+ vvd(rbp[1][0], -0.8695405990410863719e-3, 1e-14,
268
+ "Celes::bp00", "rbp21")
269
+ vvd(rbp[1][1], 0.9999996219494925900, 1e-12,
270
+ "Celes::bp00", "rbp22")
271
+ vvd(rbp[1][2], -0.1360775820404982209e-6, 1e-14,
272
+ "Celes::bp00", "rbp23")
273
+ vvd(rbp[2][0], -0.3779734476558184991e-3, 1e-14,
274
+ "Celes::bp00", "rbp31")
275
+ vvd(rbp[2][1], -0.1925857585832024058e-6, 1e-14,
276
+ "Celes::bp00", "rbp32")
277
+ vvd(rbp[2][2], 0.9999999285680153377, 1e-12,
278
+ "Celes::bp00", "rbp33")
279
+ end
280
+
281
+ #static void t_bp06(int *status)
282
+ #{
283
+ # double rb[3][3], rp[3][3], rbp[3][3]
284
+ #
285
+ #
286
+ # Celes::bp06(2400000.5, 50123.9999, rb, rp, rbp)
287
+ #
288
+ # vvd(rb[0][0], 0.9999999999999942497, 1e-12,
289
+ # "Celes::bp06", "rb11")
290
+ # vvd(rb[0][1], -0.7078368960971557145e-7, 1e-14,
291
+ # "Celes::bp06", "rb12")
292
+ # vvd(rb[0][2], 0.8056213977613185606e-7, 1e-14,
293
+ # "Celes::bp06", "rb13")
294
+ # vvd(rb[1][0], 0.7078368694637674333e-7, 1e-14,
295
+ # "Celes::bp06", "rb21")
296
+ # vvd(rb[1][1], 0.9999999999999969484, 1e-12,
297
+ # "Celes::bp06", "rb22")
298
+ # vvd(rb[1][2], 0.3305943742989134124e-7, 1e-14,
299
+ # "Celes::bp06", "rb23")
300
+ # vvd(rb[2][0], -0.8056214211620056792e-7, 1e-14,
301
+ # "Celes::bp06", "rb31")
302
+ # vvd(rb[2][1], -0.3305943172740586950e-7, 1e-14,
303
+ # "Celes::bp06", "rb32")
304
+ # vvd(rb[2][2], 0.9999999999999962084, 1e-12,
305
+ # "Celes::bp06", "rb33")
306
+ #
307
+ # vvd(rp[0][0], 0.9999995504864960278, 1e-12,
308
+ # "Celes::bp06", "rp11")
309
+ # vvd(rp[0][1], 0.8696112578855404832e-3, 1e-14,
310
+ # "Celes::bp06", "rp12")
311
+ # vvd(rp[0][2], 0.3778929293341390127e-3, 1e-14,
312
+ # "Celes::bp06", "rp13")
313
+ # vvd(rp[1][0], -0.8696112560510186244e-3, 1e-14,
314
+ # "Celes::bp06", "rp21")
315
+ # vvd(rp[1][1], 0.9999996218880458820, 1e-12,
316
+ # "Celes::bp06", "rp22")
317
+ # vvd(rp[1][2], -0.1691646168941896285e-6, 1e-14,
318
+ # "Celes::bp06", "rp23")
319
+ # vvd(rp[2][0], -0.3778929335557603418e-3, 1e-14,
320
+ # "Celes::bp06", "rp31")
321
+ # vvd(rp[2][1], -0.1594554040786495076e-6, 1e-14,
322
+ # "Celes::bp06", "rp32")
323
+ # vvd(rp[2][2], 0.9999999285984501222, 1e-12,
324
+ # "Celes::bp06", "rp33")
325
+ #
326
+ # vvd(rbp[0][0], 0.9999995505176007047, 1e-12,
327
+ # "Celes::bp06", "rbp11")
328
+ # vvd(rbp[0][1], 0.8695404617348208406e-3, 1e-14,
329
+ # "Celes::bp06", "rbp12")
330
+ # vvd(rbp[0][2], 0.3779735201865589104e-3, 1e-14,
331
+ # "Celes::bp06", "rbp13")
332
+ # vvd(rbp[1][0], -0.8695404723772031414e-3, 1e-14,
333
+ # "Celes::bp06", "rbp21")
334
+ # vvd(rbp[1][1], 0.9999996219496027161, 1e-12,
335
+ # "Celes::bp06", "rbp22")
336
+ # vvd(rbp[1][2], -0.1361752497080270143e-6, 1e-14,
337
+ # "Celes::bp06", "rbp23")
338
+ # vvd(rbp[2][0], -0.3779734957034089490e-3, 1e-14,
339
+ # "Celes::bp06", "rbp31")
340
+ # vvd(rbp[2][1], -0.1924880847894457113e-6, 1e-14,
341
+ # "Celes::bp06", "rbp32")
342
+ # vvd(rbp[2][2], 0.9999999285679971958, 1e-12,
343
+ # "Celes::bp06", "rbp33")
344
+ #}
345
+ def t_bp06
346
+ rb, rp, rbp = Celes::bp06(2400000.5, 50123.9999)
347
+
348
+ vvd(rb[0][0], 0.9999999999999942497, 1e-12,
349
+ "Celes::bp06", "rb11")
350
+ vvd(rb[0][1], -0.7078368960971557145e-7, 1e-14,
351
+ "Celes::bp06", "rb12")
352
+ vvd(rb[0][2], 0.8056213977613185606e-7, 1e-14,
353
+ "Celes::bp06", "rb13")
354
+ vvd(rb[1][0], 0.7078368694637674333e-7, 1e-14,
355
+ "Celes::bp06", "rb21")
356
+ vvd(rb[1][1], 0.9999999999999969484, 1e-12,
357
+ "Celes::bp06", "rb22")
358
+ vvd(rb[1][2], 0.3305943742989134124e-7, 1e-14,
359
+ "Celes::bp06", "rb23")
360
+ vvd(rb[2][0], -0.8056214211620056792e-7, 1e-14,
361
+ "Celes::bp06", "rb31")
362
+ vvd(rb[2][1], -0.3305943172740586950e-7, 1e-14,
363
+ "Celes::bp06", "rb32")
364
+ vvd(rb[2][2], 0.9999999999999962084, 1e-12,
365
+ "Celes::bp06", "rb33")
366
+
367
+ vvd(rp[0][0], 0.9999995504864960278, 1e-12,
368
+ "Celes::bp06", "rp11")
369
+ vvd(rp[0][1], 0.8696112578855404832e-3, 1e-14,
370
+ "Celes::bp06", "rp12")
371
+ vvd(rp[0][2], 0.3778929293341390127e-3, 1e-14,
372
+ "Celes::bp06", "rp13")
373
+ vvd(rp[1][0], -0.8696112560510186244e-3, 1e-14,
374
+ "Celes::bp06", "rp21")
375
+ vvd(rp[1][1], 0.9999996218880458820, 1e-12,
376
+ "Celes::bp06", "rp22")
377
+ vvd(rp[1][2], -0.1691646168941896285e-6, 1e-14,
378
+ "Celes::bp06", "rp23")
379
+ vvd(rp[2][0], -0.3778929335557603418e-3, 1e-14,
380
+ "Celes::bp06", "rp31")
381
+ vvd(rp[2][1], -0.1594554040786495076e-6, 1e-14,
382
+ "Celes::bp06", "rp32")
383
+ vvd(rp[2][2], 0.9999999285984501222, 1e-12,
384
+ "Celes::bp06", "rp33")
385
+
386
+ vvd(rbp[0][0], 0.9999995505176007047, 1e-12,
387
+ "Celes::bp06", "rbp11")
388
+ vvd(rbp[0][1], 0.8695404617348208406e-3, 1e-14,
389
+ "Celes::bp06", "rbp12")
390
+ vvd(rbp[0][2], 0.3779735201865589104e-3, 1e-14,
391
+ "Celes::bp06", "rbp13")
392
+ vvd(rbp[1][0], -0.8695404723772031414e-3, 1e-14,
393
+ "Celes::bp06", "rbp21")
394
+ vvd(rbp[1][1], 0.9999996219496027161, 1e-12,
395
+ "Celes::bp06", "rbp22")
396
+ vvd(rbp[1][2], -0.1361752497080270143e-6, 1e-14,
397
+ "Celes::bp06", "rbp23")
398
+ vvd(rbp[2][0], -0.3779734957034089490e-3, 1e-14,
399
+ "Celes::bp06", "rbp31")
400
+ vvd(rbp[2][1], -0.1924880847894457113e-6, 1e-14,
401
+ "Celes::bp06", "rbp32")
402
+ vvd(rbp[2][2], 0.9999999285679971958, 1e-12,
403
+ "Celes::bp06", "rbp33")
404
+ end
405
+
406
+ #static void t_bpn2xy(int *status)
407
+ #{
408
+ # double rbpn[3][3], x, y
409
+ #
410
+ #
411
+ # rbpn[0][0] = 9.999962358680738e-1
412
+ # rbpn[0][1] = -2.516417057665452e-3
413
+ # rbpn[0][2] = -1.093569785342370e-3
414
+ #
415
+ # rbpn[1][0] = 2.516462370370876e-3
416
+ # rbpn[1][1] = 9.999968329010883e-1
417
+ # rbpn[1][2] = 4.006159587358310e-5
418
+ #
419
+ # rbpn[2][0] = 1.093465510215479e-3
420
+ # rbpn[2][1] = -4.281337229063151e-5
421
+ # rbpn[2][2] = 9.999994012499173e-1
422
+ #
423
+ # Celes::bpn2xy(rbpn, &x, &y)
424
+ #
425
+ # vvd(x, 1.093465510215479e-3, 1e-12, "Celes::bpn2xy", "x")
426
+ # vvd(y, -4.281337229063151e-5, 1e-12, "Celes::bpn2xy", "y")
427
+ #
428
+ #}
429
+ def t_bpn2xy
430
+ rbpn = [[], [], []]
431
+
432
+ rbpn[0][0] = 9.999962358680738e-1
433
+ rbpn[0][1] = -2.516417057665452e-3
434
+ rbpn[0][2] = -1.093569785342370e-3
435
+
436
+ rbpn[1][0] = 2.516462370370876e-3
437
+ rbpn[1][1] = 9.999968329010883e-1
438
+ rbpn[1][2] = 4.006159587358310e-5
439
+
440
+ rbpn[2][0] = 1.093465510215479e-3
441
+ rbpn[2][1] = -4.281337229063151e-5
442
+ rbpn[2][2] = 9.999994012499173e-1
443
+
444
+ x, y = Celes::bpn2xy(rbpn)
445
+
446
+ vvd(x, 1.093465510215479e-3, 1e-12, "Celes::bpn2xy", "x")
447
+ vvd(y, -4.281337229063151e-5, 1e-12, "Celes::bpn2xy", "y")
448
+ end
449
+
450
+ #static void t_c2i00a(int *status)
451
+ #{
452
+ # double rc2i[3][3]
453
+ #
454
+ #
455
+ # Celes::c2i00a(2400000.5, 53736.0, rc2i)
456
+ #
457
+ # vvd(rc2i[0][0], 0.9999998323037165557, 1e-12,
458
+ # "Celes::c2i00a", "11")
459
+ # vvd(rc2i[0][1], 0.5581526348992140183e-9, 1e-12,
460
+ # "Celes::c2i00a", "12")
461
+ # vvd(rc2i[0][2], -0.5791308477073443415e-3, 1e-12,
462
+ # "Celes::c2i00a", "13")
463
+ #
464
+ # vvd(rc2i[1][0], -0.2384266227870752452e-7, 1e-12,
465
+ # "Celes::c2i00a", "21")
466
+ # vvd(rc2i[1][1], 0.9999999991917405258, 1e-12,
467
+ # "Celes::c2i00a", "22")
468
+ # vvd(rc2i[1][2], -0.4020594955028209745e-4, 1e-12,
469
+ # "Celes::c2i00a", "23")
470
+ #
471
+ # vvd(rc2i[2][0], 0.5791308472168152904e-3, 1e-12,
472
+ # "Celes::c2i00a", "31")
473
+ # vvd(rc2i[2][1], 0.4020595661591500259e-4, 1e-12,
474
+ # "Celes::c2i00a", "32")
475
+ # vvd(rc2i[2][2], 0.9999998314954572304, 1e-12,
476
+ # "Celes::c2i00a", "33")
477
+ #
478
+ #}
479
+ def t_c2i00a
480
+ rc2i = Celes::c2i00a(2400000.5, 53736.0)
481
+
482
+ vvd(rc2i[0][0], 0.9999998323037165557, 1e-12,
483
+ "Celes::c2i00a", "11")
484
+ vvd(rc2i[0][1], 0.5581526348992140183e-9, 1e-12,
485
+ "Celes::c2i00a", "12")
486
+ vvd(rc2i[0][2], -0.5791308477073443415e-3, 1e-12,
487
+ "Celes::c2i00a", "13")
488
+
489
+ vvd(rc2i[1][0], -0.2384266227870752452e-7, 1e-12,
490
+ "Celes::c2i00a", "21")
491
+ vvd(rc2i[1][1], 0.9999999991917405258, 1e-12,
492
+ "Celes::c2i00a", "22")
493
+ vvd(rc2i[1][2], -0.4020594955028209745e-4, 1e-12,
494
+ "Celes::c2i00a", "23")
495
+
496
+ vvd(rc2i[2][0], 0.5791308472168152904e-3, 1e-12,
497
+ "Celes::c2i00a", "31")
498
+ vvd(rc2i[2][1], 0.4020595661591500259e-4, 1e-12,
499
+ "Celes::c2i00a", "32")
500
+ vvd(rc2i[2][2], 0.9999998314954572304, 1e-12,
501
+ "Celes::c2i00a", "33")
502
+ end
503
+
504
+ #static void t_c2i00b(int *status)
505
+ #{
506
+ # double rc2i[3][3]
507
+ #
508
+ #
509
+ # Celes::c2i00b(2400000.5, 53736.0, rc2i)
510
+ #
511
+ # vvd(rc2i[0][0], 0.9999998323040954356, 1e-12,
512
+ # "Celes::c2i00b", "11")
513
+ # vvd(rc2i[0][1], 0.5581526349131823372e-9, 1e-12,
514
+ # "Celes::c2i00b", "12")
515
+ # vvd(rc2i[0][2], -0.5791301934855394005e-3, 1e-12,
516
+ # "Celes::c2i00b", "13")
517
+ #
518
+ # vvd(rc2i[1][0], -0.2384239285499175543e-7, 1e-12,
519
+ # "Celes::c2i00b", "21")
520
+ # vvd(rc2i[1][1], 0.9999999991917574043, 1e-12,
521
+ # "Celes::c2i00b", "22")
522
+ # vvd(rc2i[1][2], -0.4020552974819030066e-4, 1e-12,
523
+ # "Celes::c2i00b", "23")
524
+ #
525
+ # vvd(rc2i[2][0], 0.5791301929950208873e-3, 1e-12,
526
+ # "Celes::c2i00b", "31")
527
+ # vvd(rc2i[2][1], 0.4020553681373720832e-4, 1e-12,
528
+ # "Celes::c2i00b", "32")
529
+ # vvd(rc2i[2][2], 0.9999998314958529887, 1e-12,
530
+ # "Celes::c2i00b", "33")
531
+ #
532
+ #}
533
+ def t_c2i00b
534
+ rc2i = Celes::c2i00b(2400000.5, 53736.0)
535
+
536
+ vvd(rc2i[0][0], 0.9999998323040954356, 1e-12,
537
+ "Celes::c2i00b", "11")
538
+ vvd(rc2i[0][1], 0.5581526349131823372e-9, 1e-12,
539
+ "Celes::c2i00b", "12")
540
+ vvd(rc2i[0][2], -0.5791301934855394005e-3, 1e-12,
541
+ "Celes::c2i00b", "13")
542
+
543
+ vvd(rc2i[1][0], -0.2384239285499175543e-7, 1e-12,
544
+ "Celes::c2i00b", "21")
545
+ vvd(rc2i[1][1], 0.9999999991917574043, 1e-12,
546
+ "Celes::c2i00b", "22")
547
+ vvd(rc2i[1][2], -0.4020552974819030066e-4, 1e-12,
548
+ "Celes::c2i00b", "23")
549
+
550
+ vvd(rc2i[2][0], 0.5791301929950208873e-3, 1e-12,
551
+ "Celes::c2i00b", "31")
552
+ vvd(rc2i[2][1], 0.4020553681373720832e-4, 1e-12,
553
+ "Celes::c2i00b", "32")
554
+ vvd(rc2i[2][2], 0.9999998314958529887, 1e-12,
555
+ "Celes::c2i00b", "33")
556
+ end
557
+
558
+ #static void t_c2i06a(int *status)
559
+ #{
560
+ # double rc2i[3][3]
561
+ #
562
+ #
563
+ # Celes::c2i06a(2400000.5, 53736.0, rc2i)
564
+ #
565
+ # vvd(rc2i[0][0], 0.9999998323037159379, 1e-12,
566
+ # "Celes::c2i06a", "11")
567
+ # vvd(rc2i[0][1], 0.5581121329587613787e-9, 1e-12,
568
+ # "Celes::c2i06a", "12")
569
+ # vvd(rc2i[0][2], -0.5791308487740529749e-3, 1e-12,
570
+ # "Celes::c2i06a", "13")
571
+ #
572
+ # vvd(rc2i[1][0], -0.2384253169452306581e-7, 1e-12,
573
+ # "Celes::c2i06a", "21")
574
+ # vvd(rc2i[1][1], 0.9999999991917467827, 1e-12,
575
+ # "Celes::c2i06a", "22")
576
+ # vvd(rc2i[1][2], -0.4020579392895682558e-4, 1e-12,
577
+ # "Celes::c2i06a", "23")
578
+ #
579
+ # vvd(rc2i[2][0], 0.5791308482835292617e-3, 1e-12,
580
+ # "Celes::c2i06a", "31")
581
+ # vvd(rc2i[2][1], 0.4020580099454020310e-4, 1e-12,
582
+ # "Celes::c2i06a", "32")
583
+ # vvd(rc2i[2][2], 0.9999998314954628695, 1e-12,
584
+ # "Celes::c2i06a", "33")
585
+ #
586
+ #}
587
+ def t_c2i06a
588
+ rc2i = Celes::c2i06a(2400000.5, 53736.0)
589
+
590
+ vvd(rc2i[0][0], 0.9999998323037159379, 1e-12,
591
+ "Celes::c2i06a", "11")
592
+ vvd(rc2i[0][1], 0.5581121329587613787e-9, 1e-12,
593
+ "Celes::c2i06a", "12")
594
+ vvd(rc2i[0][2], -0.5791308487740529749e-3, 1e-12,
595
+ "Celes::c2i06a", "13")
596
+
597
+ vvd(rc2i[1][0], -0.2384253169452306581e-7, 1e-12,
598
+ "Celes::c2i06a", "21")
599
+ vvd(rc2i[1][1], 0.9999999991917467827, 1e-12,
600
+ "Celes::c2i06a", "22")
601
+ vvd(rc2i[1][2], -0.4020579392895682558e-4, 1e-12,
602
+ "Celes::c2i06a", "23")
603
+
604
+ vvd(rc2i[2][0], 0.5791308482835292617e-3, 1e-12,
605
+ "Celes::c2i06a", "31")
606
+ vvd(rc2i[2][1], 0.4020580099454020310e-4, 1e-12,
607
+ "Celes::c2i06a", "32")
608
+ vvd(rc2i[2][2], 0.9999998314954628695, 1e-12,
609
+ "Celes::c2i06a", "33")
610
+ end
611
+
612
+ #static void t_c2ibpn(int *status)
613
+ #{
614
+ # double rbpn[3][3], rc2i[3][3]
615
+ #
616
+ #
617
+ # rbpn[0][0] = 9.999962358680738e-1
618
+ # rbpn[0][1] = -2.516417057665452e-3
619
+ # rbpn[0][2] = -1.093569785342370e-3
620
+ #
621
+ # rbpn[1][0] = 2.516462370370876e-3
622
+ # rbpn[1][1] = 9.999968329010883e-1
623
+ # rbpn[1][2] = 4.006159587358310e-5
624
+ #
625
+ # rbpn[2][0] = 1.093465510215479e-3
626
+ # rbpn[2][1] = -4.281337229063151e-5
627
+ # rbpn[2][2] = 9.999994012499173e-1
628
+ #
629
+ # Celes::c2ibpn(2400000.5, 50123.9999, rbpn, rc2i)
630
+ #
631
+ # vvd(rc2i[0][0], 0.9999994021664089977, 1e-12,
632
+ # "Celes::c2ibpn", "11")
633
+ # vvd(rc2i[0][1], -0.3869195948017503664e-8, 1e-12,
634
+ # "Celes::c2ibpn", "12")
635
+ # vvd(rc2i[0][2], -0.1093465511383285076e-2, 1e-12,
636
+ # "Celes::c2ibpn", "13")
637
+ #
638
+ # vvd(rc2i[1][0], 0.5068413965715446111e-7, 1e-12,
639
+ # "Celes::c2ibpn", "21")
640
+ # vvd(rc2i[1][1], 0.9999999990835075686, 1e-12,
641
+ # "Celes::c2ibpn", "22")
642
+ # vvd(rc2i[1][2], 0.4281334246452708915e-4, 1e-12,
643
+ # "Celes::c2ibpn", "23")
644
+ #
645
+ # vvd(rc2i[2][0], 0.1093465510215479000e-2, 1e-12,
646
+ # "Celes::c2ibpn", "31")
647
+ # vvd(rc2i[2][1], -0.4281337229063151000e-4, 1e-12,
648
+ # "Celes::c2ibpn", "32")
649
+ # vvd(rc2i[2][2], 0.9999994012499173103, 1e-12,
650
+ # "Celes::c2ibpn", "33")
651
+ #
652
+ #}
653
+ def t_c2ibpn
654
+ rbpn = [[], [], []]
655
+
656
+ rbpn[0][0] = 9.999962358680738e-1
657
+ rbpn[0][1] = -2.516417057665452e-3
658
+ rbpn[0][2] = -1.093569785342370e-3
659
+
660
+ rbpn[1][0] = 2.516462370370876e-3
661
+ rbpn[1][1] = 9.999968329010883e-1
662
+ rbpn[1][2] = 4.006159587358310e-5
663
+
664
+ rbpn[2][0] = 1.093465510215479e-3
665
+ rbpn[2][1] = -4.281337229063151e-5
666
+ rbpn[2][2] = 9.999994012499173e-1
667
+
668
+ rc2i = Celes::c2ibpn(2400000.5, 50123.9999, rbpn)
669
+
670
+ vvd(rc2i[0][0], 0.9999994021664089977, 1e-12,
671
+ "Celes::c2ibpn", "11")
672
+ vvd(rc2i[0][1], -0.3869195948017503664e-8, 1e-12,
673
+ "Celes::c2ibpn", "12")
674
+ vvd(rc2i[0][2], -0.1093465511383285076e-2, 1e-12,
675
+ "Celes::c2ibpn", "13")
676
+
677
+ vvd(rc2i[1][0], 0.5068413965715446111e-7, 1e-12,
678
+ "Celes::c2ibpn", "21")
679
+ vvd(rc2i[1][1], 0.9999999990835075686, 1e-12,
680
+ "Celes::c2ibpn", "22")
681
+ vvd(rc2i[1][2], 0.4281334246452708915e-4, 1e-12,
682
+ "Celes::c2ibpn", "23")
683
+
684
+ vvd(rc2i[2][0], 0.1093465510215479000e-2, 1e-12,
685
+ "Celes::c2ibpn", "31")
686
+ vvd(rc2i[2][1], -0.4281337229063151000e-4, 1e-12,
687
+ "Celes::c2ibpn", "32")
688
+ vvd(rc2i[2][2], 0.9999994012499173103, 1e-12,
689
+ "Celes::c2ibpn", "33")
690
+ end
691
+
692
+ #static void t_c2ixy(int *status)
693
+ #{
694
+ # double x, y, rc2i[3][3]
695
+ #
696
+ #
697
+ # x = 0.5791308486706011000e-3
698
+ # y = 0.4020579816732961219e-4
699
+ #
700
+ # Celes::c2ixy(2400000.5, 53736, x, y, rc2i)
701
+ #
702
+ # vvd(rc2i[0][0], 0.9999998323037157138, 1e-12,
703
+ # "Celes::c2ixy", "11")
704
+ # vvd(rc2i[0][1], 0.5581526349032241205e-9, 1e-12,
705
+ # "Celes::c2ixy", "12")
706
+ # vvd(rc2i[0][2], -0.5791308491611263745e-3, 1e-12,
707
+ # "Celes::c2ixy", "13")
708
+ #
709
+ # vvd(rc2i[1][0], -0.2384257057469842953e-7, 1e-12,
710
+ # "Celes::c2ixy", "21")
711
+ # vvd(rc2i[1][1], 0.9999999991917468964, 1e-12,
712
+ # "Celes::c2ixy", "22")
713
+ # vvd(rc2i[1][2], -0.4020579110172324363e-4, 1e-12,
714
+ # "Celes::c2ixy", "23")
715
+ #
716
+ # vvd(rc2i[2][0], 0.5791308486706011000e-3, 1e-12,
717
+ # "Celes::c2ixy", "31")
718
+ # vvd(rc2i[2][1], 0.4020579816732961219e-4, 1e-12,
719
+ # "Celes::c2ixy", "32")
720
+ # vvd(rc2i[2][2], 0.9999998314954627590, 1e-12,
721
+ # "Celes::c2ixy", "33")
722
+ #
723
+ #}
724
+ def t_c2ixy
725
+ x = 0.5791308486706011000e-3
726
+ y = 0.4020579816732961219e-4
727
+
728
+ rc2i = Celes::c2ixy(2400000.5, 53736, x, y)
729
+
730
+ vvd(rc2i[0][0], 0.9999998323037157138, 1e-12,
731
+ "Celes::c2ixy", "11")
732
+ vvd(rc2i[0][1], 0.5581526349032241205e-9, 1e-12,
733
+ "Celes::c2ixy", "12")
734
+ vvd(rc2i[0][2], -0.5791308491611263745e-3, 1e-12,
735
+ "Celes::c2ixy", "13")
736
+
737
+ vvd(rc2i[1][0], -0.2384257057469842953e-7, 1e-12,
738
+ "Celes::c2ixy", "21")
739
+ vvd(rc2i[1][1], 0.9999999991917468964, 1e-12,
740
+ "Celes::c2ixy", "22")
741
+ vvd(rc2i[1][2], -0.4020579110172324363e-4, 1e-12,
742
+ "Celes::c2ixy", "23")
743
+
744
+ vvd(rc2i[2][0], 0.5791308486706011000e-3, 1e-12,
745
+ "Celes::c2ixy", "31")
746
+ vvd(rc2i[2][1], 0.4020579816732961219e-4, 1e-12,
747
+ "Celes::c2ixy", "32")
748
+ vvd(rc2i[2][2], 0.9999998314954627590, 1e-12,
749
+ "Celes::c2ixy", "33")
750
+ end
751
+
752
+ #static void t_c2ixys(int *status)
753
+ #{
754
+ # double x, y, s, rc2i[3][3]
755
+ #
756
+ #
757
+ # x = 0.5791308486706011000e-3
758
+ # y = 0.4020579816732961219e-4
759
+ # s = -0.1220040848472271978e-7
760
+ #
761
+ # Celes::c2ixys(x, y, s, rc2i)
762
+ #
763
+ # vvd(rc2i[0][0], 0.9999998323037157138, 1e-12,
764
+ # "Celes::c2ixys", "11")
765
+ # vvd(rc2i[0][1], 0.5581984869168499149e-9, 1e-12,
766
+ # "Celes::c2ixys", "12")
767
+ # vvd(rc2i[0][2], -0.5791308491611282180e-3, 1e-12,
768
+ # "Celes::c2ixys", "13")
769
+ #
770
+ # vvd(rc2i[1][0], -0.2384261642670440317e-7, 1e-12,
771
+ # "Celes::c2ixys", "21")
772
+ # vvd(rc2i[1][1], 0.9999999991917468964, 1e-12,
773
+ # "Celes::c2ixys", "22")
774
+ # vvd(rc2i[1][2], -0.4020579110169668931e-4, 1e-12,
775
+ # "Celes::c2ixys", "23")
776
+ #
777
+ # vvd(rc2i[2][0], 0.5791308486706011000e-3, 1e-12,
778
+ # "Celes::c2ixys", "31")
779
+ # vvd(rc2i[2][1], 0.4020579816732961219e-4, 1e-12,
780
+ # "Celes::c2ixys", "32")
781
+ # vvd(rc2i[2][2], 0.9999998314954627590, 1e-12,
782
+ # "Celes::c2ixys", "33")
783
+ #
784
+ #}
785
+ def t_c2ixys
786
+ x = 0.5791308486706011000e-3
787
+ y = 0.4020579816732961219e-4
788
+ s = -0.1220040848472271978e-7
789
+
790
+ rc2i = Celes::c2ixys(x, y, s)
791
+
792
+ vvd(rc2i[0][0], 0.9999998323037157138, 1e-12,
793
+ "Celes::c2ixys", "11")
794
+ vvd(rc2i[0][1], 0.5581984869168499149e-9, 1e-12,
795
+ "Celes::c2ixys", "12")
796
+ vvd(rc2i[0][2], -0.5791308491611282180e-3, 1e-12,
797
+ "Celes::c2ixys", "13")
798
+
799
+ vvd(rc2i[1][0], -0.2384261642670440317e-7, 1e-12,
800
+ "Celes::c2ixys", "21")
801
+ vvd(rc2i[1][1], 0.9999999991917468964, 1e-12,
802
+ "Celes::c2ixys", "22")
803
+ vvd(rc2i[1][2], -0.4020579110169668931e-4, 1e-12,
804
+ "Celes::c2ixys", "23")
805
+
806
+ vvd(rc2i[2][0], 0.5791308486706011000e-3, 1e-12,
807
+ "Celes::c2ixys", "31")
808
+ vvd(rc2i[2][1], 0.4020579816732961219e-4, 1e-12,
809
+ "Celes::c2ixys", "32")
810
+ vvd(rc2i[2][2], 0.9999998314954627590, 1e-12,
811
+ "Celes::c2ixys", "33")
812
+ end
813
+
814
+ #static void t_c2s(int *status)
815
+ #{
816
+ # double p[3], theta, phi
817
+ #
818
+ #
819
+ # p[0] = 100.0
820
+ # p[1] = -50.0
821
+ # p[2] = 25.0
822
+ #
823
+ # Celes::c2s(p, &theta, &phi)
824
+ #
825
+ # vvd(theta, -0.4636476090008061162, 1e-14, "Celes::c2s", "theta")
826
+ # vvd(phi, 0.2199879773954594463, 1e-14, "Celes::c2s", "phi")
827
+ #
828
+ #}
829
+ def t_c2s
830
+ p = []
831
+
832
+ p[0] = 100.0
833
+ p[1] = -50.0
834
+ p[2] = 25.0
835
+
836
+ theta, phi = Celes::c2s(p)
837
+
838
+ vvd(theta, -0.4636476090008061162, 1e-14, "Celes::c2s", "theta")
839
+ vvd(phi, 0.2199879773954594463, 1e-14, "Celes::c2s", "phi")
840
+ end
841
+
842
+ #static void t_c2t00a(int *status)
843
+ #{
844
+ # double tta, ttb, uta, utb, xp, yp, rc2t[3][3]
845
+ #
846
+ #
847
+ # tta = 2400000.5
848
+ # uta = 2400000.5
849
+ # ttb = 53736.0
850
+ # utb = 53736.0
851
+ # xp = 2.55060238e-7
852
+ # yp = 1.860359247e-6
853
+ #
854
+ # Celes::c2t00a(tta, ttb, uta, utb, xp, yp, rc2t)
855
+ #
856
+ # vvd(rc2t[0][0], -0.1810332128307182668, 1e-12,
857
+ # "Celes::c2t00a", "11")
858
+ # vvd(rc2t[0][1], 0.9834769806938457836, 1e-12,
859
+ # "Celes::c2t00a", "12")
860
+ # vvd(rc2t[0][2], 0.6555535638688341725e-4, 1e-12,
861
+ # "Celes::c2t00a", "13")
862
+ #
863
+ # vvd(rc2t[1][0], -0.9834768134135984552, 1e-12,
864
+ # "Celes::c2t00a", "21")
865
+ # vvd(rc2t[1][1], -0.1810332203649520727, 1e-12,
866
+ # "Celes::c2t00a", "22")
867
+ # vvd(rc2t[1][2], 0.5749801116141056317e-3, 1e-12,
868
+ # "Celes::c2t00a", "23")
869
+ #
870
+ # vvd(rc2t[2][0], 0.5773474014081406921e-3, 1e-12,
871
+ # "Celes::c2t00a", "31")
872
+ # vvd(rc2t[2][1], 0.3961832391770163647e-4, 1e-12,
873
+ # "Celes::c2t00a", "32")
874
+ # vvd(rc2t[2][2], 0.9999998325501692289, 1e-12,
875
+ # "Celes::c2t00a", "33")
876
+ #
877
+ #}
878
+ def t_c2t00a
879
+ tta = 2400000.5
880
+ uta = 2400000.5
881
+ ttb = 53736.0
882
+ utb = 53736.0
883
+ xp = 2.55060238e-7
884
+ yp = 1.860359247e-6
885
+
886
+ rc2t = Celes::c2t00a(tta, ttb, uta, utb, xp, yp)
887
+
888
+ vvd(rc2t[0][0], -0.1810332128307182668, 1e-12,
889
+ "Celes::c2t00a", "11")
890
+ vvd(rc2t[0][1], 0.9834769806938457836, 1e-12,
891
+ "Celes::c2t00a", "12")
892
+ vvd(rc2t[0][2], 0.6555535638688341725e-4, 1e-12,
893
+ "Celes::c2t00a", "13")
894
+
895
+ vvd(rc2t[1][0], -0.9834768134135984552, 1e-12,
896
+ "Celes::c2t00a", "21")
897
+ vvd(rc2t[1][1], -0.1810332203649520727, 1e-12,
898
+ "Celes::c2t00a", "22")
899
+ vvd(rc2t[1][2], 0.5749801116141056317e-3, 1e-12,
900
+ "Celes::c2t00a", "23")
901
+
902
+ vvd(rc2t[2][0], 0.5773474014081406921e-3, 1e-12,
903
+ "Celes::c2t00a", "31")
904
+ vvd(rc2t[2][1], 0.3961832391770163647e-4, 1e-12,
905
+ "Celes::c2t00a", "32")
906
+ vvd(rc2t[2][2], 0.9999998325501692289, 1e-12,
907
+ "Celes::c2t00a", "33")
908
+ end
909
+
910
+ #static void t_c2t00b(int *status)
911
+ #{
912
+ # double tta, ttb, uta, utb, xp, yp, rc2t[3][3]
913
+ #
914
+ #
915
+ # tta = 2400000.5
916
+ # uta = 2400000.5
917
+ # ttb = 53736.0
918
+ # utb = 53736.0
919
+ # xp = 2.55060238e-7
920
+ # yp = 1.860359247e-6
921
+ #
922
+ # Celes::c2t00b(tta, ttb, uta, utb, xp, yp, rc2t)
923
+ #
924
+ # vvd(rc2t[0][0], -0.1810332128439678965, 1e-12,
925
+ # "Celes::c2t00b", "11")
926
+ # vvd(rc2t[0][1], 0.9834769806913872359, 1e-12,
927
+ # "Celes::c2t00b", "12")
928
+ # vvd(rc2t[0][2], 0.6555565082458415611e-4, 1e-12,
929
+ # "Celes::c2t00b", "13")
930
+ #
931
+ # vvd(rc2t[1][0], -0.9834768134115435923, 1e-12,
932
+ # "Celes::c2t00b", "21")
933
+ # vvd(rc2t[1][1], -0.1810332203784001946, 1e-12,
934
+ # "Celes::c2t00b", "22")
935
+ # vvd(rc2t[1][2], 0.5749793922030017230e-3, 1e-12,
936
+ # "Celes::c2t00b", "23")
937
+ #
938
+ # vvd(rc2t[2][0], 0.5773467471863534901e-3, 1e-12,
939
+ # "Celes::c2t00b", "31")
940
+ # vvd(rc2t[2][1], 0.3961790411549945020e-4, 1e-12,
941
+ # "Celes::c2t00b", "32")
942
+ # vvd(rc2t[2][2], 0.9999998325505635738, 1e-12,
943
+ # "Celes::c2t00b", "33")
944
+ #
945
+ #}
946
+ def t_c2t00b
947
+ tta = 2400000.5
948
+ uta = 2400000.5
949
+ ttb = 53736.0
950
+ utb = 53736.0
951
+ xp = 2.55060238e-7
952
+ yp = 1.860359247e-6
953
+
954
+ rc2t = Celes::c2t00b(tta, ttb, uta, utb, xp, yp)
955
+
956
+ vvd(rc2t[0][0], -0.1810332128439678965, 1e-12,
957
+ "Celes::c2t00b", "11")
958
+ vvd(rc2t[0][1], 0.9834769806913872359, 1e-12,
959
+ "Celes::c2t00b", "12")
960
+ vvd(rc2t[0][2], 0.6555565082458415611e-4, 1e-12,
961
+ "Celes::c2t00b", "13")
962
+
963
+ vvd(rc2t[1][0], -0.9834768134115435923, 1e-12,
964
+ "Celes::c2t00b", "21")
965
+ vvd(rc2t[1][1], -0.1810332203784001946, 1e-12,
966
+ "Celes::c2t00b", "22")
967
+ vvd(rc2t[1][2], 0.5749793922030017230e-3, 1e-12,
968
+ "Celes::c2t00b", "23")
969
+
970
+ vvd(rc2t[2][0], 0.5773467471863534901e-3, 1e-12,
971
+ "Celes::c2t00b", "31")
972
+ vvd(rc2t[2][1], 0.3961790411549945020e-4, 1e-12,
973
+ "Celes::c2t00b", "32")
974
+ vvd(rc2t[2][2], 0.9999998325505635738, 1e-12,
975
+ "Celes::c2t00b", "33")
976
+ end
977
+
978
+ #static void t_c2t06a(int *status)
979
+ #{
980
+ # double tta, ttb, uta, utb, xp, yp, rc2t[3][3]
981
+ #
982
+ #
983
+ # tta = 2400000.5
984
+ # uta = 2400000.5
985
+ # ttb = 53736.0
986
+ # utb = 53736.0
987
+ # xp = 2.55060238e-7
988
+ # yp = 1.860359247e-6
989
+ #
990
+ # Celes::c2t06a(tta, ttb, uta, utb, xp, yp, rc2t)
991
+ #
992
+ # vvd(rc2t[0][0], -0.1810332128305897282, 1e-12,
993
+ # "Celes::c2t06a", "11")
994
+ # vvd(rc2t[0][1], 0.9834769806938592296, 1e-12,
995
+ # "Celes::c2t06a", "12")
996
+ # vvd(rc2t[0][2], 0.6555550962998436505e-4, 1e-12,
997
+ # "Celes::c2t06a", "13")
998
+ #
999
+ # vvd(rc2t[1][0], -0.9834768134136214897, 1e-12,
1000
+ # "Celes::c2t06a", "21")
1001
+ # vvd(rc2t[1][1], -0.1810332203649130832, 1e-12,
1002
+ # "Celes::c2t06a", "22")
1003
+ # vvd(rc2t[1][2], 0.5749800844905594110e-3, 1e-12,
1004
+ # "Celes::c2t06a", "23")
1005
+ #
1006
+ # vvd(rc2t[2][0], 0.5773474024748545878e-3, 1e-12,
1007
+ # "Celes::c2t06a", "31")
1008
+ # vvd(rc2t[2][1], 0.3961816829632690581e-4, 1e-12,
1009
+ # "Celes::c2t06a", "32")
1010
+ # vvd(rc2t[2][2], 0.9999998325501747785, 1e-12,
1011
+ # "Celes::c2t06a", "33")
1012
+ #
1013
+ #}
1014
+ def t_c2t06a
1015
+ tta = 2400000.5
1016
+ uta = 2400000.5
1017
+ ttb = 53736.0
1018
+ utb = 53736.0
1019
+ xp = 2.55060238e-7
1020
+ yp = 1.860359247e-6
1021
+
1022
+ rc2t = Celes::c2t06a(tta, ttb, uta, utb, xp, yp)
1023
+
1024
+ vvd(rc2t[0][0], -0.1810332128305897282, 1e-12,
1025
+ "Celes::c2t06a", "11")
1026
+ vvd(rc2t[0][1], 0.9834769806938592296, 1e-12,
1027
+ "Celes::c2t06a", "12")
1028
+ vvd(rc2t[0][2], 0.6555550962998436505e-4, 1e-12,
1029
+ "Celes::c2t06a", "13")
1030
+
1031
+ vvd(rc2t[1][0], -0.9834768134136214897, 1e-12,
1032
+ "Celes::c2t06a", "21")
1033
+ vvd(rc2t[1][1], -0.1810332203649130832, 1e-12,
1034
+ "Celes::c2t06a", "22")
1035
+ vvd(rc2t[1][2], 0.5749800844905594110e-3, 1e-12,
1036
+ "Celes::c2t06a", "23")
1037
+
1038
+ vvd(rc2t[2][0], 0.5773474024748545878e-3, 1e-12,
1039
+ "Celes::c2t06a", "31")
1040
+ vvd(rc2t[2][1], 0.3961816829632690581e-4, 1e-12,
1041
+ "Celes::c2t06a", "32")
1042
+ vvd(rc2t[2][2], 0.9999998325501747785, 1e-12,
1043
+ "Celes::c2t06a", "33")
1044
+ end
1045
+
1046
+ #static void t_c2tcio(int *status)
1047
+ #{
1048
+ # double rc2i[3][3], era, rpom[3][3], rc2t[3][3]
1049
+ #
1050
+ #
1051
+ # rc2i[0][0] = 0.9999998323037164738
1052
+ # rc2i[0][1] = 0.5581526271714303683e-9
1053
+ # rc2i[0][2] = -0.5791308477073443903e-3
1054
+ #
1055
+ # rc2i[1][0] = -0.2384266227524722273e-7
1056
+ # rc2i[1][1] = 0.9999999991917404296
1057
+ # rc2i[1][2] = -0.4020594955030704125e-4
1058
+ #
1059
+ # rc2i[2][0] = 0.5791308472168153320e-3
1060
+ # rc2i[2][1] = 0.4020595661593994396e-4
1061
+ # rc2i[2][2] = 0.9999998314954572365
1062
+ #
1063
+ # era = 1.75283325530307
1064
+ #
1065
+ # rpom[0][0] = 0.9999999999999674705
1066
+ # rpom[0][1] = -0.1367174580728847031e-10
1067
+ # rpom[0][2] = 0.2550602379999972723e-6
1068
+ #
1069
+ # rpom[1][0] = 0.1414624947957029721e-10
1070
+ # rpom[1][1] = 0.9999999999982694954
1071
+ # rpom[1][2] = -0.1860359246998866338e-5
1072
+ #
1073
+ # rpom[2][0] = -0.2550602379741215275e-6
1074
+ # rpom[2][1] = 0.1860359247002413923e-5
1075
+ # rpom[2][2] = 0.9999999999982369658
1076
+ #
1077
+ #
1078
+ # Celes::c2tcio(rc2i, era, rpom, rc2t)
1079
+ #
1080
+ # vvd(rc2t[0][0], -0.1810332128307110439, 1e-12,
1081
+ # "Celes::c2tcio", "11")
1082
+ # vvd(rc2t[0][1], 0.9834769806938470149, 1e-12,
1083
+ # "Celes::c2tcio", "12")
1084
+ # vvd(rc2t[0][2], 0.6555535638685466874e-4, 1e-12,
1085
+ # "Celes::c2tcio", "13")
1086
+ #
1087
+ # vvd(rc2t[1][0], -0.9834768134135996657, 1e-12,
1088
+ # "Celes::c2tcio", "21")
1089
+ # vvd(rc2t[1][1], -0.1810332203649448367, 1e-12,
1090
+ # "Celes::c2tcio", "22")
1091
+ # vvd(rc2t[1][2], 0.5749801116141106528e-3, 1e-12,
1092
+ # "Celes::c2tcio", "23")
1093
+ #
1094
+ # vvd(rc2t[2][0], 0.5773474014081407076e-3, 1e-12,
1095
+ # "Celes::c2tcio", "31")
1096
+ # vvd(rc2t[2][1], 0.3961832391772658944e-4, 1e-12,
1097
+ # "Celes::c2tcio", "32")
1098
+ # vvd(rc2t[2][2], 0.9999998325501691969, 1e-12,
1099
+ # "Celes::c2tcio", "33")
1100
+ #
1101
+ #}
1102
+ def t_c2tcio
1103
+ rc2i = [[], [], []]
1104
+ rpom = [[], [], []]
1105
+
1106
+ rc2i[0][0] = 0.9999998323037164738
1107
+ rc2i[0][1] = 0.5581526271714303683e-9
1108
+ rc2i[0][2] = -0.5791308477073443903e-3
1109
+
1110
+ rc2i[1][0] = -0.2384266227524722273e-7
1111
+ rc2i[1][1] = 0.9999999991917404296
1112
+ rc2i[1][2] = -0.4020594955030704125e-4
1113
+
1114
+ rc2i[2][0] = 0.5791308472168153320e-3
1115
+ rc2i[2][1] = 0.4020595661593994396e-4
1116
+ rc2i[2][2] = 0.9999998314954572365
1117
+
1118
+ era = 1.75283325530307
1119
+
1120
+ rpom[0][0] = 0.9999999999999674705
1121
+ rpom[0][1] = -0.1367174580728847031e-10
1122
+ rpom[0][2] = 0.2550602379999972723e-6
1123
+
1124
+ rpom[1][0] = 0.1414624947957029721e-10
1125
+ rpom[1][1] = 0.9999999999982694954
1126
+ rpom[1][2] = -0.1860359246998866338e-5
1127
+
1128
+ rpom[2][0] = -0.2550602379741215275e-6
1129
+ rpom[2][1] = 0.1860359247002413923e-5
1130
+ rpom[2][2] = 0.9999999999982369658
1131
+
1132
+
1133
+ rc2t = Celes::c2tcio(rc2i, era, rpom)
1134
+
1135
+ vvd(rc2t[0][0], -0.1810332128307110439, 1e-12,
1136
+ "Celes::c2tcio", "11")
1137
+ vvd(rc2t[0][1], 0.9834769806938470149, 1e-12,
1138
+ "Celes::c2tcio", "12")
1139
+ vvd(rc2t[0][2], 0.6555535638685466874e-4, 1e-12,
1140
+ "Celes::c2tcio", "13")
1141
+
1142
+ vvd(rc2t[1][0], -0.9834768134135996657, 1e-12,
1143
+ "Celes::c2tcio", "21")
1144
+ vvd(rc2t[1][1], -0.1810332203649448367, 1e-12,
1145
+ "Celes::c2tcio", "22")
1146
+ vvd(rc2t[1][2], 0.5749801116141106528e-3, 1e-12,
1147
+ "Celes::c2tcio", "23")
1148
+
1149
+ vvd(rc2t[2][0], 0.5773474014081407076e-3, 1e-12,
1150
+ "Celes::c2tcio", "31")
1151
+ vvd(rc2t[2][1], 0.3961832391772658944e-4, 1e-12,
1152
+ "Celes::c2tcio", "32")
1153
+ vvd(rc2t[2][2], 0.9999998325501691969, 1e-12,
1154
+ "Celes::c2tcio", "33")
1155
+ end
1156
+
1157
+ #static void t_c2teqx(int *status)
1158
+ #{
1159
+ # double rbpn[3][3], gst, rpom[3][3], rc2t[3][3]
1160
+ #
1161
+ #
1162
+ # rbpn[0][0] = 0.9999989440476103608
1163
+ # rbpn[0][1] = -0.1332881761240011518e-2
1164
+ # rbpn[0][2] = -0.5790767434730085097e-3
1165
+ #
1166
+ # rbpn[1][0] = 0.1332858254308954453e-2
1167
+ # rbpn[1][1] = 0.9999991109044505944
1168
+ # rbpn[1][2] = -0.4097782710401555759e-4
1169
+ #
1170
+ # rbpn[2][0] = 0.5791308472168153320e-3
1171
+ # rbpn[2][1] = 0.4020595661593994396e-4
1172
+ # rbpn[2][2] = 0.9999998314954572365
1173
+ #
1174
+ # gst = 1.754166138040730516
1175
+ #
1176
+ # rpom[0][0] = 0.9999999999999674705
1177
+ # rpom[0][1] = -0.1367174580728847031e-10
1178
+ # rpom[0][2] = 0.2550602379999972723e-6
1179
+ #
1180
+ # rpom[1][0] = 0.1414624947957029721e-10
1181
+ # rpom[1][1] = 0.9999999999982694954
1182
+ # rpom[1][2] = -0.1860359246998866338e-5
1183
+ #
1184
+ # rpom[2][0] = -0.2550602379741215275e-6
1185
+ # rpom[2][1] = 0.1860359247002413923e-5
1186
+ # rpom[2][2] = 0.9999999999982369658
1187
+ #
1188
+ # Celes::c2teqx(rbpn, gst, rpom, rc2t)
1189
+ #
1190
+ # vvd(rc2t[0][0], -0.1810332128528685730, 1e-12,
1191
+ # "Celes::c2teqx", "11")
1192
+ # vvd(rc2t[0][1], 0.9834769806897685071, 1e-12,
1193
+ # "Celes::c2teqx", "12")
1194
+ # vvd(rc2t[0][2], 0.6555535639982634449e-4, 1e-12,
1195
+ # "Celes::c2teqx", "13")
1196
+ #
1197
+ # vvd(rc2t[1][0], -0.9834768134095211257, 1e-12,
1198
+ # "Celes::c2teqx", "21")
1199
+ # vvd(rc2t[1][1], -0.1810332203871023800, 1e-12,
1200
+ # "Celes::c2teqx", "22")
1201
+ # vvd(rc2t[1][2], 0.5749801116126438962e-3, 1e-12,
1202
+ # "Celes::c2teqx", "23")
1203
+ #
1204
+ # vvd(rc2t[2][0], 0.5773474014081539467e-3, 1e-12,
1205
+ # "Celes::c2teqx", "31")
1206
+ # vvd(rc2t[2][1], 0.3961832391768640871e-4, 1e-12,
1207
+ # "Celes::c2teqx", "32")
1208
+ # vvd(rc2t[2][2], 0.9999998325501691969, 1e-12,
1209
+ # "Celes::c2teqx", "33")
1210
+ #
1211
+ #}
1212
+ def t_c2teqx
1213
+ rbpn = [[], [], []]
1214
+ rpom = [[], [], []]
1215
+
1216
+ rbpn[0][0] = 0.9999989440476103608
1217
+ rbpn[0][1] = -0.1332881761240011518e-2
1218
+ rbpn[0][2] = -0.5790767434730085097e-3
1219
+
1220
+ rbpn[1][0] = 0.1332858254308954453e-2
1221
+ rbpn[1][1] = 0.9999991109044505944
1222
+ rbpn[1][2] = -0.4097782710401555759e-4
1223
+
1224
+ rbpn[2][0] = 0.5791308472168153320e-3
1225
+ rbpn[2][1] = 0.4020595661593994396e-4
1226
+ rbpn[2][2] = 0.9999998314954572365
1227
+
1228
+ gst = 1.754166138040730516
1229
+
1230
+ rpom[0][0] = 0.9999999999999674705
1231
+ rpom[0][1] = -0.1367174580728847031e-10
1232
+ rpom[0][2] = 0.2550602379999972723e-6
1233
+
1234
+ rpom[1][0] = 0.1414624947957029721e-10
1235
+ rpom[1][1] = 0.9999999999982694954
1236
+ rpom[1][2] = -0.1860359246998866338e-5
1237
+
1238
+ rpom[2][0] = -0.2550602379741215275e-6
1239
+ rpom[2][1] = 0.1860359247002413923e-5
1240
+ rpom[2][2] = 0.9999999999982369658
1241
+
1242
+ rc2t = Celes::c2teqx(rbpn, gst, rpom)
1243
+
1244
+ vvd(rc2t[0][0], -0.1810332128528685730, 1e-12,
1245
+ "Celes::c2teqx", "11")
1246
+ vvd(rc2t[0][1], 0.9834769806897685071, 1e-12,
1247
+ "Celes::c2teqx", "12")
1248
+ vvd(rc2t[0][2], 0.6555535639982634449e-4, 1e-12,
1249
+ "Celes::c2teqx", "13")
1250
+
1251
+ vvd(rc2t[1][0], -0.9834768134095211257, 1e-12,
1252
+ "Celes::c2teqx", "21")
1253
+ vvd(rc2t[1][1], -0.1810332203871023800, 1e-12,
1254
+ "Celes::c2teqx", "22")
1255
+ vvd(rc2t[1][2], 0.5749801116126438962e-3, 1e-12,
1256
+ "Celes::c2teqx", "23")
1257
+
1258
+ vvd(rc2t[2][0], 0.5773474014081539467e-3, 1e-12,
1259
+ "Celes::c2teqx", "31")
1260
+ vvd(rc2t[2][1], 0.3961832391768640871e-4, 1e-12,
1261
+ "Celes::c2teqx", "32")
1262
+ vvd(rc2t[2][2], 0.9999998325501691969, 1e-12,
1263
+ "Celes::c2teqx", "33")
1264
+ end
1265
+
1266
+ #static void t_c2tpe(int *status)
1267
+ #{
1268
+ # double tta, ttb, uta, utb, dpsi, deps, xp, yp, rc2t[3][3]
1269
+ #
1270
+ #
1271
+ # tta = 2400000.5
1272
+ # uta = 2400000.5
1273
+ # ttb = 53736.0
1274
+ # utb = 53736.0
1275
+ # deps = 0.4090789763356509900
1276
+ # dpsi = -0.9630909107115582393e-5
1277
+ # xp = 2.55060238e-7
1278
+ # yp = 1.860359247e-6
1279
+ #
1280
+ # Celes::c2tpe(tta, ttb, uta, utb, dpsi, deps, xp, yp, rc2t)
1281
+ #
1282
+ # vvd(rc2t[0][0], -0.1813677995763029394, 1e-12,
1283
+ # "Celes::c2tpe", "11")
1284
+ # vvd(rc2t[0][1], 0.9023482206891683275, 1e-12,
1285
+ # "Celes::c2tpe", "12")
1286
+ # vvd(rc2t[0][2], -0.3909902938641085751, 1e-12,
1287
+ # "Celes::c2tpe", "13")
1288
+ #
1289
+ # vvd(rc2t[1][0], -0.9834147641476804807, 1e-12,
1290
+ # "Celes::c2tpe", "21")
1291
+ # vvd(rc2t[1][1], -0.1659883635434995121, 1e-12,
1292
+ # "Celes::c2tpe", "22")
1293
+ # vvd(rc2t[1][2], 0.7309763898042819705e-1, 1e-12,
1294
+ # "Celes::c2tpe", "23")
1295
+ #
1296
+ # vvd(rc2t[2][0], 0.1059685430673215247e-2, 1e-12,
1297
+ # "Celes::c2tpe", "31")
1298
+ # vvd(rc2t[2][1], 0.3977631855605078674, 1e-12,
1299
+ # "Celes::c2tpe", "32")
1300
+ # vvd(rc2t[2][2], 0.9174875068792735362, 1e-12,
1301
+ # "Celes::c2tpe", "33")
1302
+ #
1303
+ #}
1304
+ def t_c2tpe
1305
+ tta = 2400000.5
1306
+ uta = 2400000.5
1307
+ ttb = 53736.0
1308
+ utb = 53736.0
1309
+ deps = 0.4090789763356509900
1310
+ dpsi = -0.9630909107115582393e-5
1311
+ xp = 2.55060238e-7
1312
+ yp = 1.860359247e-6
1313
+
1314
+ rc2t = Celes::c2tpe(tta, ttb, uta, utb, dpsi, deps, xp, yp)
1315
+
1316
+ vvd(rc2t[0][0], -0.1813677995763029394, 1e-12,
1317
+ "Celes::c2tpe", "11")
1318
+ vvd(rc2t[0][1], 0.9023482206891683275, 1e-12,
1319
+ "Celes::c2tpe", "12")
1320
+ vvd(rc2t[0][2], -0.3909902938641085751, 1e-12,
1321
+ "Celes::c2tpe", "13")
1322
+
1323
+ vvd(rc2t[1][0], -0.9834147641476804807, 1e-12,
1324
+ "Celes::c2tpe", "21")
1325
+ vvd(rc2t[1][1], -0.1659883635434995121, 1e-12,
1326
+ "Celes::c2tpe", "22")
1327
+ vvd(rc2t[1][2], 0.7309763898042819705e-1, 1e-12,
1328
+ "Celes::c2tpe", "23")
1329
+
1330
+ vvd(rc2t[2][0], 0.1059685430673215247e-2, 1e-12,
1331
+ "Celes::c2tpe", "31")
1332
+ vvd(rc2t[2][1], 0.3977631855605078674, 1e-12,
1333
+ "Celes::c2tpe", "32")
1334
+ vvd(rc2t[2][2], 0.9174875068792735362, 1e-12,
1335
+ "Celes::c2tpe", "33")
1336
+ end
1337
+
1338
+ #static void t_c2txy(int *status)
1339
+ #{
1340
+ # double tta, ttb, uta, utb, x, y, xp, yp, rc2t[3][3]
1341
+ #
1342
+ #
1343
+ # tta = 2400000.5
1344
+ # uta = 2400000.5
1345
+ # ttb = 53736.0
1346
+ # utb = 53736.0
1347
+ # x = 0.5791308486706011000e-3
1348
+ # y = 0.4020579816732961219e-4
1349
+ # xp = 2.55060238e-7
1350
+ # yp = 1.860359247e-6
1351
+ #
1352
+ # Celes::c2txy(tta, ttb, uta, utb, x, y, xp, yp, rc2t)
1353
+ #
1354
+ # vvd(rc2t[0][0], -0.1810332128306279253, 1e-12,
1355
+ # "Celes::c2txy", "11")
1356
+ # vvd(rc2t[0][1], 0.9834769806938520084, 1e-12,
1357
+ # "Celes::c2txy", "12")
1358
+ # vvd(rc2t[0][2], 0.6555551248057665829e-4, 1e-12,
1359
+ # "Celes::c2txy", "13")
1360
+ #
1361
+ # vvd(rc2t[1][0], -0.9834768134136142314, 1e-12,
1362
+ # "Celes::c2txy", "21")
1363
+ # vvd(rc2t[1][1], -0.1810332203649529312, 1e-12,
1364
+ # "Celes::c2txy", "22")
1365
+ # vvd(rc2t[1][2], 0.5749800843594139912e-3, 1e-12,
1366
+ # "Celes::c2txy", "23")
1367
+ #
1368
+ # vvd(rc2t[2][0], 0.5773474028619264494e-3, 1e-12,
1369
+ # "Celes::c2txy", "31")
1370
+ # vvd(rc2t[2][1], 0.3961816546911624260e-4, 1e-12,
1371
+ # "Celes::c2txy", "32")
1372
+ # vvd(rc2t[2][2], 0.9999998325501746670, 1e-12,
1373
+ # "Celes::c2txy", "33")
1374
+ #
1375
+ #}
1376
+ def t_c2txy
1377
+ tta = 2400000.5
1378
+ uta = 2400000.5
1379
+ ttb = 53736.0
1380
+ utb = 53736.0
1381
+ x = 0.5791308486706011000e-3
1382
+ y = 0.4020579816732961219e-4
1383
+ xp = 2.55060238e-7
1384
+ yp = 1.860359247e-6
1385
+
1386
+ rc2t = Celes::c2txy(tta, ttb, uta, utb, x, y, xp, yp)
1387
+
1388
+ vvd(rc2t[0][0], -0.1810332128306279253, 1e-12,
1389
+ "Celes::c2txy", "11")
1390
+ vvd(rc2t[0][1], 0.9834769806938520084, 1e-12,
1391
+ "Celes::c2txy", "12")
1392
+ vvd(rc2t[0][2], 0.6555551248057665829e-4, 1e-12,
1393
+ "Celes::c2txy", "13")
1394
+
1395
+ vvd(rc2t[1][0], -0.9834768134136142314, 1e-12,
1396
+ "Celes::c2txy", "21")
1397
+ vvd(rc2t[1][1], -0.1810332203649529312, 1e-12,
1398
+ "Celes::c2txy", "22")
1399
+ vvd(rc2t[1][2], 0.5749800843594139912e-3, 1e-12,
1400
+ "Celes::c2txy", "23")
1401
+
1402
+ vvd(rc2t[2][0], 0.5773474028619264494e-3, 1e-12,
1403
+ "Celes::c2txy", "31")
1404
+ vvd(rc2t[2][1], 0.3961816546911624260e-4, 1e-12,
1405
+ "Celes::c2txy", "32")
1406
+ vvd(rc2t[2][2], 0.9999998325501746670, 1e-12,
1407
+ "Celes::c2txy", "33")
1408
+ end
1409
+
1410
+ #static void t_cal2jd(int *status)
1411
+ #{
1412
+ # int j
1413
+ # double djm0, djm
1414
+ #
1415
+ #
1416
+ # j = Celes::cal2jd(2003, 06, 01, &djm0, &djm)
1417
+ #
1418
+ # vvd(djm0, 2400000.5, 0.0, "Celes::cal2jd", "djm0")
1419
+ # vvd(djm, 52791.0, 0.0, "Celes::cal2jd", "djm")
1420
+ #
1421
+ # viv(j, 0, "Celes::cal2jd", "j")
1422
+ #
1423
+ #}
1424
+ def t_cal2jd
1425
+ djm0, djm = Celes::cal2jd(2003, 6, 1)
1426
+
1427
+ vvd(djm0, 2400000.5, 0.0, "Celes::cal2jd", "djm0")
1428
+ vvd(djm, 52791.0, 0.0, "Celes::cal2jd", "djm")
1429
+
1430
+ viv(Celes::status, 0, "Celes::cal2jd", "j")
1431
+ end
1432
+
1433
+ #static void t_cp(int *status)
1434
+ #{
1435
+ # double p[3], c[3]
1436
+ #
1437
+ #
1438
+ # p[0] = 0.3
1439
+ # p[1] = 1.2
1440
+ # p[2] = -2.5
1441
+ #
1442
+ # Celes::cp(p, c)
1443
+ #
1444
+ # vvd(c[0], 0.3, 0.0, "Celes::cp", "1")
1445
+ # vvd(c[1], 1.2, 0.0, "Celes::cp", "2")
1446
+ # vvd(c[2], -2.5, 0.0, "Celes::cp", "3")
1447
+ #}
1448
+ def t_cp
1449
+ p = []
1450
+
1451
+ p[0] = 0.3
1452
+ p[1] = 1.2
1453
+ p[2] = -2.5
1454
+
1455
+ c = Celes::cp(p)
1456
+
1457
+ vvd(c[0], 0.3, 0.0, "Celes::cp", "1")
1458
+ vvd(c[1], 1.2, 0.0, "Celes::cp", "2")
1459
+ vvd(c[2], -2.5, 0.0, "Celes::cp", "3")
1460
+ end
1461
+
1462
+ #static void t_cpv(int *status)
1463
+ #{
1464
+ # double pv[2][3], c[2][3]
1465
+ #
1466
+ #
1467
+ # pv[0][0] = 0.3
1468
+ # pv[0][1] = 1.2
1469
+ # pv[0][2] = -2.5
1470
+ #
1471
+ # pv[1][0] = -0.5
1472
+ # pv[1][1] = 3.1
1473
+ # pv[1][2] = 0.9
1474
+ #
1475
+ # Celes::cpv(pv, c)
1476
+ #
1477
+ # vvd(c[0][0], 0.3, 0.0, "Celes::cpv", "p1")
1478
+ # vvd(c[0][1], 1.2, 0.0, "Celes::cpv", "p2")
1479
+ # vvd(c[0][2], -2.5, 0.0, "Celes::cpv", "p3")
1480
+ #
1481
+ # vvd(c[1][0], -0.5, 0.0, "Celes::cpv", "v1")
1482
+ # vvd(c[1][1], 3.1, 0.0, "Celes::cpv", "v2")
1483
+ # vvd(c[1][2], 0.9, 0.0, "Celes::cpv", "v3")
1484
+ #
1485
+ #}
1486
+ def t_cpv
1487
+ pv = [[], []]
1488
+
1489
+ pv[0][0] = 0.3
1490
+ pv[0][1] = 1.2
1491
+ pv[0][2] = -2.5
1492
+
1493
+ pv[1][0] = -0.5
1494
+ pv[1][1] = 3.1
1495
+ pv[1][2] = 0.9
1496
+
1497
+ c = Celes::cpv(pv)
1498
+
1499
+ vvd(c[0][0], 0.3, 0.0, "Celes::cpv", "p1")
1500
+ vvd(c[0][1], 1.2, 0.0, "Celes::cpv", "p2")
1501
+ vvd(c[0][2], -2.5, 0.0, "Celes::cpv", "p3")
1502
+
1503
+ vvd(c[1][0], -0.5, 0.0, "Celes::cpv", "v1")
1504
+ vvd(c[1][1], 3.1, 0.0, "Celes::cpv", "v2")
1505
+ vvd(c[1][2], 0.9, 0.0, "Celes::cpv", "v3")
1506
+ end
1507
+
1508
+ #static void t_cr(int *status)
1509
+ #{
1510
+ # double r[3][3], c[3][3]
1511
+ #
1512
+ #
1513
+ # r[0][0] = 2.0
1514
+ # r[0][1] = 3.0
1515
+ # r[0][2] = 2.0
1516
+ #
1517
+ # r[1][0] = 3.0
1518
+ # r[1][1] = 2.0
1519
+ # r[1][2] = 3.0
1520
+ #
1521
+ # r[2][0] = 3.0
1522
+ # r[2][1] = 4.0
1523
+ # r[2][2] = 5.0
1524
+ #
1525
+ # Celes::cr(r, c)
1526
+ #
1527
+ # vvd(c[0][0], 2.0, 0.0, "Celes::cr", "11")
1528
+ # vvd(c[0][1], 3.0, 0.0, "Celes::cr", "12")
1529
+ # vvd(c[0][2], 2.0, 0.0, "Celes::cr", "13")
1530
+ #
1531
+ # vvd(c[1][0], 3.0, 0.0, "Celes::cr", "21")
1532
+ # vvd(c[1][1], 2.0, 0.0, "Celes::cr", "22")
1533
+ # vvd(c[1][2], 3.0, 0.0, "Celes::cr", "23")
1534
+ #
1535
+ # vvd(c[2][0], 3.0, 0.0, "Celes::cr", "31")
1536
+ # vvd(c[2][1], 4.0, 0.0, "Celes::cr", "32")
1537
+ # vvd(c[2][2], 5.0, 0.0, "Celes::cr", "33")
1538
+ #}
1539
+ def t_cr
1540
+ r = [[], [], []]
1541
+
1542
+ r[0][0] = 2.0
1543
+ r[0][1] = 3.0
1544
+ r[0][2] = 2.0
1545
+
1546
+ r[1][0] = 3.0
1547
+ r[1][1] = 2.0
1548
+ r[1][2] = 3.0
1549
+
1550
+ r[2][0] = 3.0
1551
+ r[2][1] = 4.0
1552
+ r[2][2] = 5.0
1553
+
1554
+ c = Celes::cr(r)
1555
+
1556
+ vvd(c[0][0], 2.0, 0.0, "Celes::cr", "11")
1557
+ vvd(c[0][1], 3.0, 0.0, "Celes::cr", "12")
1558
+ vvd(c[0][2], 2.0, 0.0, "Celes::cr", "13")
1559
+
1560
+ vvd(c[1][0], 3.0, 0.0, "Celes::cr", "21")
1561
+ vvd(c[1][1], 2.0, 0.0, "Celes::cr", "22")
1562
+ vvd(c[1][2], 3.0, 0.0, "Celes::cr", "23")
1563
+
1564
+ vvd(c[2][0], 3.0, 0.0, "Celes::cr", "31")
1565
+ vvd(c[2][1], 4.0, 0.0, "Celes::cr", "32")
1566
+ vvd(c[2][2], 5.0, 0.0, "Celes::cr", "33")
1567
+ end
1568
+
1569
+ #static void t_d2dtf(int *status )
1570
+ #{
1571
+ # int j, iy, im, id, ihmsf[4]
1572
+ #
1573
+ #
1574
+ # j = Celes::d2dtf("UTC", 5, 2400000.5, 49533.99999, &iy, &im, &id, ihmsf)
1575
+ #
1576
+ # viv(iy, 1994, "Celes::d2dtf", "y")
1577
+ # viv(im, 6, "Celes::d2dtf", "mo")
1578
+ # viv(id, 30, "Celes::d2dtf", "d")
1579
+ # viv(ihmsf[0], 23, "Celes::d2dtf", "h")
1580
+ # viv(ihmsf[1], 59, "Celes::d2dtf", "m")
1581
+ # viv(ihmsf[2], 60, "Celes::d2dtf", "s")
1582
+ # viv(ihmsf[3], 13599, "Celes::d2dtf", "f")
1583
+ # viv(j, 0, "Celes::d2dtf", "j")
1584
+ #
1585
+ #}
1586
+ def t_d2dtf
1587
+ iy, im, id, ihmsf = Celes::d2dtf("UTC", 5, 2400000.5, 49533.99999)
1588
+
1589
+ viv(iy, 1994, "Celes::d2dtf", "y")
1590
+ viv(im, 6, "Celes::d2dtf", "mo")
1591
+ viv(id, 30, "Celes::d2dtf", "d")
1592
+ viv(ihmsf[0], 23, "Celes::d2dtf", "h")
1593
+ viv(ihmsf[1], 59, "Celes::d2dtf", "m")
1594
+ viv(ihmsf[2], 60, "Celes::d2dtf", "s")
1595
+ viv(ihmsf[3], 13599, "Celes::d2dtf", "f")
1596
+ viv(Celes::status, 0, "Celes::d2dtf", "j")
1597
+ end
1598
+
1599
+ #static void t_d2tf(int *status)
1600
+ #{
1601
+ # int ihmsf[4]
1602
+ # char s
1603
+ #
1604
+ #
1605
+ # Celes::d2tf(4, -0.987654321, &s, ihmsf)
1606
+ #
1607
+ # viv((int)s, '-', "Celes::d2tf", "s")
1608
+ #
1609
+ # viv(ihmsf[0], 23, "Celes::d2tf", "0")
1610
+ # viv(ihmsf[1], 42, "Celes::d2tf", "1")
1611
+ # viv(ihmsf[2], 13, "Celes::d2tf", "2")
1612
+ # viv(ihmsf[3], 3333, "Celes::d2tf", "3")
1613
+ #
1614
+ #}
1615
+ def t_d2tf
1616
+ s, ihmsf = Celes::d2tf(4, -0.987654321)
1617
+
1618
+ viv(s.ord, '-'.ord, "Celes::d2tf", "s")
1619
+
1620
+ viv(ihmsf[0], 23, "Celes::d2tf", "0")
1621
+ viv(ihmsf[1], 42, "Celes::d2tf", "1")
1622
+ viv(ihmsf[2], 13, "Celes::d2tf", "2")
1623
+ viv(ihmsf[3], 3333, "Celes::d2tf", "3")
1624
+ end
1625
+
1626
+ #static void t_dat(int *status)
1627
+ #{
1628
+ # int j
1629
+ # double deltat
1630
+ #
1631
+ #
1632
+ # j = Celes::dat(2003, 6, 1, 0.0, &deltat)
1633
+ #
1634
+ # vvd(deltat, 32.0, 0.0, "Celes::dat", "d1")
1635
+ # viv(j, 0, "Celes::dat", "j1")
1636
+ #
1637
+ # j = Celes::dat(2008, 1, 17, 0.0, &deltat)
1638
+ #
1639
+ # vvd(deltat, 33.0, 0.0, "Celes::dat", "d2")
1640
+ # viv(j, 0, "Celes::dat", "j2")
1641
+ #
1642
+ #}
1643
+ def t_dat
1644
+ deltat = Celes::dat(2003, 6, 1, 0.0)
1645
+
1646
+ vvd(deltat, 32.0, 0.0, "Celes::dat", "d1")
1647
+ viv(Celes::status, 0, "Celes::dat", "j1")
1648
+
1649
+ deltat = Celes::dat(2008, 1, 17, 0.0)
1650
+
1651
+ vvd(deltat, 33.0, 0.0, "Celes::dat", "d2")
1652
+ viv(Celes::status, 0, "Celes::dat", "j2")
1653
+ end
1654
+
1655
+ #static void t_dtdb(int *status)
1656
+ #{
1657
+ # double dtdb
1658
+ #
1659
+ #
1660
+ # dtdb = Celes::dtdb(2448939.5, 0.123, 0.76543, 5.0123, 5525.242, 3190.0)
1661
+ #
1662
+ # vvd(dtdb, -0.1280368005936998991e-2, 1e-15, "Celes::dtdb", "")
1663
+ #
1664
+ #}
1665
+ def t_dtdb
1666
+ dtdb = Celes::dtdb(2448939.5, 0.123, 0.76543, 5.0123, 5525.242, 3190.0)
1667
+
1668
+ vvd(dtdb, -0.1280368005936998991e-2, 1e-15, "Celes::dtdb", "")
1669
+ end
1670
+
1671
+ #static void t_dtf2d(int *status)
1672
+ #{
1673
+ # double u1, u2
1674
+ # int j
1675
+ #
1676
+ #
1677
+ # j = Celes::dtf2d("UTC", 1994, 6, 30, 23, 59, 60.13599, &u1, &u2)
1678
+ #
1679
+ # vvd(u1+u2, 2449534.49999, 1e-6, "Celes::dtf2d", "u")
1680
+ # viv(j, 0, "Celes::dtf2d", "j")
1681
+ #
1682
+ #}
1683
+ def t_dtf2d
1684
+ u1, u2 = Celes::dtf2d("UTC", 1994, 6, 30, 23, 59, 60.13599)
1685
+
1686
+ vvd(u1+u2, 2449534.49999, 1e-6, "Celes::dtf2d", "u")
1687
+ viv(Celes::status, 0, "Celes::dtf2d", "j")
1688
+ end
1689
+
1690
+ #static void t_ee00(int *status)
1691
+ #{
1692
+ # double epsa, dpsi, ee
1693
+ #
1694
+ #
1695
+ # epsa = 0.4090789763356509900
1696
+ # dpsi = -0.9630909107115582393e-5
1697
+ #
1698
+ # ee = Celes::ee00(2400000.5, 53736.0, epsa, dpsi)
1699
+ #
1700
+ # vvd(ee, -0.8834193235367965479e-5, 1e-18, "Celes::ee00", "")
1701
+ #
1702
+ #}
1703
+ def t_ee00
1704
+ epsa = 0.4090789763356509900
1705
+ dpsi = -0.9630909107115582393e-5
1706
+
1707
+ ee = Celes::ee00(2400000.5, 53736.0, epsa, dpsi)
1708
+
1709
+ vvd(ee, -0.8834193235367965479e-5, 1e-18, "Celes::ee00", "")
1710
+ end
1711
+
1712
+ #static void t_ee00a(int *status)
1713
+ #{
1714
+ # double ee
1715
+ #
1716
+ #
1717
+ # ee = Celes::ee00a(2400000.5, 53736.0)
1718
+ #
1719
+ # vvd(ee, -0.8834192459222588227e-5, 1e-18, "Celes::ee00a", "")
1720
+ #
1721
+ #}
1722
+ def t_ee00a
1723
+ ee = Celes::ee00a(2400000.5, 53736.0)
1724
+
1725
+ vvd(ee, -0.8834192459222588227e-5, 1e-18, "Celes::ee00a", "")
1726
+ end
1727
+
1728
+ #static void t_ee00b(int *status)
1729
+ #{
1730
+ # double ee
1731
+ #
1732
+ #
1733
+ # ee = Celes::ee00b(2400000.5, 53736.0)
1734
+ #
1735
+ # vvd(ee, -0.8835700060003032831e-5, 1e-18, "Celes::ee00b", "")
1736
+ #
1737
+ #}
1738
+ def t_ee00b
1739
+ ee = Celes::ee00b(2400000.5, 53736.0)
1740
+
1741
+ vvd(ee, -0.8835700060003032831e-5, 1e-18, "Celes::ee00b", "")
1742
+ end
1743
+
1744
+ #static void t_ee06a(int *status)
1745
+ #{
1746
+ # double ee
1747
+ #
1748
+ #
1749
+ # ee = Celes::ee06a(2400000.5, 53736.0)
1750
+ #
1751
+ # vvd(ee, -0.8834195072043790156e-5, 1e-15, "Celes::ee06a", "")
1752
+ #}
1753
+ def t_ee06a
1754
+ ee = Celes::ee06a(2400000.5, 53736.0)
1755
+
1756
+ vvd(ee, -0.8834195072043790156e-5, 1e-15, "Celes::ee06a", "")
1757
+ end
1758
+
1759
+ #static void t_eect00(int *status)
1760
+ #{
1761
+ # double eect
1762
+ #
1763
+ #
1764
+ # eect = Celes::eect00(2400000.5, 53736.0)
1765
+ #
1766
+ # vvd(eect, 0.2046085004885125264e-8, 1e-20, "Celes::eect00", "")
1767
+ #
1768
+ #}
1769
+ def t_eect00
1770
+ eect = Celes::eect00(2400000.5, 53736.0)
1771
+
1772
+ vvd(eect, 0.2046085004885125264e-8, 1e-20, "Celes::eect00", "")
1773
+ end
1774
+
1775
+ #static void t_eform(int *status)
1776
+ #{
1777
+ # int j
1778
+ # double a, f
1779
+ #
1780
+ # j = Celes::eform(0, &a, &f)
1781
+ #
1782
+ # viv(j, -1, "Celes::eform", "j0")
1783
+ #
1784
+ # j = Celes::eform(WGS84, &a, &f)
1785
+ #
1786
+ # viv(j, 0, "Celes::eform", "j1")
1787
+ # vvd(a, 6378137.0, 1e-10, "Celes::eform", "a1")
1788
+ # vvd(f, 0.0033528106647474807, 1e-18, "Celes::eform", "f1")
1789
+ #
1790
+ # j = Celes::eform(GRS80, &a, &f)
1791
+ #
1792
+ # viv(j, 0, "Celes::eform", "j2")
1793
+ # vvd(a, 6378137.0, 1e-10, "Celes::eform", "a2")
1794
+ # vvd(f, 0.0033528106811823189, 1e-18, "Celes::eform", "f2")
1795
+ #
1796
+ # j = Celes::eform(WGS72, &a, &f)
1797
+ #
1798
+ # viv(j, 0, "Celes::eform", "j2")
1799
+ # vvd(a, 6378135.0, 1e-10, "Celes::eform", "a3")
1800
+ # vvd(f, 0.0033527794541675049, 1e-18, "Celes::eform", "f3")
1801
+ #
1802
+ # j = Celes::eform(4, &a, &f)
1803
+ # viv(j, -1, "Celes::eform", "j3")
1804
+ #}
1805
+ def t_eform
1806
+ begin
1807
+ a, f = Celes::eform(0)
1808
+ rescue
1809
+ nil
1810
+ ensure
1811
+ viv(Celes::status, -1, "Celes::eform", "j0")
1812
+ end
1813
+
1814
+ a, f = Celes::eform(Celes::WGS84)
1815
+
1816
+ viv(Celes::status, 0, "Celes::eform", "j1")
1817
+ vvd(a, 6378137.0, 1e-10, "Celes::eform", "a1")
1818
+ vvd(f, 0.0033528106647474807, 1e-18, "Celes::eform", "f1")
1819
+
1820
+ a, f = Celes::eform(Celes::GRS80)
1821
+
1822
+ viv(Celes::status, 0, "Celes::eform", "j2")
1823
+ vvd(a, 6378137.0, 1e-10, "Celes::eform", "a2")
1824
+ vvd(f, 0.0033528106811823189, 1e-18, "Celes::eform", "f2")
1825
+
1826
+ a, f = Celes::eform(Celes::WGS72)
1827
+
1828
+ viv(Celes::status, 0, "Celes::eform", "j2")
1829
+ vvd(a, 6378135.0, 1e-10, "Celes::eform", "a3")
1830
+ vvd(f, 0.0033527794541675049, 1e-18, "Celes::eform", "f3")
1831
+
1832
+ begin
1833
+ a, f = Celes::eform(4)
1834
+ rescue
1835
+ nil
1836
+ ensure
1837
+ viv(Celes::status, -1, "Celes::eform", "j3")
1838
+ end
1839
+ end
1840
+
1841
+ #static void t_eo06a(int *status)
1842
+ #{
1843
+ # double eo
1844
+ #
1845
+ #
1846
+ # eo = Celes::eo06a(2400000.5, 53736.0)
1847
+ #
1848
+ # vvd(eo, -0.1332882371941833644e-2, 1e-15, "Celes::eo06a", "")
1849
+ #
1850
+ #}
1851
+ def t_eo06a
1852
+ eo = Celes::eo06a(2400000.5, 53736.0)
1853
+
1854
+ vvd(eo, -0.1332882371941833644e-2, 1e-15, "Celes::eo06a", "")
1855
+ end
1856
+
1857
+ #static void t_eors(int *status)
1858
+ #{
1859
+ # double rnpb[3][3], s, eo
1860
+ #
1861
+ #
1862
+ # rnpb[0][0] = 0.9999989440476103608
1863
+ # rnpb[0][1] = -0.1332881761240011518e-2
1864
+ # rnpb[0][2] = -0.5790767434730085097e-3
1865
+ #
1866
+ # rnpb[1][0] = 0.1332858254308954453e-2
1867
+ # rnpb[1][1] = 0.9999991109044505944
1868
+ # rnpb[1][2] = -0.4097782710401555759e-4
1869
+ #
1870
+ # rnpb[2][0] = 0.5791308472168153320e-3
1871
+ # rnpb[2][1] = 0.4020595661593994396e-4
1872
+ # rnpb[2][2] = 0.9999998314954572365
1873
+ #
1874
+ # s = -0.1220040848472271978e-7
1875
+ #
1876
+ # eo = Celes::eors(rnpb, s)
1877
+ #
1878
+ # vvd(eo, -0.1332882715130744606e-2, 1e-14, "Celes::eors", "")
1879
+ #
1880
+ #}
1881
+ def t_eors
1882
+ rnpb = [[], [], []]
1883
+
1884
+ rnpb[0][0] = 0.9999989440476103608
1885
+ rnpb[0][1] = -0.1332881761240011518e-2
1886
+ rnpb[0][2] = -0.5790767434730085097e-3
1887
+
1888
+ rnpb[1][0] = 0.1332858254308954453e-2
1889
+ rnpb[1][1] = 0.9999991109044505944
1890
+ rnpb[1][2] = -0.4097782710401555759e-4
1891
+
1892
+ rnpb[2][0] = 0.5791308472168153320e-3
1893
+ rnpb[2][1] = 0.4020595661593994396e-4
1894
+ rnpb[2][2] = 0.9999998314954572365
1895
+
1896
+ s = -0.1220040848472271978e-7
1897
+
1898
+ eo = Celes::eors(rnpb, s)
1899
+
1900
+ vvd(eo, -0.1332882715130744606e-2, 1e-14, "Celes::eors", "")
1901
+ end
1902
+
1903
+ #static void t_epb(int *status)
1904
+ #{
1905
+ # double epb
1906
+ #
1907
+ #
1908
+ # epb = Celes::epb(2415019.8135, 30103.18648)
1909
+ #
1910
+ # vvd(epb, 1982.418424159278580, 1e-12, "Celes::epb", "")
1911
+ #
1912
+ #}
1913
+ def t_epb
1914
+ epb = Celes::epb(2415019.8135, 30103.18648)
1915
+
1916
+ vvd(epb, 1982.418424159278580, 1e-12, "Celes::epb", "")
1917
+ end
1918
+
1919
+ #static void t_epb2jd(int *status)
1920
+ #{
1921
+ # double epb, djm0, djm
1922
+ #
1923
+ #
1924
+ # epb = 1957.3
1925
+ #
1926
+ # Celes::epb2jd(epb, &djm0, &djm)
1927
+ #
1928
+ # vvd(djm0, 2400000.5, 1e-9, "Celes::epb2jd", "djm0")
1929
+ # vvd(djm, 35948.1915101513, 1e-9, "Celes::epb2jd", "djm")
1930
+ #
1931
+ #}
1932
+ def t_epb2jd
1933
+ epb = 1957.3
1934
+
1935
+ djm0, djm = Celes::epb2jd(epb)
1936
+
1937
+ vvd(djm0, 2400000.5, 1e-9, "Celes::epb2jd", "djm0")
1938
+ vvd(djm, 35948.1915101513, 1e-9, "Celes::epb2jd", "djm")
1939
+ end
1940
+
1941
+ #static void t_epj(int *status)
1942
+ #{
1943
+ # double epj
1944
+ #
1945
+ #
1946
+ # epj = Celes::epj(2451545, -7392.5)
1947
+ #
1948
+ # vvd(epj, 1979.760438056125941, 1e-12, "Celes::epj", "")
1949
+ #
1950
+ #}
1951
+ def t_epj
1952
+ epj = Celes::epj(2451545, -7392.5)
1953
+
1954
+ vvd(epj, 1979.760438056125941, 1e-12, "Celes::epj", "")
1955
+ end
1956
+
1957
+ #static void t_epj2jd(int *status)
1958
+ #{
1959
+ # double epj, djm0, djm
1960
+ #
1961
+ #
1962
+ # epj = 1996.8
1963
+ #
1964
+ # Celes::epj2jd(epj, &djm0, &djm)
1965
+ #
1966
+ # vvd(djm0, 2400000.5, 1e-9, "Celes::epj2jd", "djm0")
1967
+ # vvd(djm, 50375.7, 1e-9, "Celes::epj2jd", "djm", status)
1968
+ #
1969
+ #}
1970
+ def t_epj2jd
1971
+ epj = 1996.8
1972
+
1973
+ djm0, djm = Celes::epj2jd(epj)
1974
+
1975
+ vvd(djm0, 2400000.5, 1e-9, "Celes::epj2jd", "djm0")
1976
+ vvd(djm, 50375.7, 1e-9, "Celes::epj2jd", "djm")
1977
+ end
1978
+
1979
+ #static void t_epv00(int *status)
1980
+ #{
1981
+ # double pvh[2][3], pvb[2][3]
1982
+ # int j
1983
+ #
1984
+ #
1985
+ # j = Celes::epv00(2400000.5, 53411.52501161, pvh, pvb)
1986
+ #
1987
+ # vvd(pvh[0][0], -0.7757238809297706813, 1e-14,
1988
+ # "Celes::epv00", "ph(x)")
1989
+ # vvd(pvh[0][1], 0.5598052241363340596, 1e-14,
1990
+ # "Celes::epv00", "ph(y)")
1991
+ # vvd(pvh[0][2], 0.2426998466481686993, 1e-14,
1992
+ # "Celes::epv00", "ph(z)")
1993
+ #
1994
+ # vvd(pvh[1][0], -0.1091891824147313846e-1, 1e-15,
1995
+ # "Celes::epv00", "vh(x)")
1996
+ # vvd(pvh[1][1], -0.1247187268440845008e-1, 1e-15,
1997
+ # "Celes::epv00", "vh(y)")
1998
+ # vvd(pvh[1][2], -0.5407569418065039061e-2, 1e-15,
1999
+ # "Celes::epv00", "vh(z)")
2000
+ #
2001
+ # vvd(pvb[0][0], -0.7714104440491111971, 1e-14,
2002
+ # "Celes::epv00", "pb(x)")
2003
+ # vvd(pvb[0][1], 0.5598412061824171323, 1e-14,
2004
+ # "Celes::epv00", "pb(y)")
2005
+ # vvd(pvb[0][2], 0.2425996277722452400, 1e-14,
2006
+ # "Celes::epv00", "pb(z)")
2007
+ #
2008
+ # vvd(pvb[1][0], -0.1091874268116823295e-1, 1e-15,
2009
+ # "Celes::epv00", "vb(x)")
2010
+ # vvd(pvb[1][1], -0.1246525461732861538e-1, 1e-15,
2011
+ # "Celes::epv00", "vb(y)")
2012
+ # vvd(pvb[1][2], -0.5404773180966231279e-2, 1e-15,
2013
+ # "Celes::epv00", "vb(z)")
2014
+ #
2015
+ # viv(j, 0, "Celes::epv00", "j")
2016
+ #
2017
+ #}
2018
+ def t_epv00
2019
+ pvh, pvb = Celes::epv00(2400000.5, 53411.52501161);
2020
+
2021
+ vvd(pvh[0][0], -0.7757238809297706813, 1e-14,
2022
+ "Celes::epv00", "ph(x)")
2023
+ vvd(pvh[0][1], 0.5598052241363340596, 1e-14,
2024
+ "Celes::epv00", "ph(y)")
2025
+ vvd(pvh[0][2], 0.2426998466481686993, 1e-14,
2026
+ "Celes::epv00", "ph(z)")
2027
+
2028
+ vvd(pvh[1][0], -0.1091891824147313846e-1, 1e-15,
2029
+ "Celes::epv00", "vh(x)")
2030
+ vvd(pvh[1][1], -0.1247187268440845008e-1, 1e-15,
2031
+ "Celes::epv00", "vh(y)")
2032
+ vvd(pvh[1][2], -0.5407569418065039061e-2, 1e-15,
2033
+ "Celes::epv00", "vh(z)")
2034
+
2035
+ vvd(pvb[0][0], -0.7714104440491111971, 1e-14,
2036
+ "Celes::epv00", "pb(x)")
2037
+ vvd(pvb[0][1], 0.5598412061824171323, 1e-14,
2038
+ "Celes::epv00", "pb(y)")
2039
+ vvd(pvb[0][2], 0.2425996277722452400, 1e-14,
2040
+ "Celes::epv00", "pb(z)")
2041
+
2042
+ vvd(pvb[1][0], -0.1091874268116823295e-1, 1e-15,
2043
+ "Celes::epv00", "vb(x)")
2044
+ vvd(pvb[1][1], -0.1246525461732861538e-1, 1e-15,
2045
+ "Celes::epv00", "vb(y)")
2046
+ vvd(pvb[1][2], -0.5404773180966231279e-2, 1e-15,
2047
+ "Celes::epv00", "vb(z)")
2048
+
2049
+ viv(Celes::status, 0, "Celes::epv00", "j")
2050
+ end
2051
+
2052
+ #static void t_eqeq94(int *status)
2053
+ #{
2054
+ # double eqeq
2055
+ #
2056
+ #
2057
+ # eqeq = Celes::eqeq94(2400000.5, 41234.0)
2058
+ #
2059
+ # vvd(eqeq, 0.5357758254609256894e-4, 1e-17, "Celes::eqeq94", "")
2060
+ #
2061
+ #}
2062
+ def t_eqeq94
2063
+ eqeq = Celes::eqeq94(2400000.5, 41234.0)
2064
+
2065
+ vvd(eqeq, 0.5357758254609256894e-4, 1e-17, "Celes::eqeq94", "")
2066
+ end
2067
+
2068
+ #static void t_era00(int *status)
2069
+ #{
2070
+ # double era00
2071
+ #
2072
+ #
2073
+ # era00 = Celes::era00(2400000.5, 54388.0)
2074
+ #
2075
+ # vvd(era00, 0.4022837240028158102, 1e-12, "Celes::era00", "")
2076
+ #
2077
+ #}
2078
+ def t_era00
2079
+ era00 = Celes::era00(2400000.5, 54388.0)
2080
+
2081
+ vvd(era00, 0.4022837240028158102, 1e-12, "Celes::era00", "")
2082
+ end
2083
+
2084
+ #static void t_fad03(int *status)
2085
+ #{
2086
+ # vvd(Celes::fad03(0.80), 1.946709205396925672, 1e-12,
2087
+ # "Celes::fad03", "")
2088
+ #}
2089
+ def t_fad03
2090
+ vvd(Celes::fad03(0.80), 1.946709205396925672, 1e-12,
2091
+ "Celes::fad03", "")
2092
+ end
2093
+
2094
+ #static void t_fae03(int *status)
2095
+ #{
2096
+ # vvd(Celes::fae03(0.80), 1.744713738913081846, 1e-12,
2097
+ # "Celes::fae03", "")
2098
+ #}
2099
+ def t_fae03
2100
+ vvd(Celes::fae03(0.80), 1.744713738913081846, 1e-12,
2101
+ "Celes::fae03", "")
2102
+ end
2103
+
2104
+ #static void t_faf03(int *status)
2105
+ #{
2106
+ # vvd(Celes::faf03(0.80), 0.2597711366745499518, 1e-12,
2107
+ # "Celes::faf03", "")
2108
+ #}
2109
+ def t_faf03
2110
+ vvd(Celes::faf03(0.80), 0.2597711366745499518, 1e-12,
2111
+ "Celes::faf03", "")
2112
+ end
2113
+
2114
+ #static void t_faju03(int *status)
2115
+ #{
2116
+ # vvd(Celes::faju03(0.80), 5.275711665202481138, 1e-12,
2117
+ # "Celes::faju03", "")
2118
+ #}
2119
+ def t_faju03
2120
+ vvd(Celes::faju03(0.80), 5.275711665202481138, 1e-12,
2121
+ "Celes::faju03", "")
2122
+ end
2123
+
2124
+ #static void t_fal03(int *status)
2125
+ #{
2126
+ # vvd(Celes::fal03(0.80), 5.132369751108684150, 1e-12,
2127
+ # "Celes::fal03", "")
2128
+ #}
2129
+ def t_fal03
2130
+ vvd(Celes::fal03(0.80), 5.132369751108684150, 1e-12,
2131
+ "Celes::fal03", "")
2132
+ end
2133
+
2134
+ #static void t_falp03(int *status)
2135
+ #{
2136
+ # vvd(Celes::falp03(0.80), 6.226797973505507345, 1e-12,
2137
+ # "Celes::falp03", "")
2138
+ #}
2139
+ def t_falp03
2140
+ vvd(Celes::falp03(0.80), 6.226797973505507345, 1e-12,
2141
+ "Celes::falp03", "")
2142
+ end
2143
+
2144
+ #static void t_fama03(int *status)
2145
+ #{
2146
+ # vvd(Celes::fama03(0.80), 3.275506840277781492, 1e-12,
2147
+ # "Celes::fama03", "")
2148
+ #}
2149
+ def t_fama03
2150
+ vvd(Celes::fama03(0.80), 3.275506840277781492, 1e-12,
2151
+ "Celes::fama03", "")