I have two coordinate systems- UTM Zone 23S and a local one with the following conversion from UTM to Local:
EASTING: SQRT( (UTM_EAST-296787.355)^2 +UTM_NORTH-8095123.271)^2) *COS(ATAN((UTM_NORTH-8095123.271)/(UTM_EAST-296787.355))-0.0109372521874868)+6000
NORTHING: SQRT( (UTM_EAST-296787.355)^2+(UTM_NORTH-8095123.271)^2) *SIN(ATAN((UTM_NORTH-8095123.271)/(UTM_EAST-296787.355))-0.0109372521874868)+8000
I've spent a lot of time trying to get this to convert in proj4 code with QGIS, and the closest I can get is this:
+proj=omerc +y_0=8766 +x_0=6027.776 +alpha=-0.0109372521874868 +lat_0=-17.21294 +lonc=-46.91099472326864 +gamma=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
which gets me within a few meters. But it is not perfect. The shapes do not align perfectly. Theres some rotation that I cannot figure out.
My question is this: is it possible to write a proj4 script to convert from one to the other using the above mathematical expressions?