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