Indoor Location Engine

Indoor Location Engine

The indoor-location-engine is based on nrf5 SDK (Legacy) and is responsible for four things:

  • Advertise BLE packets for HomeStation and iOS application
  • Scan for packets from HomeStation
  • Command outdoor-location-engine (PowerUp / PowerDown)
  • Initiate Ranging with UltraWideband (Precise Indoor Finding)

BLE Advertising

The IndoorLocationEngine uses BLE Advertising packets to announce its location to the HomeStation. This is a really inexpensive way (battery consumption wise) to know whether the Tracker is near HomeStation or not since Bluetooth range is about 500 feet.

The advertising interval can be configured via this constant in ble.c.

#define APP_ADV_INTERVAL_SLOW       3200    // (in units of 0.625 ms). This value corresponds to 2s)

BLE Scanning

The IndoorLocationEngine scans for packets from the HomeStation, when the HomeStation packets are no longer received after a timeout it sends a command to the OutdoorLocationEngine to power up. Scanning is slightly more expensive than advertising on the battery so this is done at an interval with larger gaps than advertising.

The scanning interval can be configured via this constant in ble.c.

#define NRF_BLE_SCAN_SCAN_INTERVAL  48000   // (30s)