Garmaine Staff asked 1 year ago

I have a UTM coordinate (zone, hemisphere, northing, easting, height) where height is in meters.

I want to convert this coordinate into a custom format (or vice versa) where I choose an arbitrary plane that is tangent to the Earth. The tangent point of the plane has a longitude/latitude with height of zero (it "touches" Earth at that point).

The X axis of the tangent plane points North, Y points West, and Z points up. I refer to this coordinate system as "North/West/Up" or "NWU".

Once I have the tangent plane, I define all points relative to the plane's origin (tangent point) in NWU coordinates of meter units.

An NWU coordinate basically looks like (lon, lat, X, Y, Z) which can also be referred to as (lon, lat, N, W, U) where (lon, lat) describes the touch point of the tangent plane and the origin from which all NWU points are relative to.

This is what the tangent plane looks like:

tangent plane

Given a UTM coordinate (zone, hemisphere, easting, northing, height), how can I use proj (proj4) to convert it into the NWU coordinates of (lon, lat, N, W, U) where (lon, lat) is predefined? What would the proj string be?

And vice versa from NWU with pre-defined (lon, lat) to UTM: what would that proj string be?

If the (lon, lat) would be simply hard-coded into the string, that's fine. I can template it depending on which tangent plane I choose.

I don't know if the latitude is geocentric or geodetic. I would like to know what the proj strings are using either, so there will be a total of four proj strings (assuming a hard-coded lon/lat). Or maybe it is more strings if this requires multiple steps for each conversion.

Most importantly, it would be great to know the thought process to understand how to come up with the proj strings, so that I can learn from this.