Hash function orders ships from closest to furthest from the origin
You can't.  This problem is as hard as sorting, so it'll need $\Omega(n \log n)$ time (in the comparison-based model); it's not reasonable to expect a linear-time algorithm for sorting.

The obvious solution is to sort the points by their distance from the origin.  If the hash function computes the distance from the origin, well, then you're just sorting hash values.