public function lastTrackPoint(): TrackPoint
    {
        $lastTrackPoint = end($this->trackPoints);

        if (!$lastTrackPoint instanceof TrackPoint) {
            throw new \OutOfBoundsException('No track points points defined.');
        }

        reset($this->trackPoints);

        return $lastTrackPoint;
    }