Now $n$ points($p_1 ,\ldots, p_n$) are given in a cartesian $3D$ coordinate system: $L_1$. Actually, $L_1$ is a local coordinate system of a $3D$ model.
And $n$ points($P_1,\ldots ,P_n$) are given in the other cartesian $3D$ coordinate system: $L_2$.$ L_2$ is the Earth-centered, Earth-fixed coordinate system: ECEF.
$Pi$ represents the converted point of $p_i$ from $L_1$ to $L_2$.
Now I want to find the matrix$4$ that convert points in $L_1$ to $L_2$ with the minimum error. Is this possible mathematically? Any idea or suggestion would be thankful.
Context.
I have a 3d model provided by an artist. I want to render it on the 3D earth. But we have not correct georeferencing information about 3d model. So we want to make users georeference it in our application.
Our application use case.
He selects $p_1$ on the 3d model's local 3D cartesian coordinate system. Then he selects $P_1$ on the earth that corresponds to $p_1$. And then he $p_2$ on the local then $P_2$ on the earth. ... In this way, he provides two sets of points.