-
Notifications
You must be signed in to change notification settings - Fork 52
/
tle.hh
40 lines (34 loc) · 778 Bytes
/
tle.hh
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
#pragma once
#include <string>
#include <map>
#include <memory>
#include <ctime>
class SGP4;
class Tle;
class TLERepo
{
public:
TLERepo();
~TLERepo();
void parseFile(std::string_view fname);
struct Match
{
std::string name;
int norad;
std::string internat;
double inclination{360}; // radians
double ran; // radians
double e{-1};
double ecefX{0}; // m
double ecefY{0}; // m
double ecefZ{0}; // m
double eciX{0}, eciY{0}, eciZ{0}; // m
double distance{-1}; // m
double latitude, longitude, altitude;
};
Match getBestMatch(time_t, double x, double y, double z, Match* secondbest=0);
private:
std::map<std::string,
std::unique_ptr<std::tuple<SGP4, Tle>>
> d_sgp4s;
};