def get_speed(self, point_no):
        point = self.points[point_no]

        previous_point = None
        next_point = None

        if 0 < point_no < len(self.points):
            previous_point = self.points[point_no - 1]
        if 0 < point_no < len(self.points) - 1:
            next_point = self.points[point_no + 1]

        #mod_logging.debug('previous: %s' % previous_point)
        #mod_logging.debug('next: %s' % next_point)

        speed_1 = point.speed_between(previous_point)
        speed_2 = point.speed_between(next_point)

        if speed_1:
            speed_1 = abs(speed_1)
        if speed_2:
            speed_2 = abs(speed_2)

        if speed_1 and speed_2:
            return (speed_1 + speed_2) / 2.

        if speed_1:
            return speed_1

        return speed_2
Return a slice of ``html`` <= length chars.
dataset/ETHPy150Open tkrajina/gpxpy/gpxpy/gpx.py/GPXTrackSegment.get_speed--crossover with--dataset/ETHPy150Open mozilla/addons-server/src/olympia/translations/utils.py/truncate