lunation 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d10ec4b4f707590c5758f310110bb996b21bf574a31c40a71397c9fa8bd4be0e
4
- data.tar.gz: b7fc6a55648ee62e48d42ca1d0c7bbec3723f67b159865cf6ec4a1d1f4a4d9d1
3
+ metadata.gz: be2f458cb91c87f2c300bc10255e2790f6326428eaa5abccc2df1b4a2e6da6fe
4
+ data.tar.gz: 1914effbd5e021a6ecd0b89e451b5c68ce2d40c61201c9e8a2edb324929bc3ae
5
5
  SHA512:
6
- metadata.gz: 6f4fc2a5f58f602b48fdec7316b3692236c98a731f3e98eb17e45b115bbc20642b882481ad1905c3a8fdfe7811c743dea74f1bcd2e2cab0eb739c9d087b7ccc4
7
- data.tar.gz: cf53f3cd1fa2d839ab4d77aea42c32207cf36c1f4ae5c449292828ae409a4117f057a96d0389505c94d734b294e88ea31d9ad97235c0e14e5de9e5016f212c15
6
+ metadata.gz: 4f46dcff985f6fd26a24ed67366f11c425f7c752a017e038d88ff21ca1c134b569b90ed980b9d97bb27a434d1e5f6c6ac3b1d763af266db1eda1794e9de1cfd1
7
+ data.tar.gz: fe7a458aea677f36989a3f227bb235e9ad410ca01b5ac210f6ae17049f0d576ed125f182ae3543d690fa3dbbc5c3557da4a6ea27b99f99408203c7579d89642b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.5] - 2024-12-30
2
+
3
+ - Config files are now properly loaded in runtime.
4
+
1
5
  ## [0.1.4] - 2024-12-30
2
6
 
3
7
  - Require config/ files;
@@ -2,19 +2,32 @@ module Lunation
2
2
  class Calculation
3
3
  module EarthPositionVSOP87
4
4
  # rubocop:disable Layout/LineLength
5
- PERIODIC_TERMS_B0 = YAML.load_file("config/periodic_terms_earth_position_b0.yml").freeze
6
- PERIODIC_TERMS_B1 = YAML.load_file("config/periodic_terms_earth_position_b1.yml").freeze
7
- PERIODIC_TERMS_L0 = YAML.load_file("config/periodic_terms_earth_position_l0.yml").freeze
8
- PERIODIC_TERMS_L1 = YAML.load_file("config/periodic_terms_earth_position_l1.yml").freeze
9
- PERIODIC_TERMS_L2 = YAML.load_file("config/periodic_terms_earth_position_l2.yml").freeze
10
- PERIODIC_TERMS_L3 = YAML.load_file("config/periodic_terms_earth_position_l3.yml").freeze
11
- PERIODIC_TERMS_L4 = YAML.load_file("config/periodic_terms_earth_position_l4.yml").freeze
12
- PERIODIC_TERMS_L5 = YAML.load_file("config/periodic_terms_earth_position_l5.yml").freeze
13
- PERIODIC_TERMS_R0 = YAML.load_file("config/periodic_terms_earth_position_r0.yml").freeze
14
- PERIODIC_TERMS_R1 = YAML.load_file("config/periodic_terms_earth_position_r1.yml").freeze
15
- PERIODIC_TERMS_R2 = YAML.load_file("config/periodic_terms_earth_position_r2.yml").freeze
16
- PERIODIC_TERMS_R3 = YAML.load_file("config/periodic_terms_earth_position_r3.yml").freeze
17
- PERIODIC_TERMS_R4 = YAML.load_file("config/periodic_terms_earth_position_r4.yml").freeze
5
+ PERIODIC_TERMS_B0_PATH = File.expand_path("../../../config/periodic_terms_earth_position_b0.yml", __dir__).freeze
6
+ PERIODIC_TERMS_B1_PATH = File.expand_path("../../../config/periodic_terms_earth_position_b1.yml", __dir__).freeze
7
+ PERIODIC_TERMS_L0_PATH = File.expand_path("../../../config/periodic_terms_earth_position_l0.yml", __dir__).freeze
8
+ PERIODIC_TERMS_L1_PATH = File.expand_path("../../../config/periodic_terms_earth_position_l1.yml", __dir__).freeze
9
+ PERIODIC_TERMS_L2_PATH = File.expand_path("../../../config/periodic_terms_earth_position_l2.yml", __dir__).freeze
10
+ PERIODIC_TERMS_L3_PATH = File.expand_path("../../../config/periodic_terms_earth_position_l3.yml", __dir__).freeze
11
+ PERIODIC_TERMS_L4_PATH = File.expand_path("../../../config/periodic_terms_earth_position_l4.yml", __dir__).freeze
12
+ PERIODIC_TERMS_L5_PATH = File.expand_path("../../../config/periodic_terms_earth_position_l5.yml", __dir__).freeze
13
+ PERIODIC_TERMS_R0_PATH = File.expand_path("../../../config/periodic_terms_earth_position_r0.yml", __dir__).freeze
14
+ PERIODIC_TERMS_R1_PATH = File.expand_path("../../../config/periodic_terms_earth_position_r1.yml", __dir__).freeze
15
+ PERIODIC_TERMS_R2_PATH = File.expand_path("../../../config/periodic_terms_earth_position_r2.yml", __dir__).freeze
16
+ PERIODIC_TERMS_R3_PATH = File.expand_path("../../../config/periodic_terms_earth_position_r3.yml", __dir__).freeze
17
+ PERIODIC_TERMS_R4_PATH = File.expand_path("../../../config/periodic_terms_earth_position_r4.yml", __dir__).freeze
18
+ PERIODIC_TERMS_B0 = YAML.load_file(PERIODIC_TERMS_B0_PATH).freeze
19
+ PERIODIC_TERMS_B1 = YAML.load_file(PERIODIC_TERMS_B1_PATH).freeze
20
+ PERIODIC_TERMS_L0 = YAML.load_file(PERIODIC_TERMS_L0_PATH).freeze
21
+ PERIODIC_TERMS_L1 = YAML.load_file(PERIODIC_TERMS_L1_PATH).freeze
22
+ PERIODIC_TERMS_L2 = YAML.load_file(PERIODIC_TERMS_L2_PATH).freeze
23
+ PERIODIC_TERMS_L3 = YAML.load_file(PERIODIC_TERMS_L3_PATH).freeze
24
+ PERIODIC_TERMS_L4 = YAML.load_file(PERIODIC_TERMS_L4_PATH).freeze
25
+ PERIODIC_TERMS_L5 = YAML.load_file(PERIODIC_TERMS_L5_PATH).freeze
26
+ PERIODIC_TERMS_R0 = YAML.load_file(PERIODIC_TERMS_R0_PATH).freeze
27
+ PERIODIC_TERMS_R1 = YAML.load_file(PERIODIC_TERMS_R1_PATH).freeze
28
+ PERIODIC_TERMS_R2 = YAML.load_file(PERIODIC_TERMS_R2_PATH).freeze
29
+ PERIODIC_TERMS_R3 = YAML.load_file(PERIODIC_TERMS_R3_PATH).freeze
30
+ PERIODIC_TERMS_R4 = YAML.load_file(PERIODIC_TERMS_R4_PATH).freeze
18
31
  # rubocop:enable Layout/LineLength
19
32
 
20
33
  # (L) Ecliptical longitude of the earth (A.A. p. 219, 32.2)
@@ -4,8 +4,10 @@ module Lunation
4
4
  class Calculation
5
5
  module MoonPosition
6
6
  # rubocop:disable Layout/LineLength
7
- LONGITUDE_AND_DISTANCE_OF_MOON_PERIODIC_TERMS = YAML.load_file("config/periodic_terms_moon_longitude_distance.yml").freeze
8
- LATITUDE_OF_MOON_PERIODIC_TERMS = YAML.load_file("config/periodic_terms_moon_latitude.yml").freeze
7
+ LONGITUDE_AND_DISTANCE_OF_MOON_PERIODIC_TERMS_PATH = File.expand_path("../../../config/periodic_terms_moon_longitude_distance.yml", __dir__).freeze
8
+ LATITUDE_OF_MOON_PERIODIC_TERMS_PATH = File.expand_path("../../../config/periodic_terms_moon_latitude.yml", __dir__).freeze
9
+ LONGITUDE_AND_DISTANCE_OF_MOON_PERIODIC_TERMS = YAML.load_file(LONGITUDE_AND_DISTANCE_OF_MOON_PERIODIC_TERMS_PATH).freeze
10
+ LATITUDE_OF_MOON_PERIODIC_TERMS = YAML.load_file(LATITUDE_OF_MOON_PERIODIC_TERMS_PATH).freeze
9
11
  MOON_MEAN_LONGITUDE_CONSTANTS = [218.3164477, 481_267.88123421, -0.0015786, 1 / 538_841.0, -1 / 65_194_000.0].freeze
10
12
  MOON_MEAN_ELONGATION_CONSTANTS = [297.8501921, 445_267.1114034, -0.0018819, 1 / 545_868.0, -1 / 113_065_000.0].freeze
11
13
  MOON_MEAN_ANOMALY_CONSTANTS = [134.9633964, 477_198.8675055, 0.0087414, 1 / 69_699.0, -1 / 14_712_000.0].freeze
@@ -2,7 +2,8 @@ module Lunation
2
2
  class Calculation
3
3
  module NutationAndObliquity
4
4
  # rubocop:disable Layout/LineLength
5
- NUTATION_IN_OBLIQUITY_PERIODIC_TERMS = YAML.load_file("config/periodic_terms_earth_nutation.yml").freeze
5
+ NUTATION_IN_OBLIQUITY_PERIODIC_TERMS_PATH = File.expand_path("../../../config/periodic_terms_earth_nutation.yml", __dir__)
6
+ NUTATION_IN_OBLIQUITY_PERIODIC_TERMS = YAML.load_file(NUTATION_IN_OBLIQUITY_PERIODIC_TERMS_PATH).freeze
6
7
  ECLIPTIC_MEAN_OBLIQUITY_CONSTANTS = [21.448, -4680.93, -1.55, 1_999.25, -51.38, -249.67, -39.05, 7.12, 27.87, 5.79, 2.45].freeze
7
8
  MOON_MEAN_ELONGATION_FROM_SUN_CONSTANTS = [297.85036, 445_267.111480, -0.0019142, 1 / 189_474.0].freeze
8
9
  SUN_MEAN_ANOMALY_CONSTANTS = [357.52772, 35_999.050340, -0.0001603, -1 / 300_000.0].freeze
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lunation
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lunation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivo Kalverboer