From af60e2a12d913bb548bdb0a883bbaa53327abe6c Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 18 Aug 2019 20:27:32 +0200 Subject: tlebytes --- TLE.go | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'TLE.go') 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"` } -- cgit 1.4.1