AOA Positioning Engine (APE)

website·Indexed 31 days ago

https://ape.zerobit.cc

A high-precision AOA positioning algorithm engine for indoor scenarios, providing sub-meter localization based on multi-base station angle measurements. It features HTTP/MQTT standard interfaces, a visual monitoring dashboard, and cross-platform deployment for servers and desktop systems. Includes OpenAPI specifications for service management, configuration, and data pushing.

Tokens
7.9K
Snippets
42
Records
52
Agent score
50%

What's inside APE

  1. APE (AOA Positioning Engine) Overview

    APE is a high-precision AOA (Angle of Arrival) positioning algorithm engine designed for indoor scenarios. It achieves sub-meter positioning accuracy based on angle measurements from multiple base stations. It features HTTP/MQTT standard interfaces, a visual monitoring panel, and cross-platform deployment capabilities.
  2. Deploy APE as a persistent system service

    For production environments, APE can be installed as a system service to enable background execution and auto-start on boot. In the TUI interface, click 'Install Service' to trigger the installation. The engine maps to the following system managers:

    • Linux: systemd
    • macOS: launchd
    • Windows: sc

    After installation, the service listens on port 8880 by default. Access the WEB console at http://localhost:8880 to start the service. The initial password for the WEB console is empty.

    # Default WEB Console URL
    http://localhost:8880
  3. Install APE on supported platforms

    APE supports the following platforms with consistent functionality and deployment methods:

    • Linux x86_64
    • Linux aarch64
    • macOS aarch64
    • Windows x86_64

    To install, download the appropriate package from https://ape.zerobit.cc/downloads and extract it. The core executable is ape for Linux/macOS and ape.exe for Windows.

  4. Manage and upload Baseplot project files

    Project files created with the Baseplot tool use the .dp file extension. There are two primary ways to upload or deploy these files:

    1. Deploy directly using the Baseplot tool (recommended).
    2. Upload the .dp file via the Web Console.
  5. Trigger service installation via the Install Service API

    The Install Service provides a REST endpoint to trigger a service installation. The endpoint requires Bearer token authentication. A successful request returns a 204 No Content response.
    # Endpoint: PUT /api/install/master
    # Authentication: Bearer Token
    # Response: 204 No Content
    
    openapi: 3.0.1
    paths:
      /api/install/master:
        put:
          summary: Install Service
          security:
            - bearer: []
          responses:
            '204':
              description: No Content
    components:
      securitySchemes:
        bearer:
          type: http
          scheme: bearer
  6. Quick start APE using TUI mode

    For rapid testing and debugging, run APE in TUI (Text User Interface) interactive mode. Upon startup, the engine automatically scans for all positioning base stations within the current local network segment, eliminating the need for manual base station address configuration.

    Steps to verify positioning:

    1. Start the program and let it scan for base stations.
    2. Select the target base station.
    3. Click 'Save Settings'.
    4. Click 'Open Browser' to view real-time single-base station positioning effects.
  7. Download ape binary releases

    Binary releases for ape are available for Linux (aarch64 and x86_64), macOS (aarch64), and Windows (x86_64). The latest version is v0.1.11.
  8. Worker configuration parameters

    The ConfigurationWorker object defines the following required parameters for the Worker configuration:
    interface ConfigurationWorker {
      udp_bind_addr: string;       // UDP bind address
      master_udp_addr: string;     // Master UDP address
      worker_thread_count: null;  // Worker thread count
      crossbeam_channel_size: null;// Crossbeam channel size
      mpsc_channel_size: null;     // MPSC channel size
      fast_mode: boolean;           // Enable fast mode
      log: number;                 // Log level/setting
      disable_height_datum: boolean; // Disable height datum
    }
  9. Configure data push format, compression, and intervals

    When setting up data push, the following options are available:

    • Format: Choose between Raw (binary little-endian mode) or Json (JSON format).
    • Compression: Options include None (no compression), Zstd, Lz4, or Gzip.
    • Interval: Define the time interval between pushes.
  10. Configure ConfigurationFilters for EMA and G-Sensor

    The ConfigurationFilters object is used to define filtering parameters for EMA and G-Sensor tags. It requires two primary configuration blocks: ema and tag.

    EMA Configuration (ema):

    • alpha (number): The smoothing factor for the Exponential Moving Average.
    • max_distance (integer): The maximum distance threshold for the filter.

    Tag Configuration (tag): Requires a gsensor object with the following properties:

    • collective_threshold (integer): Threshold for collective sensor triggers.
    • individual_threshold (integer): Threshold for individual sensor triggers.
    • start_static_duration (integer): Duration to consider the device static at start.
    • start_moving_duration (number): Duration to consider the device moving at start.
    • max_history (integer): The maximum number of history records to maintain.
    ConfigurationFilters:
      type: object
      properties:
        ema:
          type: object
          properties:
            alpha: { type: number }
            max_distance: { type: integer }
          required: [alpha, max_distance]
        tag:
          type: object
          properties:
            gsensor:
              type: object
              properties:
                collective_threshold: { type: integer }
                individual_threshold: { type: integer }
                start_static_duration: { type: integer }
                start_moving_duration: { type: number }
                max_history: { type: integer }
              required: [collective_threshold, individual_threshold, start_static_duration, start_moving_duration, max_history]
          required: [gsensor]
      required: [ema, tag]
  11. Configure the ConfigurationMaster object

    The ConfigurationMaster object defines the core system settings. It requires a set of network, performance, and logging parameters. Key configuration areas include UDP binding for broadcasts, HTTP daemon addressing, and a list of pushers for data transmission.
    # Example ConfigurationMaster schema structure
    ConfigurationMaster:
      udp_bind_addr: "string"           # Address to bind UDP services
      udp_broadcasts:                   # List of broadcast targets
        - addr: "string"
          message: "string"
      daemon_http_addr: "string"        # HTTP address for the daemon
      pushers:                          # Data pusher configurations
        - addr: "string"
          format: "string"
          compress: "string"
          interval: 0                    # Integer interval
      worker_thread_count: null          # Thread count configuration
      sync_channel_size: null           # Sync channel size
      default_s_height: 0.0              # Number (float)
      fast_mode: true                    # Boolean flag for fast mode
      log: 0                             # Integer log level
      disable_height_datum: false        # Boolean flag to disable height datum
  12. Configure data push settings in the Web Console

    Data push targets can be configured in the "Push Settings" (推送设置) section of the Web Console at http://localhost:8880. The system supports HTTP and MQTT protocols for pushing location result data.