-
Notifications
You must be signed in to change notification settings - Fork 0
/
BeaconStatus.h
58 lines (49 loc) · 1.46 KB
/
BeaconStatus.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
#ifndef __BEACON_STATUS_HH
#define __BEACON_STATUS_HH
#include "beacon.h"
#include <iostream>
#include <string>
namespace IrvCS
{
/**
* Class to hold converted Beacon Data in real world units
**/
class BeaconStatus
{
public:
/**
* Convert incoming BeaconData into real-world units
**/
BeaconStatus(const BeaconData *data);
/**
* Destructor to clean up allocated resources (if any)
**/
virtual~BeaconStatus();
/**
* Send data to an output stream in a human friendly format
**/
friend std::ostream& operator<<(std::ostream &os, const BeaconStatus &bp);
/*
* Beacon Data fields. Raw data is in network byte order and many of
* the values represent floating numbers in integer or unsigned integers.
*/
/**
* Status ID. This is the value specified by BEACON_ID (e.g. IRV-02)
**/
std::string id_;
/**
* Long Duration Timer. LDC*256=uptime in seconds.
**/
uint16_t ldc_;
float gyro_[3]; /* degrees per second */
float mag_[3]; /* nT */
float tempDaughterA_; /* C */
float tempThreeVpl_; /* 3 V payload temp C */
float tempNz_; /* Outside temp in C */
float volt3V_; /* 3V sensor Voltage */
float curr3V_; /* 3V sensor Current */
float volt5Vpl_; /* 5V payload Voltage */
float curr5Vpl_; /* 5V payload Current */
};
}
#endif