public function distanceFromPoint(TrackPoint $trackPoint): float
    {
        $earthRadius = 6371000;

        $latFrom = deg2rad($this->latitude());
        $lonFrom = deg2rad($this->longitude());
        $latTo = deg2rad($trackPoint->latitude());
        $lonTo = deg2rad($trackPoint->longitude());

        $latDelta = $latTo - $latFrom;
        $lonDelta = $lonTo - $lonFrom;

        $angle = 2 * asin(
                sqrt(
                    pow(sin($latDelta / 2), 2) +
                    cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)
                )
            );

        return $angle * $earthRadius;
    }