Closed vicb closed 1 week ago
This pull request fixes an issue with Bircom messages by correctly looking for the last known position. The changes involve updating the test case and the main implementation to use the most recent position data instead of the first one.
Change | Details | Files |
---|---|---|
Update test case to use more recent timestamps and multiple position entries |
|
apps/fetcher/src/app/trackers/meshbir.test.ts |
Modify implementation to use the last known position instead of the first one |
|
apps/fetcher/src/app/trackers/meshbir.ts |
The changes involve updates to the test cases for the parse
function in the meshbir.test.ts
file, including adjustments to simulated timer values and test data structures. The parse
function in meshbir.ts
has been modified to calculate lastFixAgeSec
using the last element of the track.timeSec
array instead of the first, altering the logic for determining the age of the last fix.
Files | Change Summary |
---|---|
apps/fetcher/src/app/trackers/meshbir.test.ts, apps/fetcher/src/app/trackers/meshbir.ts | Updates to test cases and the parse function logic, including changes to timer values, message properties, and the calculation of lastFixAgeSec . |
sequenceDiagram
participant Test as Test Suite
participant Parser as parse function
participant Data as Data Structure
Test->>Data: Initialize test data with new values
Test->>Parser: Call parse with updated data
Parser->>Parser: Calculate lastFixAgeSec using last element of timeSec
Parser-->>Test: Return parsed results
🐇 In a meadow where time does dance,
I hop with joy, a happy glance.
With data fresh and tests anew,
The parse function sings a tune!
Hooray for changes, bright and spry,
Let’s leap and bound, oh me, oh my! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
/cc @ketan @cyberorg
Correctly look for the last known position
Summary by Sourcery
Fix the message association logic to correctly use the last known position by referencing the most recent timestamp in the track data, and update the corresponding test cases to validate this behavior.
Bug Fixes:
Tests:
Summary by CodeRabbit
Bug Fixes
Tests