Source code for defunct_navigation

"""
Position-based navigation task for obstacle course using observer state estimation.

This module implements a cooperative multitasking navigation function that uses global
X, Y coordinates from the state observer and IMU heading to navigate an obstacle course.
The navigation task coordinates line following, heading control, and state transitions
based on position thresholds and heading targets.

States:
    - State 0: Line following with dynamic bias control based on X position
    - State 1: Line following with heading adjustment to 90 degrees
    - State 2: Straight line movement maintaining 90-degree heading
    - State 3: Standard line following with zero bias
    - State 4: Placeholder for future waypoint navigation

Hardware:
    - Observer: Provides global X, Y position estimates
    - IMU: Provides heading and yaw rate measurements
    - IR Sensor Array: Line detection for line following mode
    - Motors: Differential drive with velocity control

Notes:
    - Uses position-based state transitions (X, Y thresholds)
    - Observer calibration must complete before navigation begins
    - Heading control uses IMU-based angle with tolerance band
    - Bias values adjust line following behavior for curves
"""