diff --git a/Application/Controllers/IndexerController.cs b/Application/Controllers/IndexerController.cs index 2be188a..8b9b69e 100644 --- a/Application/Controllers/IndexerController.cs +++ b/Application/Controllers/IndexerController.cs @@ -25,7 +25,7 @@ public IndexerController( public async Task GetHistoryForPlane([FromQuery] string hexValue, [FromQuery] long? time) { var tim = time ?? ExtractTimestamp(_clock.GetUtcNow()); - var result = await _service.RetrievePlaneHistory(hexValue.ToLower(), tim);//time ?? (long)(_clock.GetUtcNow() - DateTime.UnixEpoch).TotalSeconds); + var result = await _service.RetrievePlaneHistory(hexValue.ToUpper(), tim);//time ?? (long)(_clock.GetUtcNow() - DateTime.UnixEpoch).TotalSeconds); return result; } diff --git a/DomainService/AggregatorDomainService.cs b/DomainService/AggregatorDomainService.cs index f303980..204d361 100644 --- a/DomainService/AggregatorDomainService.cs +++ b/DomainService/AggregatorDomainService.cs @@ -50,6 +50,7 @@ private async Task CompilePlane(string hexValue, long offsetTime) }; await _planeHistoryRepository.StorePlaneHistory(data); await _planeHistoryRepository.UpdatePlanePointer(filteredPlanes.Last()); + // Console.WriteLine($"{hexValue} recorded for {offsetTime} with lastseen at {filteredPlanes.Last().Time}"); } } diff --git a/DomainService/IngressDomainService.cs b/DomainService/IngressDomainService.cs index 1103020..6d777f1 100644 --- a/DomainService/IngressDomainService.cs +++ b/DomainService/IngressDomainService.cs @@ -21,7 +21,8 @@ public Task RecordPlanes(IEnumerable planes, long now) { var lastMin = now.ToLastMinInSec(); - return Task.WhenAll(planes.Select(_ => _historyCache.RecordPlane(ToMinimal(_, now), lastMin))); + return Task.WhenAll(planes.Where(_ => ((_.Latitude ?? 0) != 0 ) + &&( (_.Longitude ?? 0) != 0)).Select(_ => _historyCache.RecordPlane(ToMinimal(_, now), lastMin))); } private static PlaneMinimal ToMinimal(Plane plane, long now)