# NaveGo
[![Releases](https://img.shields.io/badge/release-v1.1-green.svg?style=plastic)](https://github.com/rodralez/NaveGo/releases) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1464202.svg)](https://doi.org/10.5281/zenodo.1464202)
NaveGo: an open-source MATLAB/GNU-Octave toolbox for processing integrated navigation systems and performing inertial sensors profiling analysis.
NaveGo is an open-source MATLAB/GNU Octave toolbox for processing integrated navigation systems and simulating inertial sensors and a GNSS receiver. It also performs inertial sensors analysis using the Allan variance. It is freely available online. It is developed under MATLAB/GNU-Octave due to this programming language has become a *de facto* standard for simulation and mathematical computing. NaveGo has been verified by processing real-world data from a real trajectory and contrasting results with a commercial, closed-source software package. Difference between both solutions have shown to be negligible. For more information read (Gonzalez et al., 2017).
NaveGo is supported at the moment by three academic research groups: GridTics at the National University of Technology (Argentina), Engineering School at the National University of Cuyo (Argentina), and DIATI at the Politecnico di Torino (Italy).
## Features
Main features of NaveGo are:
* Processing of an inertial navigation system (INS).
* Processing of a loosely-coupled integrated navigation system (INS/GNSS).
* Simulation of inertial sensors and GNSS.
* Zero Velocity Update (ZUPT) detection algorithm.
* Allan variance technique to characterize inertial sensors' typical errors.
## Please, cite our work
If you are using NaveGo in your research, we gently ask you to add the following two cites to your future papers:
* (Gonzalez et al., 2017) R. Gonzalez, C.A. Catania, P. Dabove, J.C. Taffernaberry, and M. Piras. Model validation of an open-source framework for post-processing INS/GNSS systems. III International Conference on Geographical Information Systems Theory, Applications and Management (GISTAM 2017). Porto, Portugal. April 2017. [Download](http://www.scitepress.org/Papers/2017/63139/index.html).
* (Gonzalez et al., 2015) R. Gonzalez, J.I. Giribet, and H.D. Patiño. NaveGo: a simulation framework for low-cost integrated navigation systems, Journal of Control Engineering and Applied Informatics, vol. 17, issue 2, pp. 110-120, 2015. [Download](http://ceai.srait.ro/index.php?journal=ceai&page=article&op=view&path%5B%5D=2478).
An URL to NaveGo should be provided as the following cite:
Gonzalez, Rodrigo. NaveGo Release v1.1 (Version 1.1). Zenodo. http://doi.org/10.5281/zenodo.1464202. 2018, October 16.
## Contributions
We are looking for contributors for NaveGo! Since integrated navigation is a topic used in several fields as Geomatics, Geology, Mobile Mapping, Autonomous Driving, even Veterinary (yes, Veterinary!), we hope other communities other than the navigation community compromise and contribute with this open-source project.
You can contribute in many ways:
* Writing code.
* Writing a manual.
* Reporting bugs.
* Suggesting new features.
If you are interested, please feel free to contact Dr. Rodrigo Gonzalez at rodralez [at] frm [dot] utn [dot] edu [dot] ar.
## Publications
The underlying mathematical model of NaveGo is based on two articles which are recommended for reading:
* (Gonzalez et al., 2015) R. Gonzalez, J.I. Giribet, and H.D. Patiño. NaveGo: a simulation framework for low-cost integrated navigation systems, Journal of Control Engineering and Applied Informatics, vol. 17, issue 2, pp. 110-120, 2015. [Link](http://ceai.srait.ro/index.php?journal=ceai&page=article&op=view&path%5B%5D=2478).
* (Gonzalez et al., 2015a) R. Gonzalez, J.I. Giribet, and H.D. Patiño. An approach to benchmarking of loosely coupled low-cost navigation systems. Mathematical and Computer Modelling of Dynamical Systems, vol. 21, issue 3, pp. 272-287, 2015. [Link](http://www.tandfonline.com/doi/abs/10.1080/13873954.2014.952642).
Other publications related to the development of NaveGo:
* (Gonzalez et al., 2017a) R. Gonzalez, E.M. Martinez, and P. Dabove. Assessment of Discrete Stochastic Models of MEMS Inertial Sensors by Using the Allan Variance. In the III International Conference on Sensors and Electronics Instrumentation Advances (SEIA' 2017), 20-22 September 2017, Moscow, Russia.
* (Gonzalez et al., 2017) R. Gonzalez, C.A. Catania, P. Dabove, J.C. Taffernaberry, and M. Piras. Model validation of an open-source framework for post-processing INS/GNSS systems. III International Conference on Geographical Information Systems Theory, Applications and Management (GISTAM 2017). Porto, Portugal. April 2017.
## Roadmap
Future features of NaveGo will be:
* Tightly-coupled INS/GNSS.
* RTS smoother.
* Adaptive Kalman filter.
## Acknowledgments
We would like to thank to many people that have contribute to make NaveGo a better tool:
* Dr. Juan Ignacio Giribet (Universidad Nacional de Buenos Aires, Argentina) for this continuous support on theory aspects of INS/GNSS systems.
* Dr. Charles K. Toth (The Ohio State University, USA), Dr. Allison Kealy, and M.Sc. Azmir Hasnur-Rabiain (both from The University of Melbourne, Australia) for generously sharing IMU and GNSS datasets, and in particular, for Azmir's unselfish help.
* Prof. Zhu, Dr. Yang, and Mr. Bo Sun, all from the Laboratory of Precision Measuring Technology and Instruments, Tianjin University, Tianjin, China, for contributing with IMU static measurements to test Allan variance routines.
* Dr. Paolo Dabove and Dr. Marco Piras (both from DIATI, Politecnico di Torino, Italy) for helping to debug NaveGo and suggesting new features.
# Examples
The `example` folder contains several types of examples.
## Allan variance example
Just execute the file `navego_allan_example.m`. Firstly, it process 2-hours of static measurements from an Sensonor STIM300 IMU. Then, it process about 5 hours of synthetic inertial data.
## INS/GNSS integration example using real data
An example of how to use NaveGo to post-process real data is provided by `navego_example_real.m`. This script integrates measurements coming from an Ekinox-D IMU and Ekinox-D GNSS. This dataset was generated by driving a vehicle through the streets of Turin city (Italy).
## INS/GNSS integration example using synthetic (simulated) data
The file `navego_example.m` tries to demonstrate how NaveGo works. It compares the performances of two simulated IMUs, ADIS16405 IMU and ADIS16488 IMU, both integrated with a simulated GNSS.
Next, a description of this file.
### Reset section
```matlab
clc
close all
clear
matlabrc
addpath ../../
addpath ../../simulation/
addpath ../../conversions/
versionstr = 'NaveGo, release v1.0';
fprintf('\n%s.\n', versionstr)
fprintf('\nNaveGo: starting simulation ... \n')
```
### Code execution parameters
```matlab
% Comment any of the following parameters in order to NOT execute a particular portion of code
GNSS_DATA = 'ON'; % Generate synthetic GNSS data
IMU1_DATA = 'ON'; % Generate synthetic ADIS16405 IMU data
IMU2_DATA = 'ON'; % Generate synthetic ADIS16488 IMU data
IMU1_INS = 'ON'; % Execute INS/GNSS integration for ADIS16405 IMU
IMU2_INS = 'ON'; % Execute INS/GNSS integration for ADIS16488 IMU
PLOT = 'ON'; % Plot results.
% If a particular parameter is commented above, it is set by default to 'OFF'.
if (~exist('GNSS_DATA','var')), GNSS_DATA = 'OFF'; end
if (~exist('IMU1_DATA','var')), IMU1_DATA = 'OFF'; end
if (~exist('IMU2_DATA','var')), IMU2_DATA = 'OFF'; end
if (~exist('IMU1_INS','var')), IMU1_INS = 'OFF'; end
if (~exist('IMU2_INS','var')), IMU2_INS = 'OFF'; end
if (~exist('PLOT','var')), PLOT = 'OFF'; end
```
### Conversion constants
```matlab
G = 9.80665; % Gravity constant, m/s^2
G2MSS = G; % g to m/s^2
MSS2G = (1/G); % m/s^2 to g
D2R = (pi/180); % degrees to radians
R2