All Projects → neXenio → Ble Indoor Positioning

neXenio / Ble Indoor Positioning

Licence: apache-2.0
Multilateration using bluetooth beacons

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Ble Indoor Positioning

Bluetooth Library
Bluetooth client library for Android.
Stars: ✭ 172 (-37.23%)
Mutual labels:  library, bluetooth
Gsm v5
gsm module library for STM32 LL
Stars: ✭ 135 (-50.73%)
Mutual labels:  library, bluetooth
Potato Library
Easy to use Utility library for Android
Stars: ✭ 45 (-83.58%)
Mutual labels:  library, bluetooth
PiBeacon
Low-cost iBeacon using Raspberry Pi
Stars: ✭ 41 (-85.04%)
Mutual labels:  bluetooth, beacon
Esp32marauder
A suite of WiFi/Bluetooth offensive and defensive tools for the ESP32
Stars: ✭ 233 (-14.96%)
Mutual labels:  beacon, bluetooth
Printooth
A well documented, high-level Android interface that makes printing via bluetooth printers easier
Stars: ✭ 231 (-15.69%)
Mutual labels:  library, bluetooth
Easydeviceinfo
📱 [Android Library] Get device information in a super easy way.
Stars: ✭ 1,698 (+519.71%)
Mutual labels:  library, bluetooth
Reactivebeacons
Android library scanning BLE beacons nearby with RxJava
Stars: ✭ 171 (-37.59%)
Mutual labels:  beacon, bluetooth
ioBroker.ble
Monitor Bluetooth Low Energy beacons
Stars: ✭ 39 (-85.77%)
Mutual labels:  bluetooth, beacon
ios
CoThings's iOS application. CoThings is a realtime counter for shared things.
Stars: ✭ 13 (-95.26%)
Mutual labels:  bluetooth, beacon
Ristretto
A high performance memory-bound Go cache
Stars: ✭ 3,584 (+1208.03%)
Mutual labels:  library
Prdownloader
PRDownloader - A file downloader library for Android with pause and resume support
Stars: ✭ 2,947 (+975.55%)
Mutual labels:  library
Gorequest
GoRequest -- Simplified HTTP client ( inspired by nodejs SuperAgent )
Stars: ✭ 3,063 (+1017.88%)
Mutual labels:  library
Angular Library Starter
Build an Angular library compatible with AoT compilation and Tree shaking like an official package
Stars: ✭ 272 (-0.73%)
Mutual labels:  library
Pygogo
A Python logging library with superpowers
Stars: ✭ 265 (-3.28%)
Mutual labels:  library
Paper Switch
🎚 RAMPaperSwitch is a Swift material design UI module which paints over the parent view when the switch is turned on. iOS library by @Ramotion
Stars: ✭ 2,902 (+959.12%)
Mutual labels:  library
Zformat
The Hoa\Zformat library.
Stars: ✭ 265 (-3.28%)
Mutual labels:  library
Public Transport Enabler
Unleash public transport data in your Java project.
Stars: ✭ 264 (-3.65%)
Mutual labels:  library
Rapidcsv
C++ CSV parser library
Stars: ✭ 261 (-4.74%)
Mutual labels:  library
Jackrabbit
Mirror of Apache Jackrabbit
Stars: ✭ 273 (-0.36%)
Mutual labels:  library

Travis GitHub release JitPack Codecov license

BLE Indoor Positioning

This repo contains a Java library that is capable of estimating locations based on advertising packets received from Bluetooth beacons. It also contains an Android app that uses this library to visualize beacon and location data.

Demo App Screen Recording

Usage

Integration

Gradle

Release artefacts are available through Bintray.

dependencies {
    compile 'com.nexenio.bleindoorpositioning:core:0.4.0'
}

If you want to use branch snapshots or specific commits, use JitPack.

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    compile 'com.github.neXenio:BLE-Indoor-Positioning:dev-SNAPSHOT'
}

Maven

<dependency>
  <groupId>com.nexenio.bleindoorpositioning</groupId>
  <artifactId>core</artifactId>
  <version>0.4.0</version>
</dependency>

JAR

You can download the latest .jar files from GitHub or Bintray.

Bluetooth Scanning

You need to implement some sort of Bluetooth scanning in order to get the advertising data from nearby beacons. On Android, you can use the BluetoothAdapter or libraries like RxAndroidBle that wrap around the system APIs.

You'll get a scan result, which you can extract the beacon mac address and raw advertising data from. Forward that data to the BeaconManager singleton and it will take care of everything else.

private void processScanResult(ScanResult scanResult) {
    String macAddress = scanResult.getBleDevice().getMacAddress();
    byte[] advertisingData = scanResult.getScanRecord().getBytes();
    int rssi = scanResult.getRssi();
    BeaconManager.processAdvertisingData(macAddress, advertisingData, rssi);
}

The BeaconManager will create Beacon instances for you and hold them in memory. Each Beacon will hold a list of recent AdvertisingPackets. There are quite a few convenience methods for Eddystone and iBeacon available, too.

You can listen for beacon changes by registering a BeaconUpdateListener:

BeaconManager.registerBeaconUpdateListener(new BeaconUpdateListener() {
    @Override
    public void onBeaconUpdated(Beacon beacon) {
        // have fun with your beacon!
    }
});

For some more fine-tuned callbacks, you may want to use a FilteredBeaconUpdateListener, which will only emit updates when beacons match a BeaconFilter of your choice.

Distance Estimation

Based on the received AdvertisingPackets (which also keep track of the RSSIs), you can get an estimated distance (in meters) to each Beacon. Simply call beacon.getDistance() or directly use the BeaconDistanceCalculator, which operates using the Log-distance path loss model.

Location Estimation

Based on the estimated distances to nearby beacons, the IndoorPositioning singleton can calculate the current geo coordinates of the device that received the advertising data. It utilizes the Multilateration class for that, which solves a formulation of n-D space trilateration problem with a nonlinear least squares optimizer (using the Levenberg–Marquardt algorithm).

You can listen for location changes by registering a LocationListener:

IndoorPositioning.registerLocationListener(new LocationListener() {
    @Override
    public void onLocationUpdated(LocationProvider locationProvider, Location location) {
        // have fun with your location!
    }
});

The Location will contain latitude, longitude and altitude, as well as some convenience methods to get the distance or angle to a different location.

This assumes that the geo coordinates of the beacons are known. You can assign a BeaconLocationProvider to any beacon instance, which could read the geo coordinates from the advertising data or some external API.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].