Skip to content

PolyU-TASLAB/GNSSNLOSDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

GNSS NLOS Detector

Overview

This project implements a Non-Line-of-Sight (NLOS) detector for Global Navigation Satellite System (GNSS) signals. The detector helps identify when satellite signals are being received through reflections or obstructions rather than directly, which can significantly improve positioning accuracy in challenging environments like urban canyons.

Features

-Learning signal characteristics: SNR, Elevation Angle, Azimuth Angle, Satellite Constellation.

-Synthetic Dataset: Simulates urban, suburban, and open-sky environments with realistic GPS signal patterns.

-Machine Learning to detect NLOS: Real-time NLOS detection using machine learning algorithms.

-Support for multiple GNSS constellations: GPS, GALILEO, GLONASS, BeiDou.

-Signal quality analysis and visualization tools

-Performance metrics for detection accuracy

Installation

Dependencies

  • Python 3.7+
  • Libraries: numpy, pandas, scikit-learn, matplotlib, seaborn, scipy, graphviz

Install dependencies via pip:

pip install numpy pandas scikit-learn matplotlib seaborn scipy graphviz

Walkthrough

1. Generate Synthetic Dataset (Exercise 0):

python3 GenDataset.py

Run GenDataset.py to generate synthetic data. You can see over 1000 samples in the gps_nlos_dataset.csv file.

Data Exploration (Exercise 1): Visualize feature distributions, correlations, and class imbalances using pair plots, histograms, and heatmaps.

Preprocess data (one-hot encoding, train-test split, scaling).

SNR vs Elevation Satellite_sky_distribution feature_distribution feature_pairplot correlation_matrix 3d_signal_features

Model Implementation (Exercise 2-5):

Exercise 2: Implement Linear Regression Model

Train and evaluate models:

python3 LinearRegress.py

Implement linear regression model for NLOS classification, evaluate the model's performanceusing mses, r2 scores, accuracy and confusion matrix. The coefficients of the linear regression model can be used to understand how each feature contributes to NLOS classification. They are analyzed and visualized in the end.

linear_regression_coefficients

linear_regession_predictions

linear_regression_confusion_matrix

linear_regression_summary

Exercise 3: Implement Logistic Regression Model

python3 LogisticReg.py

Implement Logistic regression model for NLOS classification, evaluate the model's performanceusing mses, r2 scores, accuracy and confusion matrix. The coefficients of the linear regression model can be used to understand how each feature contributes to NLOS classification. They are analyzed and visualized in the end.

logistic_regression_summary

logistic_regression_confusion_matrix

logistic_regression_roc

logistic_regression_recision_recall

logisitic_regression_probability_distribution

logistic_regression_odds_ratio

logistic_regression_coefficients

logistic_regression_boundary

Exercise 4: Implement Decision Tree

python3 DecisionTree.py

decision_tree_visualization

decision_tree_importantance

Implement Decision tree for NLOS classification, evaluate the model's performanceusing mses, r2 scores, accuracy and confusion matrix. The coefficients of the linear regression model can be used to understand how each feature contributes to NLOS classification. They are analyzed and visualized in the end. decision_tree_depth_analysis decision_tree_confusion_matrix

decision_tree_summary_table

Exercise 5: Implement SVM (Support Vector Machines) & Exercise 6: Model Comparision and Real-World Application

python3 Comparison.py

svm_model_comparison

Implement SVM classifier for NLOS detection. Explore the different kernel functions and evaluate performance of SVM kernels. In the end, tune the hyperparameters.

svm_model_comparison_roc

path_nlos_prediction

nlos_skyplot

position_improvement

position_error_distribution

application_summary_table

About

GNSS NLOS Detector

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published