about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-08-18 20:27:32 +0200
committerEmile <hanemile@protonmail.com>2019-08-18 20:27:32 +0200
commitaf60e2a12d913bb548bdb0a883bbaa53327abe6c (patch)
treed8fcc3801a9575fe8718999e8219d5400938d19f
parent57d37c68b4d0b2081dc1c9177a8fe459a5407ddd (diff)
tlebytes
-rw-r--r--TLE.go33
1 files changed, 31 insertions, 2 deletions
diff --git a/TLE.go b/TLE.go
index 376790f..5d6630f 100644
--- a/TLE.go
+++ b/TLE.go
@@ -4,12 +4,41 @@ Implementing the "Two-line element set (TLE)", a data format encoding orbital el
 
 package TLE
 
-type TLE struct {
+// tlebytes defines a tle using raw bytes.
+type tlebytes struct {
 	TitleLine struct {
-		satname [24]byte `json:"satname"`
+		Satname [24]byte `json:"satname"`
 	} `json:"titleline"`
 	TitleLine struct {
+		Linenumber              [1]byte `json:"linenumber"`
+		Satellitenumber         [5]byte `json:"satellitenumber"`
+		Classification          [1]byte `json:"classification"`
+		InternationalDesignator struct {
+			launchyear   [2]byte `json:"launchyear"`
+			launchnumber [3]byte `json:"launchnumber"`
+			launchpiece  [3]byte `json:"launchpiece"`
+		} `json:"internationaldesignator"`
+		Epoch struct {
+			year        [2]byte `json:"year"`
+			dayfraction [2]byte `json:"dayfraction"`
+		}
+		Firstderiv       [10]byte `json:"firstderiv"`
+		Secondderiv      [8]byte  `json:"secondderiv"`
+		BSTAR            [8]byte  `json:"BSTAR"`
+		Numberzero       [1]byte  `json:"numberzero"`
+		ElementSetNumber [4]byte  `json:"elementesetnumber"`
+		Checksum         [1]byte  `json:"checksum"`
 	} `json:"lineone"`
 	TitleLine struct {
+		Linenumber                       [1]byte  `json:"linenumber"`
+		Satellitenumber                  [5]byte  `json:"satellitenumber"`
+		Inclination                      [8]byte  `json:"inclination"`
+		RightAscensionOfTheAscendingNode [8]byte  `json:"rightascensionoftheascendingnode"`
+		Eccentricity                     [7]byte  `json:"eccentricity"`
+		ArgumentOfPerigee                [8]byte  `json:"argumentofperigee"`
+		MeanAnomaly                      [8]byte  `json:"meananomaly"`
+		MeanMotion                       [11]byte `json:"meanmotion"`
+		RevolutionNumberAtEpoch          [5]byte  `json:"revolutionnumberatepoch"`
+		Checksum                         [1]byte  `json:"checksum"`
 	} `json:"linetwo"`
 }