fix ttn location parse
This commit is contained in:
parent
64b77c33b5
commit
7e42d3b8c9
@ -33,11 +33,8 @@ const CalculateTtnGatewayLocation = (event: TtnMessageReceivedEvent) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Calculate the weighted average to get the virtual location
|
// Calculate the weighted average to get the virtual location
|
||||||
const virtualLocation = {
|
virtualLocation.latitude = weightedLatitude / totalWeight;
|
||||||
latitude: weightedLatitude / totalWeight,
|
virtualLocation.longitude = weightedLongitude / totalWeight;
|
||||||
longitude: weightedLongitude / totalWeight
|
|
||||||
};
|
|
||||||
|
|
||||||
console.log("Tracker location based on TTN Gateway location:", virtualLocation);
|
console.log("Tracker location based on TTN Gateway location:", virtualLocation);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user