def classify(self, track_segment):
        past_name = None
        N = len(track_segment)
        length = 0
        for i in range(N - 1):
            start = track_segment[i]
            stop = track_segment[i + 1]
            if start.ele == None or stop.ele == None:
                return False
            tangens = Track.angle_from_points(None, start, stop,
                                              True) * 100  #проценты
            name_steepness = self.check_steepness_slopes(tangens)

            if name_steepness != past_name:
                if past_name is None:
                    past_name = name_steepness
                    continue

                if self.check_length_slopes(name_steepness, length):
                    self.add_steepness_one(name_steepness)

                length = 0
                past_name = name_steepness
            else:
                length += Track.distance_from_points(None, start, stop) * 1000
        return True
 def classify(self, track_segment):
     past_name = None
     N = len(track_segment)
     length = 0
     for i in range(N - 1):
         start = track_segment[i]
         stop = track_segment[i + 1]
         if start.ele == None or stop.ele == None:
             return False
         angle = Track.angle_from_points(None, start, stop)
         name_steepness = self.check_steepness_slopes(angle)
         if name_steepness != past_name:
             if past_name is None:
                 past_name = name_steepness
                 continue
             name_length = self.get_length_name(length)
             self.add_steepness_one(name_steepness, name_length)
             length = 0
             past_name = name_steepness
         else:
             length += Track.distance_from_points(None, start, stop) * 1000
     return True