Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Application/Controllers/IndexerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public IndexerController(
public async Task<PlaneDataRecordLink> 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;
}
Expand Down
1 change: 1 addition & 0 deletions DomainService/AggregatorDomainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}
}

Expand Down
3 changes: 2 additions & 1 deletion DomainService/IngressDomainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public Task RecordPlanes(IEnumerable<Plane> 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)
Expand Down
Loading