-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgps.h
More file actions
63 lines (49 loc) · 1.22 KB
/
gps.h
File metadata and controls
63 lines (49 loc) · 1.22 KB
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
/*******************************************************************
*
* DESCRIPTION: GPS Navigation Avionics Atomic Model
*
* AUTHOR: Ken Edwards
*
* EMAIL: ken@kje.ca
*
* DATE: November 2009
*
*******************************************************************/
#ifndef __GPS_H
#define __GPS_H
#define GPS_STATE_OFF 0
#define GPS_STATE_ACQ 1
#define GPS_STATE_NAV 2
#define POWER_OFF 0
#define POWER_ON 1
#include "atomic.h" // class Atomic
class GPS : public Atomic
{
public:
GPS( const string &name = "GPS" ); //Default constructor
virtual string className() const ;
protected:
Model &initFunction();
Model &externalFunction( const ExternalMessage & );
Model &internalFunction( const InternalMessage & );
Model &outputFunction( const InternalMessage & );
private:
const Port &port_in_power ;
Port &port_out_gps_x;
Port &port_out_gps_y;
Port &port_out_gps_z;
//int output_time_delay ; // 20 Hz
int gps_state ;
int gps_x_value ;
int gps_y_value ;
int gps_z_value ;
Time gps_output_period ;
Time gps_acq_period ;
}; // class GPS
// ** inline ** //
inline
string GPS::className() const
{
return "GPS" ;
}
#endif //__GPS_H