korba 0.2.0 → 0.3.0

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: dc5cb24ea2424abd3408fb27d0bd8c414b60e02fc3923116f4b4a3f278be049c
4
- data.tar.gz: 6a67a53fa7eda0a04d51bf34732a5fd82b5d97a57963e17acd28fbd64715fbf1
3
+ metadata.gz: 5b7470c62a2e8df7ed79ca869272a846fad21bed8794ee2b25deff5448cbfb85
4
+ data.tar.gz: ee043f86462fe065c95245706174aae8945347d91aba211d3fc7f988975c25a3
5
5
  SHA512:
6
- metadata.gz: e3d5ee6cf6802c4c47b04986a7ae9ebf1bc279bb76d9f8e83bebc4bdabe0521be616c662a0358195b373e22a4974c1bca2e316225e4fa79e0fd63c01e35b6920
7
- data.tar.gz: c9e5748953f5d1ad950ca294c7ecf82d099f83ebbe31753453e57930dcc9aaf4ff26ffad97677efb577ad13ba429d287917ff6a47a2dad280a5d2962b5a8d8a6
6
+ metadata.gz: '0529630074005be970a0cc52aaa583e357cd856daafbcda8d0db1e074a8f5bbd0ab810edc25e721c6fd5b5b6ba2b97bf398e472d4a0ed77b03a465d40ec4d75d'
7
+ data.tar.gz: ffda7bb7e72c728ba5e7ef4199d5c00cc8b5102c19fb9af9976c95d7b64158e6f4514d3ea289c32225460bfc91481344b98caab4c34016567af0d7d978a8de23
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.3.0] - 2024-12-09
2
+
3
+ - Enable instance creation without arguments
4
+
1
5
  ## [0.2.0] - 2024-12-08
2
6
 
3
7
  - Enable to create tle object from string
data/README.md CHANGED
@@ -1,28 +1,55 @@
1
- # Korba
1
+ [![Gem Version](https://badge.fury.io/rb/korba.svg)](https://rubygems.org/gems/korba)
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ # Korba
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/korba`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ An orbital analytics library for ruby.
6
6
 
7
7
  ## Installation
8
8
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
9
  Install the gem and add to the application's Gemfile by executing:
12
10
 
13
11
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
12
+ bundle add korba
15
13
  ```
16
14
 
17
15
  If bundler is not being used to manage dependencies, install the gem by executing:
18
16
 
19
17
  ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
18
+ gem install korba
21
19
  ```
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ ### Create Orbital Elements From TLE(Two Line Elements)
24
+
25
+ ```ruby
26
+ orbit = Korba::Tle.new(<<~TLE)
27
+ ISS (ZARYA)
28
+ 1 25544U 98067A 24342.85930654 .00018474 00000+0 32681-3 0 9991
29
+ 2 25544 51.6381 174.9565 0006817 314.0303 175.4461 15.50337242485488
30
+ TLE
31
+
32
+ orbit.semi_major_axis
33
+ # => 6793877.649839985
34
+
35
+ orbit.height_at_perigee
36
+ # => 411109.2634460889
37
+
38
+ orbit.height_at_apogee
39
+ # => 420372.03623388056
40
+
41
+ orbit.to_kep
42
+ # =>
43
+ # #<Korba::Kep:xxxxxxxxxxxxxxxx
44
+ # @arg_of_pericenter=314.0303,
45
+ # @eccentricity=0.0006817,
46
+ # @epoch="2024-12-07T20:37:24.085055",
47
+ # @inclination=51.6381,
48
+ # @mean_anomaly=175.4461,
49
+ # @object_name="ISS (ZARYA)",
50
+ # @ra_of_asc_node=174.9565,
51
+ # @semi_major_axis=6793877.649839985>
52
+ ```
26
53
 
27
54
  ## Development
28
55
 
@@ -32,4 +59,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
59
 
33
60
  ## Contributing
34
61
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/korba.
62
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kk0000-kk/korba.
data/lib/korba/tle.rb CHANGED
@@ -7,7 +7,9 @@ module Korba
7
7
 
8
8
  attr_reader :tle_json, :object_name, :object_id, :epoch, :mean_motion, :eccentricity, :inclination, :ra_of_asc_node, :arg_of_pericenter, :mean_anomaly
9
9
 
10
- def initialize(tle, type: :string)
10
+ def initialize(tle = nil, type: :string)
11
+ return if tle.nil?
12
+
11
13
  case type
12
14
  when :string
13
15
  initialize_from_string(tle)
data/lib/korba/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Korba
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: korba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kk0000-kk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-08 00:00:00.000000000 Z
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Orbital elements calculation library
14
14
  email: