Giter Club home page Giter Club logo

indoor-navigation-system's Introduction

Indoor Navigation System Build Status codecov

[WIP] An indoor navigation system that guides you to the desk of your colleagues.

What?

INS is a navigation system that utilizes a fleet of portable embedded devices, which can be located, to guide its user towards the desk of an employee or a colleague. The main scenario begins by searching for an employee on a mobile client. Then the system provides information regarding the whereabouts of the said employee's desk as well as navigational instructions on how to reach it.

The system does not intend to monitor individuals, but merely broadcast their currently designated workspace. The tracking nodes are not meant to be constantly carried along, but placed on the desk where someone is working on and forgotten until their owner changes desk.

Why?

Medium and large organizations involve office settings where employees are spread out throughout different floors. It is typically difficult to locate personnel with whom there is infrequent physical collaboration. The challenge becomes even greater when employees either do not possess a dedicated work-area or tend to move between locations. The main advantage of INS is that it provides dynamic updates in case the position of an employee's workspace changes, voiding the need for any manual action from the employee's side.

What is possibly more important is the technology developed within this context, can be easily reused in different occasions, such as in IoT and indoor positioning applications.

How?

A fleet of portable devices, transmit the signal strength (RSSI) of their surrounding WiFi access points (AP) to a central server. Since the exact location of the various APs is known, we can utilize the provided data to pinpoint the nodes within the building. Finally, a user can fetch the calculated location from the server using a mobile client.

INS is a distributed system composed of the following layers that communicate via HTTP requests:

  • Node
    • A portable device that transmits the signal strengths it detects. It is comprised of a WiFi Module that handles the connectivity and a Power Module that determines when the node should go to sleep to minimize its power consumption.
  • Server
    • A REST server that receives the RSSI signals, calculates the location of each node and supplies the information to the interested parties.
  • Client
    • A mobile client that visualizes the location of the inquired employee and guides its user towards that location.

indoor-navigation-system's People

Contributors

ikeyasu avatar lexious89 avatar platisd avatar samup4web avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

indoor-navigation-system's Issues

Backend Impl - Database

As a developer, I would like to have a database that can be used by the developed application.

Extend DataStore helper functions

Description

As a developer, I want to have functions that retrieves rssi, mac_addr data points in ways that facilitates device location calculations.

Definition of Done

Helper functions to return rssi data series and more.

Undefined position returned

Reporting a bug I found when testing on Rasberrry Pi (not that it is only peculiar to Pi). when a GetPosition query fails, an undefined ins_service::Position is returned. Buggy spot here ins_service::DataStore::Position

DoD:

  • Handle exception cases properly.

Missing code of conduct document

As an open source developer I want to know which is the code of conduct that this open source project abides by.

DoD:

  • CODE_OF_CONDUCT.md document created on the root folder of the repository.

Get rid of warnings in ins-node tests

As a tester I would like for the ins-node tests to be readable so to be able to quickly understand which test failed.

DoD:

  • No more uninteresting mock function call warnings from lowPowerMock

Protip: Use ::testing::NiceMock.

Allow multiple positioning networks

Description

As an ins-node I would like to be able to position myself using different SSID's so to increase the accuracy and availability of the system.

Definition of Done

Determine the cause of Wemos external LED malfunction

The LED connected to the WiFi module is misbehaving (i.e is constantly turned on) regardless of the WiFi Module's pin output.

DoD:

  • Determine the cause of this defect (it is hardware/electrical related)
  • Apply corrective action (removing the LED completely is not a bad option)

Missing contribution guidelines

As an open source developer I want to know which guidelines I should abide by for contributing in this repository.

DoD:

  • CONTRIBUTING.md document is added in the root of the repository containing the contribution guidelines.
    • Let's keep it short and simple, at least for the time being.

Low ins-app coverage

Description

The ins-app (i.e. MainActivity.java) is not covered well enough from our tests.

Definition of Done

The code coverage is raised to at least 70%. This could require some code refactoring.

INS Service authentication

Description

As a INS service, I want to authenticate all my users(INS nodes and user applications) to ensure all data I receive are from trusted and legit sources.

Definition of Done

  • INS service uses authentication for all its communication.

Backend Impl - Data analytics

As a developer I can obtain device position (x,y) based on device ID, SSID list and RSSI list so that I can populate position data for all reporting devices.

Have the CI build the Wifi Module firmware

As a developer or an integrator I want to be certain that what I wrote will compile in all setups so to avoid having non-working software committed even though the until tests passed.

DoD:

  • The CI machine compiles the firmware for the appropriate microcontroller before/after running the unit tests.

Unit test for INS Server

As a developer, I want to have unit test cases written for the ins server.

DoD

  • UT for DataStore class
  • UT for InsServer class

Missing issue template

As an open source developer I would like to know what is the expected format of my opened issue in order to be able to seamlessly contribute to INS.

DoD:

  • Templated text appears when issue is opened.

Stabilize pseudo random rssi levels by filtering out shadowing and multipath noise.

Description

Due to random effects from the environment, rssi levels taken even within small intervals appear random and noisy. In order to compute a stable position, we need to filter out the randomness due to shadowing and multipath and have just path loss. One way to do this is for eg: moving averaging.

Definition of Done

Compute a single value that represents the signal level at a single position.

Server related files in the root repository

As a developer I would like to have the server-related files in a separate folder inside the repository, so to quickly find the files I want to work on.

DoD:

  • Server related files in a server directory.

Low ins-service (server) coverage

Description

INS service has low code coverage (i.e. ins_service.cpp) which can result into defects and low internal quality.

Definition of Done

The code coverage is raised to at least 70%. This could require some code refactoring.

How-to fetch server dependencies missing from README

As a newcomer developer I want a command-level instructions on how to set up the server dependencies so to be able to effortlessly set it up.

DoD:

  • The commands and other instructions on how to fetch the dependencies that will enable developers to build the server and set-up the environment are present on the README.

Update SQL schema file

As a developer, I want to have an updated database SQL schema info so that I can be aware of the current structure without having to seek the code.

DoD:

Missing CI

As a developer or tester, I would like the project to be built and the test cases to be ran after every commit so to figure out if my changes are making the system fail.

DoD:

  • Decide on which CI (e.g. Travis) is most suitable.
  • Set up CI machinery that will build the current components (if possible) after every commit.
  • Provide access to the CI machinery to rest of the project members.

Wrong pin used for turning Wifi module ON

Description

The power controller uses the PB2 for turning the WiFi module ON, while according to the schematics the PB3 pin should be used instead.

Definition of Done

PB3 pin is used to turn the WiFi module on in the power controller firmware.

Missing test infrastructure - server

As a CI machine I would like to be able to have the infrastructure in place which will enable me to run unit tests.

DoD:

  • run_ut.sh script inside server directory which builds and runs a sample unit test.

REST API

As a developer, I need details on how to post and fetch data through the REST API, so that I can either post data from RSSI reporting device or fetch location data from front end apps.

DoD:

  • A wiki page or readme file that illustrates how to communicate with the server
  • Code examples

PB0 (TX) pin emits negative voltage

Description

PB0 has been measured to emit negative voltage (when it should be steadily at 0V with the current firmware) which results in a weird ~1.0V value being supplied at the wifi module even when it is off.

A workaround for this is to bend (not connect) the RX pin of the WiFi module.

Definition of Done

Root cause of this strange behavior is identified and a fix is issued.

Missing initial implementation of power controller

As an INS node, I would like my power controller to turn off the Wifi module when it is not needed and stay in deep sleep as much as possible so to preserve precious battery life.

DoD:

  • Wifi module gets turned on every ~1 minute.
  • MCU stays in deep sleep as much as possible.
  • State machine with (at least) the following states:
    • SLEEP_WIFI_OFF (the wifi module is off, while power controller is in deep sleep and can be woken up by a watchdog timer)
    • SLEEP_WIFI_ON (the wifi module is on, while power controller is in deep sleep and can be woken up by a watchdog timer or an external interrupt).
    • PREPARE_SHUTDOWN (the power controller warns the Wifi module it is time to shutdown and then it goes to deep sleep for a limited period. The Wifi module can ask to postpone shutdown if it is not ready to)

Modify database schema

As a developer, I want to simplify the schema for the device table which is responsible for holding RSSI readings for a particular INS-node.

DoD:

  • Table column <mac_addr> <rssi> <timestamp>

Motivation:

  • Since we can't pre-determine the number of APs an INS-node can read RSSI from, and we also do not want to limit number of APs to a specific value, therefore we cannot have a table schema using fixed APs count as we do have now.

Needless host environment dependency to spdlog

As an INS developer and integrator I would like to decrease the amount of dependencies necessary for the host build environment so to ease up deployment, integration and cross-compilation.

Currently spdlog is installed as a dependency in the host environment. However that is not necessary as we can merely add its source folder in our include directory.

DoD:

  • Dependency is removed from the setup of the host environment.
  • spdlog's source is contained within the server component.

Missing readme in project's root

Description

As an open source developer I would like to have a readme file in the project's root directory so to facilitate the onboarding process.

Definition of Done

A README.md placed in the root folder of the repository that elaborates (at least) the following topics:

  • Brief high level description of the system
  • Problem statement
  • Very high level system architecture
  • Project structure

Missing dependency to spdlog

Description

Our current server/build.sh script does not build the server correctly unless spdlog is already installed in the system, which beats the purpose of including spdlog in our server/include/external directory. This slipped through as Travis does not build the server itself but just the tests.

Definition of Done

  • Fix the dependency error
  • Have Travis build the server

Create development branch

As an integrator I want to have the master branch stable with only features/commits approved by the team inside it so to have a robust INS. Additionally I don't want to delay development and other pull requests, therefore all pull requests should first go to development branch and after approval from the team they will be merged with the master branch.

DoD:

  • Development branch created
  • Master branch protected even from administrators

Have the CI build the Power Controller firmware

As a developer or an integrator I want to be certain that what I wrote will compile in all setups so to avoid having non-working software committed even though the until tests passed.

DoD:

  • The CI machine compiles the firmware for the appropriate microcontroller before/after running the unit tests.

Show the latest change that caused a failed build

As an integrator I would like to know what was included in the last commit that broke a build to quickly try to figure out what was wrong just by looking the build logs.

DoD:

  • on_failure tag is added in .travis.yml showing the contents of the last commit

Missing pull request template

As an open source developer I would like to know what is the expected format of my pull request message in order to be able to seamlessly contribute to INS.

DoD:

  • Templated text appears when pull request is opened.

Refactor: Change RSSI datatype

Description

Since it is confirmed that rssi representation is indeed int32_t (link), as a developer, I want the correct datatype used for all rssi variables.

Definition of Done

Correct datatype is used for RSSI variables.

Missing test infrastructure - ins-node

As a CI machine I would like to be able to have the infrastructure in place which will enable me to run unit tests.

DoD:

  • build_and_run_ut.sh script inside ins-node directory which builds and runs a sample unit test.

Protip:

Android application setup missing

Description

As an INS Android app developer I want to have a sample Hello World application integrated into the CI build and tested, so to be able to seamlessly create awesome things with it.

Definition of Done

  • Hello World android application
  • Built and tested by the CI machine
  • Coverage reports on codecov.

Server core-dumps after ~16 minutes of operation

Description

The ins_server core-dumps after approximately 16 minutes of operation, regardless of whether it is handling incoming data or not. The defect was reproducible 100% of the times.

Ways to reproduce

Have ins_server executing for long amounts of time.

Related logs

terminate called after throwing an instance of 'std::runtime_error'
what(): No route to host
Aborted (core dumped)

Definition of Done

The ins_server can run for indefinite amounts of time.

Missing contribution guidelines

As an open source developer I would like to know the guidelines according to which my contributions should comply so I can co-exist within the community more seamlessly.

DoD:

  • First draft of CONTRIBUTING.md is created.

Code coverage report including uninteresting files

As a developer I want to know what is the actual current coverage of the production code and not of other uninteresting files (e.g. mocks or external libraries) so to be able to define my testing strategy.

DoD:

  • Only production code (source code and header files) are included in the coverage report.

Apply corrections to rev. 0 board

As an INS I want to work as intended by my creators so to make them happy.

HW rev. 0 has the following problems:

  • Batteries slightly too close to the WiFi Module, should be moved couple of millimeters to the sides.
  • Understand why WiFi module receives too low voltage and implement a solution.

DoD:
Above problems are fixed and new boards are ordered.

Refactor repo for INS-node's different software bases

As an INS-node developer I want to have the software running on the Wifi module and the power controller MCU to reside in different directories so to make the development easier.

DoD:

  • Code for the WiFi module and the power controller MCU contained in different directories inside ins-node/src.
    • Tests updated if necessary.

Backend Impl - REST Server

As a developer, I would like to have REST server that can handle HTTP POST/GET requests, so that devices & frontend app can communicate with the server.

Add New REST Action for Resolving Device Position

As a developer, I want to detach the functionality for calculating INS-node position from the REST action which receives RSSI readings.

DoD

  • Achieve better stateless REST service.
  • Seperate REST Url/action for resolving device position.

Wifi module gets a list of RSSI values from different AP's for specified SSID

As a WiFi module I want to be able to retrieve the RSSI values from the surrounding AP's of a specified SSID so to be able to send them to the server.

DoD:

  • The WiFi module is able to fetch the SSID's of a specified SSID.
    • To verify this they can be printed out for the time being.
  • Unit tests that cover the new functionality.
    • A lot of mocking probably has to be done. Keep in mind that the current mocks don't cover Arduino's String class type.

Frontend Web Application

As a user, I can lookup employee location from a web browser, so that I can determine their location.

Scope: A simple web form that can return an employee's position in the form (x,y) when a request is made with employee ID as parameter.

Frontend Android App

As a user, I can lookup employee location from my mobile phone so that I can determine their location.

Scope:

  • A basic Android app with an input field for employee id and a submit button.
  • App sends HTTP GET request to server
  • App displays position data in the form (x,y)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.