-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting Lat/Long to meters producing incorrect values #4
Comments
Hello @kmay30. The way you should be using the conversion class is to first set a fixed point ("origin") to your 3D scene with IndoorAtlas.WGSConversion temp = new IndoorAtlas.WGSConversion ();
temp.setOrigin (63.357219, 27.403592); Then you can compute relative (east, north) transitions with Vector2 eastNorth = temp.WGStoEN (63.357860, 27.402245);
Debug.Log ("East-North transition: " + eastNorth.x + ", " + eastNorth.y); This gives me a transition of (-67.42091, 71.45055) from origin, that is, a transition of ~67 meters to West and ~71 meters to North from origin. This makes sense to me: The origin (in this example) is at the beginning line of a 100 meters track and the end is at the finish line. The length of the transition vector is 98.2 meters. I hope this helps. |
This was helpful and things are now functioning as expected, thanks! |
I'm glad to hear that the comment above helped you to solve your problems. I merged the changes to master branch and, based on this discussion, added a numerical example to |
There is a question related to this issue, how to know the origin coordinates once we do a setOrigin() on the indoor atlas with respect to our coordinates. The reason behind asking this question is, I need to place my camera facing north and also want it to be at the origin. |
You need to figure out the lat/long of a precise location in world space, and set up your Unity scene with that point as the 0,0 point, then enter than lat/long into setOrigin().
On Apr 2, 2018, at 2:35 PM, kansaraurmil55 <notifications@github.com<mailto:notifications@github.com>> wrote:
There is a question related to this issue, how to know the origin coordinates once we do a setOrigin() on the indoor atlas with respect to our coordinates. The reason behind asking this question is, I need to place my camera facing north and also want it to be at the origin.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#4 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACTz17qNpMLZpIRX0xFwcUfjp-bIU8W8ks5tkm92gaJpZM4RvZPo>.
|
That is correct. The origin can be (theoretically) any point in the world but algorithm's approximation error increases when you compute metric transformations far away from the origin. In many applications it makes sense to set the origin as a "landmark point" whose GPS coordinates can be determined accurately (e.g. from map). This makes it easier to place 3D environments to physically correct places. |
Hello,
I've been attempting to get appropriate output out of the "example/3d-position" branch, and in particular, WGSConversion.cs.
I am expecting to be able to feed in lat and long of a known position relative to the unity scene, which the origin of the unity scene, and have IndoorAtlas lat and long values converted into meter-scale deviation from that center point.
However, I am getting enormous values- orders of magnitude larger than what one would expect.
It's possible I am doing something incorrectly, but this could also be an issue with the code.
The text was updated successfully, but these errors were encountered: