199 #define GPSNET_REPORT_ID_LEN 8
203 #define GPSNET_MAGIC_VERSION_1 0xa1
213 boolean hasId(uint8_t*
id);
228 boolean isCloseTo(GPSReport* that, uint32_t latlongError = 100, uint32_t altitudeError = 10);
241 uint8_t
id[GPSNET_REPORT_ID_LEN];
255 #define GPSNET_NUM_REPORTS 10
270 #define GPSNET_STATISTICS_WINDOW_SECS 60
275 #define GPSNET_TRANSMIT_TIME_JITTER 1000
281 typedef struct GPSReportList
384 uint32_t _lastSecond;
386 uint32_t _updateTransmitInterval;
387 uint32_t _lastUpdateTransmitTime;
389 uint8_t _receivedReportsInLastSecond;
390 float _receptionRate;
393 uint8_t _lastUpdatedReportIndex;
394 GPSReportList _reports[GPSNET_NUM_REPORTS];
GPSReport * reportWithIndex(uint8_t index)
Definition: GPSNet.cpp:163
int32_t longitude
Current longitude in 100000ths of a degree.
Definition: GPSNet.h:245
uint8_t status
External application specific status flags.
Definition: GPSNet.h:250
void poll()
Definition: GPSNet.cpp:232
uint8_t magic
Magic number and version of this report format == GPSNET_MAGIC_VERSION_1.
Definition: GPSNet.h:240
void linkReportWithIndexAfterIndex(uint8_t index, uint8_t after)
Definition: GPSNet.cpp:259
void evaluateReceptionRate()
Definition: GPSNet.cpp:213
void printReports()
Definition: GPSNet.cpp:170
uint8_t numReports()
Definition: GPSNet.cpp:94
boolean hasId(uint8_t *id)
Definition: GPSNet.cpp:22
void unlinkReportWithIndex(uint8_t index)
Definition: GPSNet.cpp:250
uint8_t flags
GPSnet internal flags (not used at present)
Definition: GPSNet.h:249
void scheduleReportForUpdate(uint8_t index)
Definition: GPSNet.cpp:99
boolean isLaterThan(GPSReport *that)
Definition: GPSNet.cpp:51
GPSReport * reportWithId(uint8_t *id, uint8_t *index=NULL)
Definition: GPSNet.cpp:148
virtual void transmitUpdate(GPSReport *report)
Definition: GPSNet.cpp:187
void transmitNextUpdate()
Definition: GPSNet.cpp:193
uint16_t speed
Current speed in knot.
Definition: GPSNet.h:247
void receivedReport(GPSReport *report)
Definition: GPSNet.cpp:203
GPSNet()
Definition: GPSNet.cpp:82
uint32_t time
Current time as an integer (hhmmss)
Definition: GPSNet.h:243
GPSReport()
Definition: GPSNet.cpp:7
void print()
Definition: GPSNet.cpp:57
Manage reception, storage and update transmission of GPSReports.
Definition: GPSNet.h:264
boolean isCloseTo(GPSReport *that, uint32_t latlongError=100, uint32_t altitudeError=10)
Definition: GPSNet.cpp:43
uint8_t hops
Num of radio hops from originator, 0 at originator.
Definition: GPSNet.h:251
void perSecondTasks()
Definition: GPSNet.cpp:225
int32_t latitude
Current latitude in 100000ths of a degree.
Definition: GPSNet.h:244
void newReport(GPSReport *report)
Definition: GPSNet.cpp:108
Records all the relevant details of a GPS position report, plus some utility functions for operating ...
Definition: GPSNet.h:194
boolean isIdenticalTo(GPSReport *that)
Definition: GPSNet.cpp:27
uint32_t date
Current date as an integer (yymmdd)
Definition: GPSNet.h:242
uint16_t course
Current course in degrees.
Definition: GPSNet.h:248
void setTransmitFunction(void(*transmitFunction)(GPSNet *net, GPSReport *report))
Definition: GPSNet.cpp:269
int16_t altitude
Current altitude in m.
Definition: GPSNet.h:246