private function recomputeLength(): float
    {
        $this->length = 0;

        $trackPoints = $this->trackPoints();
        $trackPointsCount = count($trackPoints);
        if ($trackPointsCount < 2) {
            return 0;
        }

        for ($i = 1; $i < $trackPointsCount; $i++) {
            $previousTrack = $trackPoints[$i - 1];
            $currentTrack = $trackPoints[$i];

            $this->length += $currentTrack->distanceFromPoint($previousTrack);
        }

        $this->length = round($this->length, 6);

        return $this->length;
    }