Coder Social home page Coder Social logo

Comments (6)

simomar avatar simomar commented on June 24, 2024

Hello @kmay30.

The way you should be using the conversion class is to first set a fixed point ("origin") to your 3D scene with setOrigin method, for example:

IndoorAtlas.WGSConversion temp = new IndoorAtlas.WGSConversion ();
temp.setOrigin (63.357219, 27.403592);

Then you can compute relative (east, north) transitions with WGStoEN method, for example:

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.

from unity-plugin.

kmay30 avatar kmay30 commented on June 24, 2024

This was helpful and things are now functioning as expected, thanks!

from unity-plugin.

simomar avatar simomar commented on June 24, 2024

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 README.md file.

from unity-plugin.

kansaraurmil55 avatar kansaraurmil55 commented on June 24, 2024

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.

from unity-plugin.

kmay30 avatar kmay30 commented on June 24, 2024

from unity-plugin.

simomar avatar simomar commented on June 24, 2024

That is correct.
IndoorAtlas Unity plugin is unaware of your 3D environment / map so we decided to implement a coordinate transformation utility, which maps (latitude, longitude) coordinates to metric (east, north) coordinates. These coordinates can be used further to find the location in (Unity's) 3D space.

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.

from unity-plugin.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.