moncenterlib.gnss.quality_check module

This module is designed for monitoring the quality and quantity of multi—GNSS data. The module has the following classes: - Anubis; - Soon.

Learn more about the specific class.

class moncenterlib.gnss.quality_check.Anubis(logger: bool | Logger | None = None)

Bases: object

G-Nut/Anubis is an open source tool designed to monitor the quality and quantity of multi—GNSS data stored in RINEX 2.xx and 3.0x formats. It is capable of processing new signals from all global navigation satellite systems and their add-ons (GPS, GLONASS, Galileo, BeiDou, SBAS and QZSS). G-Nut/Anubis supports GPS, GLONASS and Galileo and performs single-point positioning, as well as provides GNSS data characteristics based on altitude and azimuth. See more about G-Nut/Anubis here: https://gnutsoftware.com/software/anubis This class can processing one or more files. See code usage examples in the examples folder. Current version 2.3

__init__(logger: bool | Logger | None = None) None
Parameters:

logger (bool | Logger, optional) – if the logger is None, a logger will be created inside the default class. If the logger is False, then no information will be output. If you pass an instance of your logger, the information output will be implemented according to your logger. Defaults to None.

scan_dirs(input_dir_obs: str, input_dir_nav: str, recursion: bool = False) tuple[dict[str, list[list[str]]], dict[str, list[str]]]

This method scans the directory and makes a match list of files for further work of the class. The method can also recursively search for files.

Parameters:
  • input_dir_obs (str) – Path to the observation directory.

  • input_dir_nav (str) – Path to the navigation directory.

  • recursion (bool, optional) – Recursively search for files. Defaults to False.

Raises:

ValueError – Please, remove spaces in path.

Returns:

First element of the tuple is a dictionary of matching. Key is name of station. Value is list of matches. The list of matches contains observation and navigation files matched by date. Second element of the tuple is a dictionary of non-matching. The list of matches contains observation files for which no navigation files were found.

Return type:

tuple[dict[str, list[list[str]]], dict[str, list[str]]]

Examples

>>> anubis = Anubis()
>>> res = anubis.scan_dir("/path_to_dir_obs", "/path_to_dir_nav", True)
>>> res
{"station1": [["/obs1.txt", "/nav1.txt"], ["/obs2.txt", "/nav2.txt"]],
"station2": [["/obs3.txt", "/nav1.txt"], ["/obs4.txt", "/nav4.txt"]]}
start(input_data: dict | tuple, recursion: bool = False, output_dir_xtr: str | None = None, version: str = '2.3') tuple[dict[str, dict[str, float | int | str | dict]], dict[str, list[str]]]

This method starts the process of calculating the quality and quantity of multi-GNSS data. The method allows you to upload one or more files for calculation.

Parameters:
  • input_data (dict | tuple) – There are several possible input options. Tuple which contains the path to the observations and navigation file(“/obs.txt”, “/nav.txt”). Tuple which contains the path to the directory of observation and navigation files, respectively(“/dir_obs”, “/dir_nav”). As well as the dictionary obtained from the scan_dirs method.

  • recursion (bool, optional) – Recursively search for files. Defaults to False.

  • output_dir_xtr (str | None, optional) – The directory where the anubis xtr output files will be saved. Defaults to None.

  • version (str) – Select version. Available: 2.3, 3.10.

Raises:
  • ValueError – Please, remove spaces in path.

  • ValueError – Path to file or dir is strange.

Returns:

First element of the tuple is a dictionary of metrics for each date found for each station. Second element of the tuple is a dictionary of observation files for which no navigation files were found.

Return type:

tuple[dict[str, dict[str, float | int | str | dict]], dict[str, list[str]]]

Examples

>>> anubis = Anubis()
>>> result = anubis.start(("/path_to_dir_obs", "/path_to_dir_nav"), False, "/path2output_xtr")
>>> res
{"station1": {"date1": {"some_metrics": "123"},
              "date2": {"some_metrics": "123"}
              },
 "station2": {"date1": {"some_metrics": "123"},
              "date2": {"some_metrics": "123"}
              }
}