dop module
Dillution of Precision (DOP) calculations and interface with NavData.
- dop._calculate_enut_matrix(derived)[source]
Calculate the ENU and Time Matrix from elevation and azimuth. Each row is [d_e, d_n, d_u, 1] for each satellite.
- Parameters:
derived (gnss_lib_py.navdata.navdata.NavData) – NavData instance containing received GNSS measurements for a particular time instance, contains elevation and azimuth angle information for an estimated location.
- Returns:
enut_matrix – Matrix of ENU and Time vectors of size (num_satellites, 4).
- Return type:
np.ndarray
- dop._safe_sqrt(x)[source]
Safe square root for DOP calculations.
- Parameters:
x (float) – Value to take the square root of.
- Returns:
y – Square root of x, or NaN if x is negative.
- Return type:
float
- dop.calculate_dop(derived)[source]
Calculate the DOP from elevation and azimuth (ENU).
- Parameters:
derived (gnss_lib_py.navdata.navdata.NavData) – NavData instance containing received GNSS measurements for a particular time instance, contains elevation and azimuth angle information for an estimated location.
- Returns:
dop – Dilution of precision, with DOP type as the keys: “HDOP”, “VDOP”, “TDOP”, “PDOP”, “GDOP”.
- Return type:
Dict
- dop.calculate_enu_dop_matrix(derived)[source]
Calculate the DOP matrix from elevation and azimuth (ENU).
- Parameters:
derived (gnss_lib_py.navdata.navdata.NavData) – NavData instance containing received GNSS measurements for a particular time instance, contains elevation and azimuth angle information for an estimated location.
- Returns:
dop_matrix – DOP matrix of size (4, 4).
- Return type:
np.ndarray
- dop.get_dop(navdata, **which_dop)[source]
Get DOP from navdata.
- Parameters:
navdata (gnss_lib_py.navdata.navdata.NavData) – NavData instance containing received GNSS measurements for a particular time instance, contains elevation and azimuth angle information for an estimated location. Instance of the NavData class which must include at least
gps_millis
,el_sv_deg
, andaz_sv_deg
which_dop (dict) –
Dictionary of which dop values are needed. Default is HDOP and VDOP.
Note that the dop matrix output is splatted across entries following the behavior below:
[[EE, EN, EU, ET], [NE, NN, NU, NT], [UE, UN, UU, UT], [TE, TN, TU, TT]] (16 values in 2D array)
is stored as:
[EE, EN, EU, ET, NN, NU, NT, UU, UT, TT] (10 values in 1D array)
recognizing that the dop matrix is symmetric.
- Returns:
dop_navdata – Dilution of precision data along with the relevant time stamp.
- Return type:
gnss_lib_py.navdata.navdata.NavData
- dop.get_enu_dop_labels()[source]
Helper function to get the DOP labels.
- Returns:
dop_labels – List of strings for the DOP labels.
- Return type:
list
- dop.parse_dop(dop_matrix)[source]
Calculate DOP types from the DOP matrix.
- Parameters:
dop_matrix (np.ndarray) – DOP matrix in ENU coordinates of size (4, 4).
- Returns:
dop – Dilution of precision, with DOP type as the keys: “HDOP”, “VDOP”, “TDOP”, “PDOP”, “GDOP”.
- Return type:
Dict
- dop.splat_dop_matrix(dop_matrix)[source]
Splat the DOP matrix into a 1D array. Note that the dop matrix output is splatted across entries following the behavior below:
[[EE, EN, EU, ET], [NE, NN, NU, NT], [UE, UN, UU, UT], [TE, TN, TU, TT]] (16 values in 2D array)
is stored as:
[EE, EN, EU, ET, NN, NU, NT, UU, UT, TT] (10 values in 1D array)
recognizing that the dop matrix is symmetric.
- Parameters:
dop_matrix (np.ndarray) – DOP matrix in ENU coordinates of size (4, 4).
- Returns:
dop_splat – DOP matrix splatted into a 1D array of size (10,).
- Return type:
np.ndarray
- dop.unsplat_dop_matrix(dop_splat)[source]
Un-splat the DOP matrix from a 1D array. Note that the dop matrix output is unsplatted across entries following the behavior below:
[EE, EN, EU, ET, NN, NU, NT, UU, UT, TT] (10 values in 1D array)
is unsplatted to
[[EE, EN, EU, ET], [NE, NN, NU, NT], [UE, UN, UU, UT], [TE, TN, TU, TT]] (16 values in 2D array)
recognizing that the dop matrix is symmetric.
- Parameters:
dop_splat (np.ndarray) – DOP matrix splatted into a 1D array of size (10,).
- Returns:
dop_matrix – DOP matrix in ENU coordinates of size (4, 4).
- Return type:
np.ndarray