Find GPS Dropout Windows in a Navigation Fix Log
Last updated: November 29, 2026
Quick Overview
Given the timestamps of GPS fixes received during a flight and the receiver's nominal update period, return every interval where no fix arrived for more than k periods, plus the total time spent without GPS.
Shield AI
November 29, 20260
0
0 solved
Given the timestamps of GPS fixes received during a flight and the receiver's nominal update period, return every interval where no fix arrived for more than k periods, plus the total time spent without GPS.
Shield AI's Hivemind is built to keep flying when GPS is jammed or denied, so post-flight tools that locate dropout windows in V-BAT logs are an everyday need. In a phone screen this checks clean iteration over sorted data, careful boundary handling, and whether you ask how the flight start and end should be treated.
What the Interviewer Expects
- Sorts or confirms the input is time ordered
- Uses a single pass over adjacent pairs
- Treats the flight start and end as optional sentinels so leading and trailing gaps are found
- Uses a strict greater-than threshold and states that choice
- Returns both the windows and the total dropout time
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you do this on a live stream where fixes arrive one at a time?
- Fixes sometimes arrive with duplicate or out-of-order timestamps. What changes?
- How would you merge dropout windows that are separated by a single isolated fix?
- How would you report the navigation drift accumulated during each window?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: a list of fix timestamps in seconds, the nominal period p (for example 0.2 s at 5 Hz), a multiplier k, and optionally the flight start and end times. Output: a list of (t0, t1) gaps where...
High-Level Design
Sort the timestamps (logs merged from several sensors are not always ordered), add the optional start and end sentinels, then scan adjacent pairs. Any pair whose difference exceeds the threshold is a ...