-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSatellites.h
69 lines (50 loc) · 1001 Bytes
/
Satellites.h
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Satellites.h
*
* Created on: 2022. dec. 20.
* Author: BT
*/
#ifndef SATELLITES_H_
#define SATELLITES_H_
#include <Arduino.h>
struct sat {
/**
* Satellite PRN number
*/
uint8_t prn;
/*
* SNR (C/No) 00-99 dB, null when not tracking
*/
uint8_t snr;
/**
* utolsó frissítés
*/
long tStamp;
struct sat *next;
};
//extern struct sat *pSatsHead;
/**
*
*/
typedef enum {
BY_PRN, BY_SNR
} SortType_t;
/**
*
*/
class Satellites {
private:
struct sat *pSatsHead = NULL;
SortType_t sortType = BY_PRN;
public:
uint8_t countSats();
struct sat* searchSat(byte prnNo);
void deleteSat(struct sat *p);
void freeSatellites();
void insertSatellite(uint8_t prnNo, uint8_t snrVal);
void sortSatellites();
SortType_t getSortType() {return sortType;}
void setSortType(SortType_t type) {sortType = type;}
struct sat *getStatsHead() {return pSatsHead; }
};
#endif /* SATELLITES_H_ */