I am successfully converting (latitude, longitude) coordinates to (East, North) coordinates and am trying to figure out a way to accurately place the (East, North) coordinates in the AR world.
Example of my current issue:
Device coordinate system:

A conversion from a (latitude, longitude) coordinate gives me an (East, North) coordinate of,
(+x, 0, +z) where x=East, z=North.
Now, if I am facing Northwards the EN coordinate will be placed behind me, as the forward facing axis is -z. If I am facing Southwards, the EN coordinate will be placed behind me once again because it is dependent on my device's orientation.
My question:
In ARCore is it possible to fix a device's coordinate system no matter what orientation the device is in? Or is there an algorithm that takes into account device orientation and allows static placement of Anchors?
I don't think the image above accurately shows ArCore's coordinate system. There is no promise that -z in World Coordinate Space points away from the camera. Every frame as ArCore gains understanding of the scene around it it will change the world coordinate system. The promises that ArCore does make are regarding hits on planes and anchors.
If you have a plane then you can get a hit result from it and the pose of that hit result is going to be as defined here: https://developers.google.com/ar/reference/java/com/google/ar/core/HitResult#getHitPose()
If you have an anchor it will be updated each frame to account for how the world coordinate system may have been adjusted. This means your calculations need to be relative to anchors if you want them to be stable. You can create anchors from the pose of a hit result or just arbitrarily.
TL;DR you probably want to work relative to an anchor. ArCore does try to keep anchors static however the device moves.
@malik-at-work Thank you for clearing things up!
If I am to calculate new positions relative to an anchor, do you suggest childing nodes to the anchor and using setWorldPosition() for the (East, North) translation from the anchor?
Or should I focus more on the calculation of new Poses based off of the anchor's Pose?
Thanks again for your time.
If you make something a child of an anchor then you would only need to calculate the desired orientation/position once and apply it using setLocalPosition. The anchor gets updated and combined with the local position automatically for all children.
If it's not a child of the anchor you'll need to combine the anchors position with your desired orientation every frame and use setWorldPosition to apply the result.
It's your call which one would work better for you.
@malik-at-work Thank you, I will close the issue as I have no more questions at this time.
@nbazos sir can you share how do you convert (latitude, longitude) coordinate to (east, north) coordinate? After that, how do you render the object to the camera space ?
Thanks in advance!
@liho00
The first time you must convert WSG84 to ECEF after you can convert to ENU
1: WSG84 to ECEF
see here
https://gist.github.com/govert/1b373696c9a27ff4c72a
2: ECEF to ENU
See more here https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_ECEF_to_ENU