Changed spatial calculations to use cartesian coordinates instead of geodetic (which are deprecated in the enav project)