-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzephyr,sensor-fusion-ahrs.yaml
114 lines (100 loc) · 3.6 KB
/
zephyr,sensor-fusion-ahrs.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Copyright (c) 2024 Tomislav Milkovic
# SPDX-License-Identifier: MIT
description: |
Sensor Fusion based on the AHRS algorithm implemented by XIO Technologies.
See more info at: https://github.com/xioTechnologies/Fusion
/ {
sensor_fusion: fusion {
status = "okay";
compatible = "zephyr,sensor-fusion-ahrs";
accel-dev = <&accel0>; /* Accelerometer device phandle */
gyro-dev = <&gyro0>; /* Gyroscope device phandle */
magn-dev = <&magn0>; /* Magnetometer device phandle */
earth-axes-convention = <0>; /* North-West-Up convention */
gyro-gain = <50>; /* Gyroscope gain of 0.5x */
gyro-range = <250>; /* Gyroscope full scale range: 250 dps */
accel-rejection = <10>; /* In degrees */
magn-rejection = <10>; /* In degrees */
recovery-trigger-period = <500>; /* In samples */
target-sample-rate-hz = <100>;
}
}
include: sensor-device.yaml
compatible: "zephyr,sensor-fusion-ahrs"
properties:
accel-dev:
type: phandle
required: true
description: |
Phandle of the accelerometer device to be used for sensor fusion.
gyro-dev:
type: phandle
required: true
description: |
Phandle of the gyroscope device to be used for sensor fusion.
magn-dev:
type: phandle
description: |
Phandle of the magnetometer device to be used for sensor fusion.
If not present, sensor fusion will be done with accelerometer
and gyroscope only.
earth-axes-convention:
type: int
description: |
Earth axes convention. Possible values:
0 = North-West-Up
1 = East-North-Up
2 = North-East-Down
default: 0
enum:
- 0
- 1
- 2
gyro-gain:
type: int
description: |
Determines the influence of the gyroscope relative to other
sensors, in percent. A value of zero percent will disable
initialisation and the acceleration and magnetic rejection
features. A value of 50 is appropriate for most applications.
default: 50
gyro-range:
type: int
description: |
Gyroscope range, in degrees per second. Angular rate recovery
will activate if the gyroscope measurement exceeds 98% of this
value. A value of zero will disable this feature.
The value should be set to the range specified in the
gyroscope datasheet. Default is 250 degrees per second (dps).
default: 250
accel-rejection:
type: int
description: |
Threshold (in degrees) used by the acceleration rejection
feature. A value of zero will disable this feature.
A value of 10 degrees is appropriate for most applications.
default: 10
magn-rejection:
type: int
description: |
Threshold (in degrees) used by the magnetic rejection
feature. A value of zero will disable the feature.
A value of 10 degrees is appropriate for most applications.
default: 10
recovery-trigger-period:
type: int
description: |
Acceleration and magnetic recovery trigger period, in samples.
A value of zero will disable the acceleration and magnetic
rejection features. A period of 5 seconds is appropriate
for most applications. If collecting 100 samples per second,
the appropriate value would be 500 samples.
default: 500
target-sample-rate-hz:
type: int
description: |
Target sample rate of running the sensor fusion algorithm, in Hz.
Set this to number of sensor_sample_fetch function calls you plan
to implement in your application code.
Default value is 100 Hz (100 times per second).
default: 100