File: cpinsbearing.h

package info (click to toggle)
searchandrescue 1.5.0-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 6,768 kB
  • sloc: ansic: 89,609; cpp: 7,699; makefile: 194; sh: 123
file content (52 lines) | stat: -rw-r--r-- 968 bytes parent folder | download | duplicates (8)
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
/*
		Control Panel Instrument - Bearing
 */

#ifndef CPINSBEARING_H
#define CPINSBEARING_H

#include <sys/types.h>
#include <GL/gl.h>
#include "v3dtex.h"
#include "cpvalues.h"
#include "cpins.h"

/*
 *	This instrument type code:
 */
#define CPINS_TYPE_BEARING	15

/*
 *      Bearing Instrument structure:
 */
typedef struct _CPInsBearing CPInsBearing;
struct _CPInsBearing {

	CPIns ins;

	/* Last megnetic bearing in radians. */
	float	bearing_mag_last;

	/* Current megnetic bearing change velocity in radians per
	 * second.
	 */
	float	bearing_mag_vel;

	/* Megnetic bearing change velocity decrease in radians per
	 * second (must be positive).
	 */
	float	bearing_mag_vel_dec;


	/* Current mechanical bearing offset in delta radians. */
	float	bearing_mechanical_offset;

};
#define CPINS_BEARING(p)	((CPInsBearing *)(p))
#define CPINS_IS_BEARING(p)	(CPINS_TYPE(p) == CPINS_TYPE_BEARING)


extern CPIns *CPInsBearingNew(void *cp);


#endif	/* CPINSBEARING_H */