forked from hotbso/openSAM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathos_jw.h
65 lines (49 loc) · 2.29 KB
/
os_jw.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
59
60
61
62
63
64
65
/*
openSAM: open source SAM emulator for X Plane
Copyright (C) 2024 Holger Teutsch
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
*/
static const float FAR_SKIP = 5000; // (m) don't consider jetways farther away
struct _sam_jw {
int is_zc_jw; // is a zero config jw
stand_t *stand; // back pointer to stand for zc jetways
// local x,z computed from the xml's lat/lon
float xml_x, xml_y, xml_z;
unsigned int xml_ref_gen; // only valid if this matches the generation of the ref frame
// values from the actually drawn object
float x, y, z, psi;
unsigned int obj_ref_gen;
int library_id;
// values fed to the datarefs
float rotate1, rotate2, rotate3, extent, wheels,
wheelrotatec, wheelrotater, wheelrotatel,
warnlight;
// these are from sam.xml
int id; // only used for library jetway sets
char name[40];
char sound[40];
float latitude, longitude, heading, height, wheelPos, cabinPos, cabinLength,
wheelDiameter, wheelDistance,
minRot1, maxRot1, minRot2, maxRot2, minRot3, maxRot3,
minExtent, maxExtent, minWheels, maxWheels,
initialRot1, initialRot2, initialRot3, initialExtent;
int door; // 0 = LF1 or default, 1 = LF2
float bb_lat_min, bb_lat_max, bb_lon_min, bb_lon_max; // bounding box for FAR_SKIP
};
// fortunately SAM3 is abandoned so this will never change 8-)
#define MAX_SAM3_LIB_JW 27 // index is 0..27
extern sam_jw_t sam3_lib_jw[];
extern int jw_init(void);
extern float jw_state_machine();
extern void update_ui(int only_if_visible);