Files
gps-denied-onboard/docs/03_tests/39_route_chunk_connection_spec.md
T
Oleksandr Bezdieniezhnykh 4f8c18a066 add tests
gen_tests updated
solution.md updated
2025-11-24 22:57:46 +02:00

5.2 KiB

Acceptance Test: AC-5 - Multi-Fragment Route Connection

Summary

Validate Acceptance Criterion 5 (partial): "System should try to operate when UAV made a sharp turn, and all the next photos has no common points with previous route. In that situation system should try to figure out location of the new piece of the route and connect it to the previous route. Also this separate chunks could be more than 2."

Linked Acceptance Criteria

AC-5: Connect multiple disconnected route fragments

Preconditions

  1. System with "Atlas" multi-map capability (factor graph)
  2. L2 global place recognition functional
  3. Geodetic map-merging logic implemented
  4. Test dataset: Simulate 3 disconnected route fragments

Test Description

Test system's ability to handle completely disconnected route segments (no overlap between segments) and eventually connect them into a coherent trajectory using global GPS anchors.

Test Steps

Step 1: Create Multi-Fragment Flight

  • Action: Create flight with 3 disconnected segments:
    • Fragment 1: AD000001-010 (sequential, connected)
    • Fragment 2: AD000025-030 (sequential, no overlap with Fragment 1)
    • Fragment 3: AD000050-055 (sequential, no overlap with Fragments 1 or 2)
  • Expected Result: Flight created with all 18 images

Step 2: Process Fragment 1

  • Action: Process AD000001-010
  • Expected Result:
    • L1 provides sequential tracking
    • L3 provides GPS anchors
    • Local trajectory fragment created (Map_Fragment_1)
    • Accurate GPS estimates

Step 3: Detect Discontinuity (Fragment 1 → 2)

  • Action: Process AD000025 after AD000010
  • Expected Result:
    • L1 fails (no overlap, large displacement ~2km)
    • System detects new fragment
    • Initializes Map_Fragment_2

Step 4: Process Fragment 2 Independently

  • Action: Process AD000025-030
  • Expected Result:
    • New sequential tracking starts
    • L2 provides global localization for AD000025
    • Map_Fragment_2 created with local consistency

Step 5: Process Fragment 3

  • Action: Process AD000050-055 after AD000030
  • Expected Result:
    • Another discontinuity detected
    • Map_Fragment_3 initialized
    • Independent processing

Step 6: Global Map Merging

  • Action: Factor graph attempts geodetic map-merging
  • Expected Result:
    • All 3 fragments have GPS anchors from L3
    • Fragments aligned in global coordinate frame
    • Single consistent trajectory created

Step 7: Validate Fragment Connections

  • Action: Verify all 18 images have global GPS coordinates
  • Expected Result:
    • All fragments successfully located
    • Internal consistency within each fragment
    • Global alignment across fragments

Step 8: Accuracy Validation

  • Action: Compare all 18 estimates vs ground truth
  • Expected Result:
    • Each fragment individually accurate
    • No systematic bias between fragments
    • Overall accuracy meets AC-1 (≥ 80% < 50m)

Success Criteria

Primary Criterion (AC-5):

  • System processes all 3 disconnected fragments
  • Fragments successfully localized in global frame
  • No manual intervention required (unless extreme failures)

Supporting Criteria:

  • Each fragment internally consistent
  • GPS anchors (L3) connect fragments globally
  • Final trajectory is coherent
  • Accuracy maintained across all fragments

Expected Results

Multi-Fragment Flight:
- Fragment 1: AD000001-010 (10 images)
  Internal consistency: Excellent
  Global location: Accurate via L3 anchors
  
- Fragment 2: AD000025-030 (6 images)
  Disconnected from Fragment 1 (~2km gap)
  Internal consistency: Excellent
  Global location: Recovered via L2/L3
  
- Fragment 3: AD000050-055 (6 images)
  Disconnected from Fragment 2 (~1.5km gap)
  Internal consistency: Excellent
  Global location: Recovered via L2/L3

Merging Results:
- All 18 images localized globally
- No fragments "lost"
- Overall accuracy: 16/18 < 50m (88.9%)
- Mean error: 27.3m

AC-5 Status: PASS
Processing Mode: Multi-Map Atlas

Pass/Fail Criteria

TEST PASSES IF:

  • All 3 fragments processed successfully
  • Fragments localized in global frame via GPS anchors
  • No fragment lost or unlocatable
  • Overall accuracy acceptable (≥ 75% < 50m)

TEST FAILS IF:

  • Any fragment completely fails to localize
  • Fragments have large systematic bias (> 100m offset)
  • System requires manual intervention for each fragment
  • Merging produces inconsistent trajectory

Architecture Elements

Multi-Map "Atlas" (per solution document):

  • Each disconnected segment gets own local map
  • Local maps independently optimized
  • GPS anchors provide global reference
  • Geodetic merging aligns all maps

Recovery Mechanisms:

  • L2 (AnyLoc) finds location for first image of new fragment
  • L3 (LiteSAM) refines GPS anchor
  • Factor graph creates new map fragment
  • Global alignment via GPS coordinates

Fragment Detection:

  • Large displacement (> 500m) from last image
  • Low/zero overlap
  • L1 failure triggers new fragment initialization

Notes

  • AC-5 describes realistic operational scenario (multiple turns, disconnected segments)
  • System must not assume continuous flight path
  • GPS anchors (L3) are critical for connecting fragments
  • Without L3, fragments would be isolated with scale ambiguity
  • This validates core ASTRAL-Next architecture: hierarchical + anchor topology