public static function computeHeading($from, $to) {
        // http://williams.best.vwh.net/avform.htm#Crs
        $fromLat = deg2rad($from['lat']);
        $fromLng = deg2rad($from['lng']);
        $toLat = deg2rad($to['lat']);
        $toLng = deg2rad($to['lng']);
        $dLng = $toLng - $fromLng;
        $heading = atan2(
                sin($dLng) * cos($toLat),
                cos($fromLat) * sin($toLat) - sin($fromLat) * cos($toLat) * cos($dLng));
        
        return MathUtil::wrap(rad2deg($heading), -180, 180);
    }