continue;
/* normalize difference against time interval */
- var time_delta = data[i][TIME] - data[i-1][TIME];
- if (time_delta)
+ if (i > 0)
+ {
+ var time_delta = data[i][TIME] - data[i-1][TIME];
+ if (time_delta)
{
- data_rx.push((data[i][RXB] - data[i-1][RXB]) / time_delta);
- data_tx.push((data[i][TXB] - data[i-1][TXB]) / time_delta);
+ data_rx.push((data[i][RXB] - data[i-1][RXB]) / time_delta);
+ data_tx.push((data[i][TXB] - data[i-1][TXB]) / time_delta);
+ }
}
}
data_rssi.push(data[i][RSSI] - noise_floor);
data_noise.push(data[i][NOISE] - noise_floor);
- data_rate.push(Math.floor(data[i][RATE] / 100));
+ data_rate.push(Math.floor(data[i][RATE] / 1000));
}
/* cut off outdated entries */