diff options
author | Emile <hanemile@protonmail.com> | 2019-08-19 14:55:56 +0200 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-08-19 14:55:56 +0200 |
commit | 287883dddf3b0e65a006462849c10e5be3c43b61 (patch) | |
tree | 46437761658e0ecb7de7cdd8ae58c25f14cf317f /TLE.go | |
parent | a4770f7cbe18db9a297147057dac54aa2b349cf0 (diff) |
moved the individual lines out of the TLE
Diffstat (limited to 'TLE.go')
-rw-r--r-- | TLE.go | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/TLE.go b/TLE.go index 5d89656..5b1a370 100644 --- a/TLE.go +++ b/TLE.go @@ -6,39 +6,42 @@ package TLE // tlebytes defines a tle using raw bytes. type TLE struct { - TitleLine struct { - Satname string `json:"satname"` - } `json:"titleline"` - LineOne struct { - Linenumber int8 `json:"linenumber"` - Satellitenumber int `json:"satellitenumber"` - Classification rune `json:"classification"` - InternationalDesignator struct { - launchyear int8 `json:"launchyear"` - launchnumber int `json:"launchnumber"` - launchpiece rune `json:"launchpiece"` - } `json:"internationaldesignator"` - Epoch struct { - year int8 `json:"year"` - dayfraction float64 `json:"dayfraction"` - } - Firstderiv float64 `json:"firstderiv"` - Secondderiv float64 `json:"secondderiv"` - BSTAR float64 `json:"BSTAR"` - Numberzero int8 `json:"numberzero"` - ElementSetNumber int `json:"elementesetnumber"` - Checksum int8 `json:"checksum"` - } `json:"lineone"` - LineTwo struct { - Linenumber int8 `json:"linenumber"` - Satellitenumber int `json:"satellitenumber"` - Inclination float64 `json:"inclination"` - RightAscensionOfTheAscendingNode float64 `json:"rightascensionoftheascendingnode"` - Eccentricity float64 `json:"eccentricity"` - ArgumentOfPerigee float64 `json:"argumentofperigee"` - MeanAnomaly float64 `json:"meananomaly"` - MeanMotion float64 `json:"meanmotion"` - RevolutionNumberAtEpoch int `json:"revolutionnumberatepoch"` - Checksum int8 `json:"checksum"` - } `json:"linetwo"` + TitleLine TitleLine `json:"titleline"` + LineOne LineOne `json:"lineone"` + LineTwo LineTwo `json:"linetwo"` +} +type TitleLine struct { + Satname string `json:"satname"` +} +type LineOne struct { + Linenumber int8 `json:"linenumber"` + Satellitenumber int `json:"satellitenumber"` + Classification rune `json:"classification"` + InternationalDesignator struct { + launchyear int8 `json:"launchyear"` + launchnumber int `json:"launchnumber"` + launchpiece rune `json:"launchpiece"` + } `json:"internationaldesignator"` + Epoch struct { + year int8 `json:"year"` + dayfraction float64 `json:"dayfraction"` + } + Firstderiv float64 `json:"firstderiv"` + Secondderiv float64 `json:"secondderiv"` + BSTAR float64 `json:"BSTAR"` + Numberzero int8 `json:"numberzero"` + ElementSetNumber int `json:"elementesetnumber"` + Checksum int8 `json:"checksum"` +} +type LineTwo struct { + Linenumber int8 `json:"linenumber"` + Satellitenumber int `json:"satellitenumber"` + Inclination float64 `json:"inclination"` + RightAscensionOfTheAscendingNode float64 `json:"rightascensionoftheascendingnode"` + Eccentricity float64 `json:"eccentricity"` + ArgumentOfPerigee float64 `json:"argumentofperigee"` + MeanAnomaly float64 `json:"meananomaly"` + MeanMotion float64 `json:"meanmotion"` + RevolutionNumberAtEpoch int `json:"revolutionnumberatepoch"` + Checksum int8 `json:"checksum"` } |