Compare commits
No commits in common. "d3b6c912dd839a3bbffb52eae9871961ec6ce265" and "b27722f4661c91a98a36b2dbab0c76b8295daa18" have entirely different histories.
d3b6c912dd
...
b27722f466
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 50 KiB |
@ -49,10 +49,6 @@ 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.8800, z: -0.0800 mag: 1.0398
|
||||||
x: 0.5480, y: -0.8960, z: -0.0960 mag: 1.0547
|
x: 0.5480, y: -0.8960, z: -0.0960 mag: 1.0547
|
||||||
```
|
```
|
||||||
|
|
||||||
> ### Notes
|
|
||||||
> FIFO is always and only 10-bit
|
|
||||||
|
|
||||||
### Noise at 2G
|
### Noise at 2G
|
||||||

|

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