Compare commits
2 Commits
b27722f466
...
d3b6c912dd
Author | SHA1 | Date | |
---|---|---|---|
d3b6c912dd | |||
ecf00e3584 |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 41 KiB |
@ -49,6 +49,10 @@ x: 0.5480, y: -0.8800, z: -0.0720 mag: 1.0392
|
||||
x: 0.5480, y: -0.8800, z: -0.0800 mag: 1.0398
|
||||
x: 0.5480, y: -0.8960, z: -0.0960 mag: 1.0547
|
||||
```
|
||||
|
||||
> ### Notes
|
||||
> FIFO is always and only 10-bit
|
||||
|
||||
### Noise at 2G
|
||||

|
||||
|
||||
|
3200
data/fifo_16g_100.txt
Normal file
3200
data/fifo_16g_200.txt
Normal file
3200
data/fifo_16g_400.txt
Normal file
3200
data/fifo_16g_50.txt
Normal file
3200
data/fifo_2g_100.txt
Normal file
3200
data/fifo_2g_200.txt
Normal file
3200
data/fifo_2g_400.txt
Normal file
3200
data/fifo_2g_50.txt
Normal file
3200
data/fifo_4g_100.txt
Normal file
3200
data/fifo_4g_200.txt
Normal file
3200
data/fifo_4g_400.txt
Normal file
3200
data/fifo_4g_50.txt
Normal file
3200
data/fifo_8g_100.txt
Normal file
3200
data/fifo_8g_200.txt
Normal file
3200
data/fifo_8g_400.txt
Normal file
3200
data/fifo_8g_50.txt
Normal file
3200
data/hr_16g_1.txt
3200
data/hr_16g_10.txt
3200
data/hr_16g_100.txt
3200
data/hr_16g_200.txt
3200
data/hr_16g_25.txt
3200
data/hr_16g_400.txt
3200
data/hr_16g_50.txt
3200
data/hr_2g_1.txt
3200
data/hr_2g_10.txt
3200
data/hr_2g_100.txt
3200
data/hr_2g_200.txt
3200
data/hr_2g_25.txt
3200
data/hr_2g_400.txt
3200
data/hr_2g_50.txt
3200
data/hr_4g_1.txt
3200
data/hr_4g_10.txt
3200
data/hr_4g_100.txt
3200
data/hr_4g_200.txt
3200
data/hr_4g_25.txt
3200
data/hr_4g_400.txt
3200
data/hr_4g_50.txt
3200
data/hr_8g_1.txt
3200
data/hr_8g_10.txt
3200
data/hr_8g_100.txt
3200
data/hr_8g_200.txt
3200
data/hr_8g_25.txt
3200
data/hr_8g_400.txt
3200
data/hr_8g_50.txt
15
lis3dh.c
@ -294,8 +294,19 @@ int lis3dh_read_fifo(lis3dh_t *lis3dh, struct lis3dh_fifo_data *fifo) {
|
||||
int err = 0;
|
||||
int i, idx;
|
||||
|
||||
scale = acc_shift(lis3dh);
|
||||
sens = acc_sensitivity(lis3dh);
|
||||
/* FIFO is always 10-bit */
|
||||
scale = 6;
|
||||
|
||||
/* normal mode */
|
||||
if (lis3dh->cfg.range == LIS3DH_FS_2G) {
|
||||
sens = 4;
|
||||
} else if (lis3dh->cfg.range == LIS3DH_FS_4G) {
|
||||
sens = 8;
|
||||
} else if (lis3dh->cfg.range == LIS3DH_FS_8G) {
|
||||
sens = 16;
|
||||
} else { /* 16G */
|
||||
sens = 48;
|
||||
}
|
||||
|
||||
/* fifo buffer is max 32 */
|
||||
fifo->size = lis3dh->cfg.fifo.fth > 32 ? 32 : lis3dh->cfg.fifo.fth;
|
||||
|
11
plot.gp
@ -7,20 +7,17 @@ set key box opaque
|
||||
|
||||
set ylabel "|[x y z]| - 1g"
|
||||
set xlabel "Samples over time"
|
||||
set yrange [-0.2:0.2]
|
||||
set yrange [-0.3:0.1]
|
||||
|
||||
n(g) = g - 1.0
|
||||
|
||||
do for [g in "2g 4g 8g 16g"] {
|
||||
name = sprintf("graph-%s", g)
|
||||
out = sprintf("%s.png", name)
|
||||
stub = sprintf("data/hr_%s_", g)
|
||||
set title sprintf("[%s + HR] comparison of ODR setting effect on magnitude of [x y z] acc vector (- 1g)", g)
|
||||
stub = sprintf("data/fifo_%s_", g)
|
||||
set title sprintf("[%s FIFO] comparison of ODR setting effect on magnitude of [x y z] acc vector (- 1g)", g)
|
||||
set output out
|
||||
plot stub."1.txt" u n(4) w p ps 0.3 t "1 Hz", \
|
||||
stub."10.txt" u n(4) w p ps 0.3 t "10 Hz", \
|
||||
stub."25.txt" u n(4) w p ps 0.3 t "25 Hz", \
|
||||
stub."50.txt" u n(4) w p ps 0.3 t "50 Hz", \
|
||||
plot stub."50.txt" u n(4) w p ps 0.3 t "50 Hz", \
|
||||
stub."100.txt" u n(4) w p ps 0.3 t "100 Hz", \
|
||||
stub."200.txt" u n(4) w p ps 0.3 t "200 Hz", \
|
||||
stub."400.txt" u n(4) w p ps 0.3 t "400 Hz", \
|
||||
|