|
|
|
@ -42,10 +42,12 @@ class DatasetFetcher {
|
|
|
|
|
|
|
|
|
|
// console.log(`Distance from gateway: ${haversine(gateway_location, rssi)}m`);
|
|
|
|
|
|
|
|
|
|
let next_output = clamp(normalise(rssi.rssi,
|
|
|
|
|
{ min: this.settings.ai.rssi_min, max: this.settings.ai.rssi_max },
|
|
|
|
|
{ min: 0, max: 1 }
|
|
|
|
|
), 0, 1);
|
|
|
|
|
let next_output = [
|
|
|
|
|
clamp(normalise(rssi.rssi,
|
|
|
|
|
{ min: this.settings.ai.rssi_min, max: this.settings.ai.rssi_max },
|
|
|
|
|
{ min: 0, max: 1 }
|
|
|
|
|
), 0, 1)
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
result.push({
|
|
|
|
|
input: next_input,
|
|
|
|
@ -58,11 +60,16 @@ class DatasetFetcher {
|
|
|
|
|
reading.latitude,
|
|
|
|
|
reading.longitude
|
|
|
|
|
);
|
|
|
|
|
next_input.distance = haversine(gateway_location, reading);
|
|
|
|
|
next_input.distance = clamp(
|
|
|
|
|
normalise(haversine(gateway_location, reading),
|
|
|
|
|
{ min: 0, max: 20000 },
|
|
|
|
|
{ min: 0, max: 1 }
|
|
|
|
|
),
|
|
|
|
|
0, 1);
|
|
|
|
|
|
|
|
|
|
result.push({
|
|
|
|
|
input: next_input,
|
|
|
|
|
output: 0
|
|
|
|
|
output: [ 0 ]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|