-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.d.ts
58 lines (53 loc) · 1 KB
/
index.d.ts
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
declare module 'ahrs' {
export default class AHRS {
constructor({
sampleInterval,
algorithm,
beta,
kp,
ki,
doInitialisation,
}: {
sampleInterval?: number;
algorithm?: 'Madgwick' | 'Mahony';
beta?: number;
kp?: number;
ki?: number;
doInitialisation?: boolean;
});
public toVector: () => {
x: number;
y: number;
z: number;
angle: number;
};
public getEulerAngles: () => {
heading: number;
pitch: number;
roll: number;
};
public getEulerAnglesDegrees: () => {
heading: number;
pitch: number;
roll: number;
};
public update: (
gx: number,
gy: number,
gz: number,
ax: number,
ay: number,
az: number,
mx?: number,
my?: number,
mz?: number,
deltaTimeSec?: number
) => void;
public getQuaternion: () => {
w: number;
x: number;
y: number;
z: number;
};
}
}