about summary refs log tree commit diff
path: root/TLE.go
blob: 6a201ef3175155a45800b004d8337c1029288fa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
Implementing the "Two-line element set (TLE)", a data format encoding orbital elements of Earth-orbiting objects. https://en.wikipedia.org/wiki/Two-line_element_set
*/

package TLE

// tlebytes defines a tle using raw bytes.
type tlebytes struct {
	TitleLine struct {
		Satname [24]byte `json:"satname"`
	} `json:"titleline"`
	LineOne 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"`
	LineTwo 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"`
}