Cinematics#
Class to manage cinematic computations on GPS tracks
- tracklib.algo.Cinematics.estimate_speed(track)[source]#
Compute and return speed for each point Difference finie arriere-avant
- tracklib.algo.Cinematics.smoothed_speed_calculation(track, width)[source]#
TODO
- Parameters
track – TODO
width – TODO
- Returns
TODO
- tracklib.algo.Cinematics.estimate_heading(track)[source]#
Compute and return speed for each point Difference finie arriere-avant
- tracklib.algo.Cinematics.computeAvgSpeed(track, id_ini=0, id_fin=None)[source]#
Computes averaged speed (m/s) between two points TODO : à adapter
- tracklib.algo.Cinematics.computeAvgAscSpeed(track, id_ini=0, id_fin=None)[source]#
Computes average ascending speed (m/s) TODO : à adapter
- tracklib.algo.Cinematics.computeAbsCurv(track)[source]#
Compute and return curvilinear abscissa for each points
- tracklib.algo.Cinematics.computeCurvAbsBetweenTwoPoints(track, id_ini=0, id_fin=None)[source]#
Computes and return the curvilinear abscissa between two points TODO : adapter avec le filtre
- tracklib.algo.Cinematics.computeNetDeniv(track, id_ini=0, id_fin=None)[source]#
Computes net denivellation (in meters)
- tracklib.algo.Cinematics.computeAscDeniv(track, id_ini=0, id_fin=None)[source]#
Computes positive denivellation (in meters)
- tracklib.algo.Cinematics.computeDescDeniv(track, id_ini=0, id_fin=None)[source]#
Computes negative denivellation (in meters)
- tracklib.algo.Cinematics.inflection(track)[source]#
Among the characteristic points, inflection points are those the curvature changes sign. In tracklib, this characteristic is modeled as an AF algorithm to detect if the observation obs(i) is an inflection point or not.
Le principe de détection est fondé sur l’étude de la variation des produits vectoriels le long de la ligne. Les points d’inflexion sont détectés aux changements de signe de ces produits. Pour éviter les micros inflexion, on considère aussi qu’on a au moins 2 produits consécutifs de même signe de part et d’autre.
Normalement, le point d’inflexion est le milieu de [oi, oi+1]. TODO : Pour ne pas avoir à ajouter de points, on prend oi, à changer.
Parameters#
- param track
a track to compute inflection point
- param i
the th point
- type track
Track
- type i
int
- returns
1 if obs(i) is a inflection point, 0 else.
- rtype
int
- tracklib.algo.Cinematics.setVertexAF(track)[source]#
Vertices are characteristic points of a track corresponding to the maxima of curvature between two inflexion points.
“sommet” dans la thèse de Plazannet
This function is an AF algorithm to detect if the observation obs(i) is a vertex point of the track or not.
Parameters#
- param track
a track to compute inflection point
- param i
the th point
- type track
Track
- type i
int
- returns
1 if obs(i) is a vertex point, 0 else.
- rtype
int
- tracklib.algo.Cinematics.setBendAsAF(track, angle_min=1.5707963267948966)[source]#
Attribution des points de la trace qui composent le virage défini par le sommet et les points d’inflexion les plus proches de chaque côté.
Un bon virage est un virage dont l’angle avec le sommet et ses points d’inflexion est inférieur à angle_min.
AF = ‘bend’ and value is 1 if obs(i) is in a bend, 0 else.
Parameters#
- TTrack
La trace dont on veut extraire les points autour du sommet.
- angle_minfloat
angle min in radians.
- tracklib.algo.Cinematics.setSwitchbacksAsAF(track, nb_virage_min=3, dist_max=150)[source]#
Fusion des virages (consécutifs ou pas) si leur nombre est supérieur à nb_virage_min et si la distance maximale entre deux sommets est inférieure à dist_max. Attention: c’est une structure de fonction particulière qui créée un AF, elle ne s’appelle pas avec la méthode addAnalyticalFeature.
TODO: a revoir
Parameters#
track : Track nb_virage_min : nombre dist_max : distance