Added cart2latlon function (untested)