Skip to content

Instantly share code, notes, and snippets.

@prathje
Last active September 6, 2024 22:35
Show Gist options
  • Select an option

  • Save prathje/8832747a7ff8c0e548e2944189e576b4 to your computer and use it in GitHub Desktop.

Select an option

Save prathje/8832747a7ff8c0e548e2944189e576b4 to your computer and use it in GitHub Desktop.
3D STA LTA algorithm using moving window and circular buffer with delay option
/*
* 3D STA LTA algorithm using moving window and circular buffer
* 2024 Patrick Rathje
* CC BY-SA 4.0
*/
#include "stalta.h"
#include <string.h>
#include <math.h>
#include <float.h>
#include <stdio.h>
#include <assert.h>
struct stalta {
struct stalta_conf conf;
struct triple *buf;
size_t buf_len;
int buf_next_idx; // the index of the next measurement, i.e. circular buffer head
int window_next_idx; // the index of the next measurement to be included within both sta and lta windows
// Internal state variables
struct triple lta_agg;
struct triple sta_agg;
bool triggered_x, triggered_y, triggered_z;
} stalta;
static inline void triple_set(struct triple *t, float x, float y, float z) {
t->x = x;
t->y = y;
t->z = z;
}
int stalta_init(void *buf, size_t buf_len, struct stalta_conf *conf) {
stalta.conf = *conf;
stalta.buf = (struct triple *) buf;
stalta.buf_len = buf_len / sizeof(struct triple);
// Check, if the delay is not too long
assert(stalta.conf.delay >= 0);
assert(stalta.conf.lta_window_size + stalta.conf.delay <= stalta.buf_len);
assert(stalta.conf.sta_window_size < stalta.conf.lta_window_size);
assert(stalta.conf.detrigger_threshold < stalta.conf.trigger_threshold);
// The oldest window entry resides directly at the beginning of the buffer
stalta.window_next_idx = stalta.conf.lta_window_size %
stalta.buf_len; // we pretent to have already stalta.conf.lta_window_size measurements in the window
size_t num_stored = stalta.conf.lta_window_size + stalta.conf.delay;
stalta.buf_next_idx =
num_stored % stalta.buf_len; // we pretend to have already stalta.conf.delay more measurements in the buffer
assert(num_stored <= stalta.buf_len);
// we initialize the whole stalta plus delay window with the initial mean to avoid triggering right at the beginning
for (size_t i = 0; i < num_stored; i++) {
triple_set(&stalta.buf[i], conf->initial_mean.x, conf->initial_mean.y, conf->initial_mean.z);
}
triple_set(&stalta.lta_agg, conf->initial_mean.x*stalta.conf.lta_window_size, conf->initial_mean.y*stalta.conf.lta_window_size, conf->initial_mean.z*stalta.conf.lta_window_size);
triple_set(&stalta.sta_agg, conf->initial_mean.x*stalta.conf.sta_window_size, conf->initial_mean.y*stalta.conf.sta_window_size, conf->initial_mean.z*stalta.conf.sta_window_size);
stalta.triggered_x = false;
stalta.triggered_y = false;
stalta.triggered_z = false;
return 0;
}
static inline void triple_add_and_sub_abs(struct triple *dest, struct triple *add, struct triple *sub) {
dest->x += fabsf(add->x) - fabsf(sub->x);
dest->y += fabsf(add->y) - fabsf(sub->y);
dest->z += fabsf(add->z) - fabsf(sub->z);
}
void update_trigger_state() {
float sta_x = stalta.sta_agg.x / (float) (stalta.conf.sta_window_size);
float sta_y = stalta.sta_agg.y / (float) (stalta.conf.sta_window_size);
float sta_z = stalta.sta_agg.z / (float) (stalta.conf.sta_window_size);
float lta_x = stalta.lta_agg.x / (float) (stalta.conf.lta_window_size);
float lta_y = stalta.lta_agg.y / (float) (stalta.conf.lta_window_size);
float lta_z = stalta.lta_agg.z / (float) (stalta.conf.lta_window_size);
float sta_div_lta_x = lta_x > FLT_EPSILON ? sta_x / lta_x : 0.0;
float sta_div_lta_y = lta_y > FLT_EPSILON ? sta_y / lta_y : 0.0;
float sta_div_lta_z = lta_z > FLT_EPSILON ? sta_z / lta_z : 0.0;
if (sta_div_lta_x > stalta.conf.trigger_threshold) {
stalta.triggered_x = true;
} else if (sta_div_lta_x < stalta.conf.detrigger_threshold) {
stalta.triggered_x = false;
}
if (sta_div_lta_y > stalta.conf.trigger_threshold) {
stalta.triggered_y = true;
} else if (sta_div_lta_y < stalta.conf.detrigger_threshold) {
stalta.triggered_y = false;
}
if (sta_div_lta_z > stalta.conf.trigger_threshold) {
stalta.triggered_z = true;
} else if (sta_div_lta_z < stalta.conf.detrigger_threshold) {
stalta.triggered_z = false;
}
}
static inline size_t calc_oldest_lta_measurement_idx() {
return (stalta.window_next_idx - stalta.conf.lta_window_size + stalta.buf_len) % stalta.buf_len; // +stalta.buf_len might not be necessary
}
static inline size_t calc_oldest_sta_measurement_idx() {
return (stalta.window_next_idx - stalta.conf.sta_window_size + stalta.buf_len) % stalta.buf_len; // +stalta.buf_len might not be necessary
}
void print_debug_state() {
printf("sta_agg: %f, %f, %f\n", (double) stalta.sta_agg.x, (double) stalta.sta_agg.y, (double) stalta.sta_agg.z);
printf("lta_agg: %f, %f, %f\n", (double) stalta.lta_agg.x, (double) stalta.lta_agg.y, (double) stalta.lta_agg.z);
printf("indices: window_next_idx %d, buf_next_idx %d\n", stalta.window_next_idx, stalta.buf_next_idx);
size_t oldest_lta_measurement_idx = calc_oldest_lta_measurement_idx();
size_t oldest_sta_measurement_idx = calc_oldest_sta_measurement_idx();
printf("oldest_lta_measurement_idx: %zu\n", oldest_lta_measurement_idx);
printf("oldest_sta_measurement_idx: %zu\n", oldest_sta_measurement_idx);
}
// Add a new measurement to the STA/LTA algorithm. Returns true if it triggered, false otherwise
bool stalta_add_measurement(float x, float y, float z) {
size_t oldest_lta_measurement_idx = calc_oldest_lta_measurement_idx();
size_t oldest_sta_measurement_idx = calc_oldest_sta_measurement_idx();
struct triple oldest_lta_measurement = stalta.buf[oldest_lta_measurement_idx];
struct triple oldest_sta_measurement = stalta.buf[oldest_sta_measurement_idx];
//print_debug_state();
// Add the new measurement to the buffer, we first extract the oldest measurement so we do not override the old one
{
triple_set(&stalta.buf[stalta.buf_next_idx], x, y, z);
stalta.buf_next_idx = (stalta.buf_next_idx + 1) % stalta.buf_len;
}
struct triple next_measurement = stalta.buf[stalta.window_next_idx];
stalta.window_next_idx = (stalta.window_next_idx + 1) %
stalta.buf_len; // advance the window by one, note that this also wraps around!
//print_debug_state();
// add the newest measurement and subtract the oldest measurement from the lta aggregate
// we do not need to keep track of the oldest measurement, as we will overwrite it in the next iteration
triple_add_and_sub_abs(&stalta.lta_agg, &next_measurement, &oldest_lta_measurement);
triple_add_and_sub_abs(&stalta.sta_agg, &next_measurement, &oldest_sta_measurement);
//printf("#################: %f\n", (double) oldest_lta_measurement.x);
update_trigger_state();
return (stalta.triggered_x || stalta.triggered_y || stalta.triggered_z);
}
static inline void reverse_triples(struct triple arr[], size_t size) {
for (int i = 0; i < size / 2; i++) {
struct triple temp = arr[i];
arr[i] = arr[size - 1 - i];
arr[size - 1 - i] = temp;
}
}
static void rotate_triples(struct triple *arr, size_t size, int rot) {
reverse_triples(arr, rot);
reverse_triples(arr + rot, size - rot);
reverse_triples(arr, size);
}
static void rotate_buffer(int rot) {
rotate_triples(stalta.buf, stalta.buf_len, rot);
// Update the window and buffer indices
stalta.window_next_idx = (stalta.window_next_idx + stalta.buf_len - rot) % stalta.buf_len;
stalta.buf_next_idx = (stalta.buf_next_idx + stalta.buf_len - rot) % stalta.buf_len;
}
void stalta_align_buffer() {
rotate_buffer(calc_oldest_lta_measurement_idx());
}
static void print_nice_formatted_buffer() {
int blanks = 4;
printf("------------------------------------------------------------------------\n");
printf("Indices:\t");
for (int i = 0; i < stalta.buf_len; i++) {
printf("%d\t", i);
}
printf("\n");
printf("Buffer: \t");
for (int i = 0; i < stalta.buf_len; i++) {
printf("%.2f\t", (double) stalta.buf[i].x);
}
printf("\n");
printf("Boundaries: \t");
size_t oldest_lta_measurement_idx = calc_oldest_lta_measurement_idx();
size_t oldest_sta_measurement_idx = calc_oldest_sta_measurement_idx();
size_t next_idx = stalta.window_next_idx;
size_t next_buf_idx = stalta.buf_next_idx;
for (int i = 0; i < stalta.buf_len; i++) {
if (i == oldest_lta_measurement_idx) {
printf("[L");
}
if (i == oldest_sta_measurement_idx) {
printf("[S");
}
if ((i + 1) % stalta.buf_len == next_idx) {
printf("]]");
}
if (i == next_idx) {
printf("N");
}
if (i == next_buf_idx) {
printf("B");
}
printf("\t");
}
printf("\n");
printf("------------------------------------------------------------------------\n");
}
//#define STALTA_TEST 0
#ifdef STALTA_TEST
int main() {
struct stalta_conf conf = {
.sta_window_size = 2,
.lta_window_size = 5,
.trigger_threshold = 1.5,
.detrigger_threshold = 1.0,
.initial_mean = {0.5, -1.0, 2.0},
.delay = 2
};
struct triple buf[20];
stalta_init(buf, sizeof(buf), &conf);
print_nice_formatted_buffer();
for (int i = 0; i < 30; i++) {
bool triggered = stalta_add_measurement((float) ((i % 5) * 100), 0.0, 0.0);
if (triggered) {
printf("TRIGGERED: %d\n", i);
} else {
printf("NOT triggered: %d\n", i);
}
}
print_nice_formatted_buffer();
printf("# Aligning\n");
stalta_align_buffer();
print_nice_formatted_buffer();
}
#endif
/*
* 3D STA LTA algorithm using moving window and circular buffer
* 2024 Patrick Rathje
* CC BY-SA 4.0
*/
#ifndef STALTA_H
#define STALTA_H
#include <stdbool.h>
#include <stddef.h>
struct __attribute__((__packed__)) triple {
float x;
float y;
float z;
};
/*
* Configuration for the STA/LTA algorithm
*/
struct stalta_conf {
size_t lta_window_size;
size_t sta_window_size;
size_t delay;
float trigger_threshold;
float detrigger_threshold;
struct triple initial_mean;
};
/* This is defined in the c file
struct stalta {
struct triple* buffer;
struct stalta_conf; // copied in stalta_init
} stalta;*/
/*
* Initializes stalta_state (defined in c file) with the stalta configuration
*/
int stalta_init(void* buf, size_t buf_len, struct stalta_conf* conf);
/*
* Add a new measurement to the STA/LTA algorithm. Returns true if it triggered
* State is saved in stalta_state
*/
bool stalta_add_measurement(float x, float y, float z);
/*
* Rotates the circular buffer so that the oldest value is at position 0
*/
void stalta_align_buffer();
#endif /* STALTA_H */
gcc -std=c99 stalta.c && ./a.out
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Buffer: 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 2281823872690198219031838720.00 0.00 0.00 0.00
Boundaries: [L [S ]] N B
------------------------------------------------------------------------
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 5, buf_next_idx 7
oldest_lta_measurement_idx: 0
oldest_sta_measurement_idx: 3
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 6, buf_next_idx 8
oldest_lta_measurement_idx: 1
oldest_sta_measurement_idx: 4
#################: 0.500000
NOT triggered: 0
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 6, buf_next_idx 8
oldest_lta_measurement_idx: 1
oldest_sta_measurement_idx: 4
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 7, buf_next_idx 9
oldest_lta_measurement_idx: 2
oldest_sta_measurement_idx: 5
#################: 0.500000
NOT triggered: 1
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 7, buf_next_idx 9
oldest_lta_measurement_idx: 2
oldest_sta_measurement_idx: 5
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 8, buf_next_idx 10
oldest_lta_measurement_idx: 3
oldest_sta_measurement_idx: 6
#################: 0.500000
NOT triggered: 2
sta_agg: 0.500000, -3.000000, 2.000000
lta_agg: 2.000000, -6.000000, 8.000000
indices: window_next_idx 8, buf_next_idx 10
oldest_lta_measurement_idx: 3
oldest_sta_measurement_idx: 6
sta_agg: 0.500000, -3.000000, 2.000000
lta_agg: 2.000000, -6.000000, 8.000000
indices: window_next_idx 9, buf_next_idx 11
oldest_lta_measurement_idx: 4
oldest_sta_measurement_idx: 7
#################: 0.500000
TRIGGERED: 3
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 101.500000, -7.000000, 6.000000
indices: window_next_idx 9, buf_next_idx 11
oldest_lta_measurement_idx: 4
oldest_sta_measurement_idx: 7
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 101.500000, -7.000000, 6.000000
indices: window_next_idx 10, buf_next_idx 12
oldest_lta_measurement_idx: 5
oldest_sta_measurement_idx: 8
#################: 0.500000
TRIGGERED: 4
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 301.000000, -8.000000, 4.000000
indices: window_next_idx 10, buf_next_idx 12
oldest_lta_measurement_idx: 5
oldest_sta_measurement_idx: 8
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 301.000000, -8.000000, 4.000000
indices: window_next_idx 11, buf_next_idx 13
oldest_lta_measurement_idx: 6
oldest_sta_measurement_idx: 9
#################: 0.500000
TRIGGERED: 5
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 600.500000, -9.000000, 2.000000
indices: window_next_idx 11, buf_next_idx 13
oldest_lta_measurement_idx: 6
oldest_sta_measurement_idx: 9
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 600.500000, -9.000000, 2.000000
indices: window_next_idx 12, buf_next_idx 14
oldest_lta_measurement_idx: 7
oldest_sta_measurement_idx: 10
#################: 0.500000
TRIGGERED: 6
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 12, buf_next_idx 14
oldest_lta_measurement_idx: 7
oldest_sta_measurement_idx: 10
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 13, buf_next_idx 15
oldest_lta_measurement_idx: 8
oldest_sta_measurement_idx: 11
#################: 0.000000
TRIGGERED: 7
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 13, buf_next_idx 15
oldest_lta_measurement_idx: 8
oldest_sta_measurement_idx: 11
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 14, buf_next_idx 16
oldest_lta_measurement_idx: 9
oldest_sta_measurement_idx: 12
#################: 100.000000
NOT triggered: 8
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 14, buf_next_idx 16
oldest_lta_measurement_idx: 9
oldest_sta_measurement_idx: 12
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 15, buf_next_idx 17
oldest_lta_measurement_idx: 10
oldest_sta_measurement_idx: 13
#################: 200.000000
NOT triggered: 9
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 15, buf_next_idx 17
oldest_lta_measurement_idx: 10
oldest_sta_measurement_idx: 13
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 16, buf_next_idx 18
oldest_lta_measurement_idx: 11
oldest_sta_measurement_idx: 14
#################: 300.000000
NOT triggered: 10
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 16, buf_next_idx 18
oldest_lta_measurement_idx: 11
oldest_sta_measurement_idx: 14
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 17, buf_next_idx 19
oldest_lta_measurement_idx: 12
oldest_sta_measurement_idx: 15
#################: 400.000000
TRIGGERED: 11
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 17, buf_next_idx 19
oldest_lta_measurement_idx: 12
oldest_sta_measurement_idx: 15
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 18, buf_next_idx 0
oldest_lta_measurement_idx: 13
oldest_sta_measurement_idx: 16
#################: 0.000000
TRIGGERED: 12
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 18, buf_next_idx 0
oldest_lta_measurement_idx: 13
oldest_sta_measurement_idx: 16
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 19, buf_next_idx 1
oldest_lta_measurement_idx: 14
oldest_sta_measurement_idx: 17
#################: 100.000000
NOT triggered: 13
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 19, buf_next_idx 1
oldest_lta_measurement_idx: 14
oldest_sta_measurement_idx: 17
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 0, buf_next_idx 2
oldest_lta_measurement_idx: 15
oldest_sta_measurement_idx: 18
#################: 200.000000
NOT triggered: 14
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 0, buf_next_idx 2
oldest_lta_measurement_idx: 15
oldest_sta_measurement_idx: 18
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 1, buf_next_idx 3
oldest_lta_measurement_idx: 16
oldest_sta_measurement_idx: 19
#################: 300.000000
NOT triggered: 15
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 1, buf_next_idx 3
oldest_lta_measurement_idx: 16
oldest_sta_measurement_idx: 19
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 2, buf_next_idx 4
oldest_lta_measurement_idx: 17
oldest_sta_measurement_idx: 0
#################: 400.000000
TRIGGERED: 16
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 2, buf_next_idx 4
oldest_lta_measurement_idx: 17
oldest_sta_measurement_idx: 0
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 3, buf_next_idx 5
oldest_lta_measurement_idx: 18
oldest_sta_measurement_idx: 1
#################: 0.000000
TRIGGERED: 17
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 3, buf_next_idx 5
oldest_lta_measurement_idx: 18
oldest_sta_measurement_idx: 1
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 4, buf_next_idx 6
oldest_lta_measurement_idx: 19
oldest_sta_measurement_idx: 2
#################: 100.000000
NOT triggered: 18
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 4, buf_next_idx 6
oldest_lta_measurement_idx: 19
oldest_sta_measurement_idx: 2
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 5, buf_next_idx 7
oldest_lta_measurement_idx: 0
oldest_sta_measurement_idx: 3
#################: 200.000000
NOT triggered: 19
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 5, buf_next_idx 7
oldest_lta_measurement_idx: 0
oldest_sta_measurement_idx: 3
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 6, buf_next_idx 8
oldest_lta_measurement_idx: 1
oldest_sta_measurement_idx: 4
#################: 300.000000
NOT triggered: 20
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 6, buf_next_idx 8
oldest_lta_measurement_idx: 1
oldest_sta_measurement_idx: 4
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 7, buf_next_idx 9
oldest_lta_measurement_idx: 2
oldest_sta_measurement_idx: 5
#################: 400.000000
TRIGGERED: 21
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 7, buf_next_idx 9
oldest_lta_measurement_idx: 2
oldest_sta_measurement_idx: 5
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 8, buf_next_idx 10
oldest_lta_measurement_idx: 3
oldest_sta_measurement_idx: 6
#################: 0.000000
TRIGGERED: 22
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 8, buf_next_idx 10
oldest_lta_measurement_idx: 3
oldest_sta_measurement_idx: 6
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 9, buf_next_idx 11
oldest_lta_measurement_idx: 4
oldest_sta_measurement_idx: 7
#################: 100.000000
NOT triggered: 23
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 9, buf_next_idx 11
oldest_lta_measurement_idx: 4
oldest_sta_measurement_idx: 7
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 10, buf_next_idx 12
oldest_lta_measurement_idx: 5
oldest_sta_measurement_idx: 8
#################: 200.000000
NOT triggered: 24
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 10, buf_next_idx 12
oldest_lta_measurement_idx: 5
oldest_sta_measurement_idx: 8
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 11, buf_next_idx 13
oldest_lta_measurement_idx: 6
oldest_sta_measurement_idx: 9
#################: 300.000000
NOT triggered: 25
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 11, buf_next_idx 13
oldest_lta_measurement_idx: 6
oldest_sta_measurement_idx: 9
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 12, buf_next_idx 14
oldest_lta_measurement_idx: 7
oldest_sta_measurement_idx: 10
#################: 400.000000
TRIGGERED: 26
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 12, buf_next_idx 14
oldest_lta_measurement_idx: 7
oldest_sta_measurement_idx: 10
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 13, buf_next_idx 15
oldest_lta_measurement_idx: 8
oldest_sta_measurement_idx: 11
#################: 0.000000
TRIGGERED: 27
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 13, buf_next_idx 15
oldest_lta_measurement_idx: 8
oldest_sta_measurement_idx: 11
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 14, buf_next_idx 16
oldest_lta_measurement_idx: 9
oldest_sta_measurement_idx: 12
#################: 100.000000
NOT triggered: 28
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 14, buf_next_idx 16
oldest_lta_measurement_idx: 9
oldest_sta_measurement_idx: 12
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 15, buf_next_idx 17
oldest_lta_measurement_idx: 10
oldest_sta_measurement_idx: 13
#################: 200.000000
NOT triggered: 29
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Buffer: 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00
Boundaries: [L [S ]] N B
------------------------------------------------------------------------
# Aligning
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Buffer: 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00
Boundaries: [L [S ]] N B
------------------------------------------------------------------------
➜ stalta gcc -std=c99 stalta.c && ./a.out
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Buffer: 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1223689802513951752192.00 300037325376553984769130496.00 0.00 0.00 0.00
Boundaries: [L [S ]] N B
------------------------------------------------------------------------
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 5, buf_next_idx 7
oldest_lta_measurement_idx: 0
oldest_sta_measurement_idx: 3
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 6, buf_next_idx 8
oldest_lta_measurement_idx: 1
oldest_sta_measurement_idx: 4
#################: 0.500000
NOT triggered: 0
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 6, buf_next_idx 8
oldest_lta_measurement_idx: 1
oldest_sta_measurement_idx: 4
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 7, buf_next_idx 9
oldest_lta_measurement_idx: 2
oldest_sta_measurement_idx: 5
#################: 0.500000
NOT triggered: 1
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 7, buf_next_idx 9
oldest_lta_measurement_idx: 2
oldest_sta_measurement_idx: 5
sta_agg: 1.000000, -2.000000, 4.000000
lta_agg: 2.500000, -5.000000, 10.000000
indices: window_next_idx 8, buf_next_idx 10
oldest_lta_measurement_idx: 3
oldest_sta_measurement_idx: 6
#################: 0.500000
NOT triggered: 2
sta_agg: 0.500000, -3.000000, 2.000000
lta_agg: 2.000000, -6.000000, 8.000000
indices: window_next_idx 8, buf_next_idx 10
oldest_lta_measurement_idx: 3
oldest_sta_measurement_idx: 6
sta_agg: 0.500000, -3.000000, 2.000000
lta_agg: 2.000000, -6.000000, 8.000000
indices: window_next_idx 9, buf_next_idx 11
oldest_lta_measurement_idx: 4
oldest_sta_measurement_idx: 7
#################: 0.500000
TRIGGERED: 3
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 101.500000, -7.000000, 6.000000
indices: window_next_idx 9, buf_next_idx 11
oldest_lta_measurement_idx: 4
oldest_sta_measurement_idx: 7
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 101.500000, -7.000000, 6.000000
indices: window_next_idx 10, buf_next_idx 12
oldest_lta_measurement_idx: 5
oldest_sta_measurement_idx: 8
#################: 0.500000
TRIGGERED: 4
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 301.000000, -8.000000, 4.000000
indices: window_next_idx 10, buf_next_idx 12
oldest_lta_measurement_idx: 5
oldest_sta_measurement_idx: 8
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 301.000000, -8.000000, 4.000000
indices: window_next_idx 11, buf_next_idx 13
oldest_lta_measurement_idx: 6
oldest_sta_measurement_idx: 9
#################: 0.500000
TRIGGERED: 5
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 600.500000, -9.000000, 2.000000
indices: window_next_idx 11, buf_next_idx 13
oldest_lta_measurement_idx: 6
oldest_sta_measurement_idx: 9
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 600.500000, -9.000000, 2.000000
indices: window_next_idx 12, buf_next_idx 14
oldest_lta_measurement_idx: 7
oldest_sta_measurement_idx: 10
#################: 0.500000
TRIGGERED: 6
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 12, buf_next_idx 14
oldest_lta_measurement_idx: 7
oldest_sta_measurement_idx: 10
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 13, buf_next_idx 15
oldest_lta_measurement_idx: 8
oldest_sta_measurement_idx: 11
#################: 0.000000
TRIGGERED: 7
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 13, buf_next_idx 15
oldest_lta_measurement_idx: 8
oldest_sta_measurement_idx: 11
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 14, buf_next_idx 16
oldest_lta_measurement_idx: 9
oldest_sta_measurement_idx: 12
#################: 100.000000
NOT triggered: 8
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 14, buf_next_idx 16
oldest_lta_measurement_idx: 9
oldest_sta_measurement_idx: 12
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 15, buf_next_idx 17
oldest_lta_measurement_idx: 10
oldest_sta_measurement_idx: 13
#################: 200.000000
NOT triggered: 9
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 15, buf_next_idx 17
oldest_lta_measurement_idx: 10
oldest_sta_measurement_idx: 13
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 16, buf_next_idx 18
oldest_lta_measurement_idx: 11
oldest_sta_measurement_idx: 14
#################: 300.000000
NOT triggered: 10
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 16, buf_next_idx 18
oldest_lta_measurement_idx: 11
oldest_sta_measurement_idx: 14
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 17, buf_next_idx 19
oldest_lta_measurement_idx: 12
oldest_sta_measurement_idx: 15
#################: 400.000000
TRIGGERED: 11
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 17, buf_next_idx 19
oldest_lta_measurement_idx: 12
oldest_sta_measurement_idx: 15
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 18, buf_next_idx 0
oldest_lta_measurement_idx: 13
oldest_sta_measurement_idx: 16
#################: 0.000000
TRIGGERED: 12
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 18, buf_next_idx 0
oldest_lta_measurement_idx: 13
oldest_sta_measurement_idx: 16
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 19, buf_next_idx 1
oldest_lta_measurement_idx: 14
oldest_sta_measurement_idx: 17
#################: 100.000000
NOT triggered: 13
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 19, buf_next_idx 1
oldest_lta_measurement_idx: 14
oldest_sta_measurement_idx: 17
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 0, buf_next_idx 2
oldest_lta_measurement_idx: 15
oldest_sta_measurement_idx: 18
#################: 200.000000
NOT triggered: 14
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 0, buf_next_idx 2
oldest_lta_measurement_idx: 15
oldest_sta_measurement_idx: 18
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 1, buf_next_idx 3
oldest_lta_measurement_idx: 16
oldest_sta_measurement_idx: 19
#################: 300.000000
NOT triggered: 15
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 1, buf_next_idx 3
oldest_lta_measurement_idx: 16
oldest_sta_measurement_idx: 19
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 2, buf_next_idx 4
oldest_lta_measurement_idx: 17
oldest_sta_measurement_idx: 0
#################: 400.000000
TRIGGERED: 16
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 2, buf_next_idx 4
oldest_lta_measurement_idx: 17
oldest_sta_measurement_idx: 0
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 3, buf_next_idx 5
oldest_lta_measurement_idx: 18
oldest_sta_measurement_idx: 1
#################: 0.000000
TRIGGERED: 17
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 3, buf_next_idx 5
oldest_lta_measurement_idx: 18
oldest_sta_measurement_idx: 1
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 4, buf_next_idx 6
oldest_lta_measurement_idx: 19
oldest_sta_measurement_idx: 2
#################: 100.000000
NOT triggered: 18
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 4, buf_next_idx 6
oldest_lta_measurement_idx: 19
oldest_sta_measurement_idx: 2
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 5, buf_next_idx 7
oldest_lta_measurement_idx: 0
oldest_sta_measurement_idx: 3
#################: 200.000000
NOT triggered: 19
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 5, buf_next_idx 7
oldest_lta_measurement_idx: 0
oldest_sta_measurement_idx: 3
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 6, buf_next_idx 8
oldest_lta_measurement_idx: 1
oldest_sta_measurement_idx: 4
#################: 300.000000
NOT triggered: 20
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 6, buf_next_idx 8
oldest_lta_measurement_idx: 1
oldest_sta_measurement_idx: 4
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 7, buf_next_idx 9
oldest_lta_measurement_idx: 2
oldest_sta_measurement_idx: 5
#################: 400.000000
TRIGGERED: 21
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 7, buf_next_idx 9
oldest_lta_measurement_idx: 2
oldest_sta_measurement_idx: 5
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 8, buf_next_idx 10
oldest_lta_measurement_idx: 3
oldest_sta_measurement_idx: 6
#################: 0.000000
TRIGGERED: 22
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 8, buf_next_idx 10
oldest_lta_measurement_idx: 3
oldest_sta_measurement_idx: 6
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 9, buf_next_idx 11
oldest_lta_measurement_idx: 4
oldest_sta_measurement_idx: 7
#################: 100.000000
NOT triggered: 23
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 9, buf_next_idx 11
oldest_lta_measurement_idx: 4
oldest_sta_measurement_idx: 7
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 10, buf_next_idx 12
oldest_lta_measurement_idx: 5
oldest_sta_measurement_idx: 8
#################: 200.000000
NOT triggered: 24
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 10, buf_next_idx 12
oldest_lta_measurement_idx: 5
oldest_sta_measurement_idx: 8
sta_agg: 300.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 11, buf_next_idx 13
oldest_lta_measurement_idx: 6
oldest_sta_measurement_idx: 9
#################: 300.000000
NOT triggered: 25
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 11, buf_next_idx 13
oldest_lta_measurement_idx: 6
oldest_sta_measurement_idx: 9
sta_agg: 500.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 12, buf_next_idx 14
oldest_lta_measurement_idx: 7
oldest_sta_measurement_idx: 10
#################: 400.000000
TRIGGERED: 26
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 12, buf_next_idx 14
oldest_lta_measurement_idx: 7
oldest_sta_measurement_idx: 10
sta_agg: 700.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 13, buf_next_idx 15
oldest_lta_measurement_idx: 8
oldest_sta_measurement_idx: 11
#################: 0.000000
TRIGGERED: 27
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 13, buf_next_idx 15
oldest_lta_measurement_idx: 8
oldest_sta_measurement_idx: 11
sta_agg: 400.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 14, buf_next_idx 16
oldest_lta_measurement_idx: 9
oldest_sta_measurement_idx: 12
#################: 100.000000
NOT triggered: 28
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 14, buf_next_idx 16
oldest_lta_measurement_idx: 9
oldest_sta_measurement_idx: 12
sta_agg: 100.000000, -4.000000, 0.000000
lta_agg: 1000.000000, -10.000000, 0.000000
indices: window_next_idx 15, buf_next_idx 17
oldest_lta_measurement_idx: 10
oldest_sta_measurement_idx: 13
#################: 200.000000
NOT triggered: 29
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Buffer: 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00
Boundaries: [L [S ]] N B
------------------------------------------------------------------------
# Aligning
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Buffer: 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00 300.00 400.00 0.00 100.00 200.00
Boundaries: [L [S ]] N B
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.00 0.00
Boundaries: [L [S ]] NB
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.00 0.00
Boundaries: [L [S ]] NB
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.00 1.00
Boundaries: NB [L [S ]]
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.00 1.00
Boundaries: ]] NB [L [S
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 0.50 0.50 0.50 0.50 0.50 0.50 0.00 1.00
Boundaries: [S ]] NB [L
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 4.00 0.50 0.50 0.50 0.50 0.50 0.00 1.00
Boundaries: [S ]] NB [L
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 4.00 5.00 0.50 0.50 0.50 0.50 0.00 1.00
Boundaries: [S ]] NB [L
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 4.00 5.00 6.00 0.50 0.50 0.50 0.00 1.00
Boundaries: [S ]] NB [L
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 4.00 5.00 6.00 7.00 0.50 0.50 0.00 1.00
Boundaries: [S ]] NB [L
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 4.00 5.00 6.00 7.00 8.00 0.50 0.00 1.00
Boundaries: [S ]] NB [L
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 0.00 1.00
Boundaries: [L [S ]] NB
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 1.00
Boundaries: [L [S ]] NB
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00
Boundaries: NB [L [S ]]
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 12.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00
Boundaries: ]] NB [L [S
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 12.00 13.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00
Boundaries: [S ]] NB [L
------------------------------------------------------------------------
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 12.00 13.00 14.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00
Boundaries: [S ]] NB [L
------------------------------------------------------------------------
# Aligning
------------------------------------------------------------------------
Indices: 0 1 2 3 4 5 6 7 8 9
Buffer: 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 5.00 6.00
Boundaries: [L [S ]] NB
------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment