artemis_gnss.algos package
Submodules
artemis_gnss.algos.condition_intervals module
Functions to find the extremity indexes of the intervals of a given condition Created on 20/09/24
- artemis_gnss.algos.condition_intervals.get_condition_intervals(condition: ndarray[tuple[Any, ...], dtype[bool]]) Tuple[ndarray[tuple[Any, ...], dtype[int64]], ndarray[tuple[Any, ...], dtype[int64]]]
- artemis_gnss.algos.condition_intervals.hold_values(values: array, condition: ndarray[tuple[Any, ...], dtype[bool]], init: float = 0.0) array
- artemis_gnss.algos.condition_intervals.propagate_diff_cond(diff_cond_1: ndarray[tuple[Any, ...], dtype[bool]]) ndarray[tuple[Any, ...], dtype[bool]]
Propagate a condition which was computed on a diffed signal d_i = x_i+1 - x_i to the both indexes of x :param diff_cond_1: :return:
artemis_gnss.algos.curvature module
Functions for computations on curvature Created on 20/09/24
- artemis_gnss.algos.curvature.curvature_from_heading(heading_rad: ndarray[tuple[Any, ...], dtype[float64]], speed_m_s: ndarray[tuple[Any, ...], dtype[float64]], *, min_speed_for_curvature_compute: float = None, max_curvature_value_1_m: float = None) ndarray[tuple[Any, ...], dtype[float64]]
Compute curvature from heading derivative [1/m]
Curvature is maintained when speed is near zero
artemis_gnss.algos.exceptions module
Exceptions used in the package Created on 20/09/24
- exception artemis_gnss.algos.exceptions.TimeOverlayException(time_end, time_add)
Bases:
Exception
artemis_gnss.algos.gps_noise_detection module
GPS noise detection methods Created on 20/09/24
- artemis_gnss.algos.gps_noise_detection.crow_fly_or_round_trip_distance(trace: DataFrame, norm: NormType = None)
- artemis_gnss.algos.gps_noise_detection.portion_is_gps_noise(trace: DataFrame, method: GPSNoiseDetectMethod = None) bool
- artemis_gnss.algos.gps_noise_detection.portion_is_gps_noise_circumscribed_method(trace: DataFrame) bool
artemis_gnss.algos.gps_position module
Functions common to convert between GPS coordinate systems Created on 20/09/24
- artemis_gnss.algos.gps_position.calculate_enclosing_circle(points)
- artemis_gnss.algos.gps_position.convert_lambert(*, longitude: ndarray[tuple[Any, ...], dtype[float64]], latitude: ndarray[tuple[Any, ...], dtype[float64]]) Tuple[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]]
Méthode de conversion des données géo en lambert
Inputs
longitude [°] latitude [°]
Outputs
x [m] y [m]
- artemis_gnss.algos.gps_position.convert_lambert_compute_speed(*, longitude: ndarray[tuple[Any, ...], dtype[float64]], latitude: ndarray[tuple[Any, ...], dtype[float64]], time: ndarray[tuple[Any, ...], dtype[float64]]) Tuple[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]]
- artemis_gnss.algos.gps_position.distance_compute_ortho(dx: ndarray[tuple[Any, ...], dtype[float64]] | float, dy: ndarray[tuple[Any, ...], dtype[float64]] | float, norm: NormType = None, squared: bool = False) ndarray[tuple[Any, ...], dtype[float64]] | float
- artemis_gnss.algos.gps_position.haversine_distance(lat1, lon1, lat2, lon2)
- artemis_gnss.algos.gps_position.pos_diff_distance(*, longitude: ndarray[tuple[Any, ...], dtype[float64]], latitude: ndarray[tuple[Any, ...], dtype[float64]], norm: NormType = None, squared: bool = False) ndarray[tuple[Any, ...], dtype[float64]]
- artemis_gnss.algos.gps_position.pos_diff_distance_2_points(*, lon1: float, lat1: float, lon2: float, lat2: float, norm: NormType = None, squared: bool = False) float
artemis_gnss.algos.heading module
Functions for computations on heading Created on 20/09/24
- artemis_gnss.algos.heading.diff_mod(signal: ndarray[tuple[Any, ...], dtype[float64]], mod: float = 6.283185307179586) ndarray[tuple[Any, ...], dtype[float64]]
- artemis_gnss.algos.heading.gradient_mod(signal: ndarray[tuple[Any, ...], dtype[float64]], mod: float = 6.283185307179586) ndarray[tuple[Any, ...], dtype[float64]]
- artemis_gnss.algos.heading.heading_from_position(*, longitude: ndarray[tuple[Any, ...], dtype[float64]], latitude: ndarray[tuple[Any, ...], dtype[float64]], time: ndarray[tuple[Any, ...], dtype[float64]] = None, coord_wgs=True) ndarray[tuple[Any, ...], dtype[float64]]
Compute heading from GPS coordinates (not recommended) based on atan2 method TODO: validation :param longitude: longitude :param latitude: latitude :param time: time [s] If given, this option encounters time between GPS coordinates to compute speed vector :param coord_wgs: if True, position was given in WGS coordinates, if False, lambert conversion was already done
artemis_gnss.algos.slope module
Functions for computations on slope Created on 20/09/24
- artemis_gnss.algos.slope.slope_from_elevation(*, elevation_m: ndarray[tuple[Any, ...], dtype[float64]], distance_m: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]]
artemis_gnss.algos.stop_detection module
Functions defining a stop Created on 20/09/24
- artemis_gnss.algos.stop_detection.stop_or_gap_detection(trace: DataFrame, *, method: StopDetectionMethod = None) Tuple[Tuple[List[int], List[int]], Tuple[List[int], List[int]]]
Stop detection algorithm entry point This method is used to cut portions out of traces. It is also used in the TraceKpi method. :param trace: :param method: :return:
- artemis_gnss.algos.stop_detection.stop_or_gap_detection_sliding_radius(trace: DataFrame, *, window_len: int = 300, threshold_m: float = 30) Tuple[Tuple[List[int], List[int]], Tuple[List[int], List[int]]]
- artemis_gnss.algos.stop_detection.stop_or_gap_detection_speed(trace: DataFrame, *, duration_cut_s: float = 0) Tuple[Tuple[List[int], List[int]], Tuple[List[int], List[int]]]
artemis_gnss.algos.time_base module
Functions to switch from a time vector to a timestamp vector Created on 20/09/24
- artemis_gnss.algos.time_base.diff_timestamp(timestamp_vect: ndarray[tuple[Any, ...], dtype[datetime64]])
Element-wise time difference in seconds :param timestamp_vect: Series of np.datetime64 length n :return: length n - 1
- artemis_gnss.algos.time_base.np_timedelta_total_seconds(dt: timedelta64)
- artemis_gnss.algos.time_base.time_vect_from_timestamp_vect(timestamp_vect: ndarray[tuple[Any, ...], dtype[datetime64]], *, ref_timestamp: datetime64 = None) ndarray[tuple[Any, ...], dtype[datetime64]]
- artemis_gnss.algos.time_base.time_vect_to_timestamp_vect(time_vect: ndarray[tuple[Any, ...], dtype[float64]], *, ref_timestamp: datetime64) ndarray[tuple[Any, ...], dtype[datetime64]]
- artemis_gnss.algos.time_base.trace_generate_time_vect(trace: DataFrame, *, ref_timestamp: datetime64 = None, default_time_step: float = None, generic_time_offset: float = 0)
Add the time field to a trace if missing, or shift it to ref_timestamp :param trace: :param ref_timestamp: :param default_time_step: :param generic_time_offset: :return:
- artemis_gnss.algos.time_base.trace_generic_time_vect(trace: DataFrame, *, ref_timestamp: datetime64 = None, time_step: float = None, time_offset: float = 0)
Generate a time vector with a regular spacing, according to the index of the samples :param trace: :param ref_timestamp: :param time_step: :param time_offset: :return:
- artemis_gnss.algos.time_base.trace_shift_timestamp(trace: DataFrame, *, new_timestamp: datetime64, trace_timestamp: datetime64 = None)
Shift the reference timestamp of a trace :param trace: :param new_timestamp: :param trace_timestamp: reference timestamp of the trace (should be contained in trace.attrs) :return:
- artemis_gnss.algos.time_base.trace_time_vect_from_timestamp_vect(trace: DataFrame, *, ref_timestamp: datetime64)
Generate time vector from timestamp vector :param trace: :param ref_timestamp: reference timestep, where t=0 :return:
- artemis_gnss.algos.time_base.trace_time_vect_to_timestamp_vect(trace: DataFrame, *, ref_timestamp: datetime64)
Generate timestamp vector from time vector + ref_timestamp :param trace: :param ref_timestamp: :return:
Module contents
Functions common to different submodules Created on 20/09/24