convertTrajectory bug with LMP and unitXY ft
cc @gehrmann @debasisc @joshtownsend phil.summerfield
For method LMP, with TN azimuth, with trajectory CRS BOundGeog2d, then if the unitXY is set to "ft" there is an incorrect scaling. See example below. The input is at 4E, 45N, the output point is moved. We tested that for method "AzimuthalEquidistant" the output is correct and not moved. So the issue is why is it applying this incorrect scaling/moving for LMP.
Request
{
"trajectoryCRS": "{{data_partition_id}}:reference-data--CoordinateReferenceSystem:BoundGeographic2D:EPSG::4230_EPSG::1612:",
"azimuthReference": "TN",
"unitXY": "{{data_partition_id}}:reference-data--UnitOfMeasure:ft:",
"unitZ": "{{data_partition_id}}:reference-data--UnitOfMeasure:m:",
"referencePoint": {
"x": 4.0,
"y": 45.0,
"z": 0
},
"inputKind": "MD_Incl_Azim",
"interpolate": false,
"inputStations": [
{
"md": 1000,
"azimuth": 100,
"inclination": 10
},
{
"md": 2000,
"azimuth": 200,
"inclination": 200
}
],
"method": "LMP"
}
Response (note incorrect lon/lat by factor 0.3048):
{
"trajectoryCRS": "{\"authCode\":{\"auth\":\"OSDU\",\"code\":\"4230023\"},\"lateBoundCRS\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"4230\"},\"name\":\"GCS_European_1950\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGCS[\\\"GCS_European_1950\\\",DATUM[\\\"D_European_1950\\\",SPHEROID[\\\"International_1924\\\",6378388.0,297.0]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433],AUTHORITY[\\\"EPSG\\\",4230]]\"},\"name\":\"ED50 * EPSG-Nor N62 2001 [4230,1612]\",\"singleCT\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"1612\"},\"name\":\"ED_1950_To_WGS_1984_23\",\"type\":\"ST\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGTRAN[\\\"ED_1950_To_WGS_1984_23\\\",GEOGCS[\\\"GCS_European_1950\\\",DATUM[\\\"D_European_1950\\\",SPHEROID[\\\"International_1924\\\",6378388.0,297.0]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"Position_Vector\\\"],PARAMETER[\\\"X_Axis_Translation\\\",-116.641],PARAMETER[\\\"Y_Axis_Translation\\\",-56.931],PARAMETER[\\\"Z_Axis_Translation\\\",-110.559],PARAMETER[\\\"X_Axis_Rotation\\\",0.893],PARAMETER[\\\"Y_Axis_Rotation\\\",0.921],PARAMETER[\\\"Z_Axis_Rotation\\\",-0.917],PARAMETER[\\\"Scale_Difference\\\",-3.52],OPERATIONACCURACY[1.0],AUTHORITY[\\\"EPSG\\\",1612]]\"},\"type\":\"EBC\",\"ver\":\"PE_10_9_1\"}",
"unitXY": "{\"abcd\":{\"a\":0.0,\"b\":0.3048,\"c\":1.0,\"d\":0.0},\"symbol\":\"ft\",\"baseMeasurement\":{\"ancestry\":\"L\",\"type\":\"UM\"},\"type\":\"UAD\"}",
"unitZ": "{\"abcd\":{\"a\":0.0,\"b\":1.0,\"c\":1.0,\"d\":0.0},\"symbol\":\"m\",\"baseMeasurement\":{\"ancestry\":\"L\",\"type\":\"UM\"},\"type\":\"UAD\"}",
"unitDls": "{\"scaleOffset\":{\"scale\":5.81776417331443E-4,\"offset\":0.0},\"symbol\":\"deg/30m\",\"baseMeasurement\":{\"ancestry\":\"Rotation_Per_Length\",\"type\":\"UM\"},\"type\":\"USO\"}",
"stations": [
{
"md": 1000.0,
"inclination": 10.0,
"azimuthTN": 100.0,
"azimuthGN": 100.0,
"dxTN": 0.0,
"dyTN": 0.0,
"point": {
"x": 1.2192,
"y": 13.716000000000001,
"z": 0.0
},
"wgs84Longitude": 1.2183805704257855,
"wgs84Latitude": 13.714650711946554,
"dls": 0.0,
"original": true,
"dz": 0.0
},
{
"md": 2000.0,
"inclination": 200.0,
"azimuthTN": 200.0,
"azimuthGN": 200.0,
"dxTN": 1645.8681179428295,
"dyTN": 1664.4550114224714,
"point": {
"x": 1.2344158007739452,
"y": 13.731044312925974,
"z": -78.58833072151256
},
"wgs84Longitude": 1.2335965422593287,
"wgs84Latitude": 13.729695075515563,
"dls": 4.686612503638008,
"original": true,
"dz": 78.58833072151256
}
],
"localCRS": "{\"lateBoundCRS\":{\"name\":\"Azimuthal Equidistant\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"PROJCS[\\\"Azimuthal Equidistant Lng=4.00000000;Lat=45.00000000\\\",GEOGCS[\\\"GCS_European_1950\\\",DATUM[\\\"D_European_1950\\\",SPHEROID[\\\"International_1924\\\",6378388.0,297.0]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Modified Azimuthal_Equidistant\\\"],PARAMETER[\\\"False_Easting\\\",0.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",4.0],PARAMETER[\\\"Latitude_Of_Origin\\\",45.0],UNIT[\\\"ft\\\",0.3048]]\"},\"name\":\"Azimuthal Equidistant - ED_1950_To_WGS_1984_23\",\"singleCT\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"1612\"},\"name\":\"ED_1950_To_WGS_1984_23\",\"type\":\"ST\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGTRAN[\\\"ED_1950_To_WGS_1984_23\\\",GEOGCS[\\\"GCS_European_1950\\\",DATUM[\\\"D_European_1950\\\",SPHEROID[\\\"International_1924\\\",6378388.0,297.0]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"Position_Vector\\\"],PARAMETER[\\\"X_Axis_Translation\\\",-116.641],PARAMETER[\\\"Y_Axis_Translation\\\",-56.931],PARAMETER[\\\"Z_Axis_Translation\\\",-110.559],PARAMETER[\\\"X_Axis_Rotation\\\",0.893],PARAMETER[\\\"Y_Axis_Rotation\\\",0.921],PARAMETER[\\\"Z_Axis_Rotation\\\",-0.917],PARAMETER[\\\"Scale_Difference\\\",-3.52],OPERATIONACCURACY[1.0],AUTHORITY[\\\"EPSG\\\",1612]]\"},\"type\":\"EBC\",\"ver\":\"PE_10_9_1\"}",
"method": "LMP",
"operationsApplied": [
"derived GN from TN azimuth by grid convergence 0.000000",
"computed deflections via minimum curvature method",
"computation method: LeesModifiedProposal",
"to WGS 84: transformation GCS_European_1950 to GCS_WGS_1984 using ED_1950_To_WGS_1984_23; 2 points successfully transformed"
],
"inputKind": "MD_Incl_Azim"
}