-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgyro.h
More file actions
59 lines (44 loc) · 1.12 KB
/
gyro.h
File metadata and controls
59 lines (44 loc) · 1.12 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
/*******************************************************************
*
* DESCRIPTION: Gyro Navigation Avionics Atomic Model
*
* AUTHOR: Ken Edwards
*
* EMAIL: ken@kje.ca
*
* DATE: November 2009
*
*******************************************************************/
#ifndef __GYRO_H
#define __GYRO_H
#define GYRO_STATE_OFF 0
#define GYRO_STATE_SPINUP 1
#define GYRO_STATE_ON 2
#define POWER_OFF 0
#define POWER_ON 1
#include "atomic.h" // class Atomic
class Gyro : public Atomic
{
public:
Gyro( const string &name = "Gyro" ); //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_accel ;
int gyro_state ;
int gyro_accel_value ;
Time gyro_output_period ;
Time gyro_spinup_period ;
}; // class Gyro
// ** inline ** //
inline
string Gyro::className() const
{
return "Gyro" ;
}
#endif //__GYRO_H