Hello great forum!
We are a study group from Aalborg University, Denmark. We are currently working on an AR App for a project, where we aim to be able to render a specific cadastre in AR. We have made many iterations of the project and have landed on Cesium for Unity, to perform the georeferencing.
The reason why we post the following questions is to hopefully get some clarification in identifying and solving our issues.
So, to help provide context I will try to list what is working and how it is done as best as possible.
We successfully made a JSON parser that takes the WGS84 coordinates of the points in a specific cadastre, rendered it to show the boundaries. It works! We then take a GNSS to improve the phones’ location to have a precise origin in the world (MockLocation).
The main and headache provoking issue is the georeferencing capabilities, because we can correctly render the cadastre geometry, but whenever we do so in the app it is drawing from the origin set in Unity. And for some reason we cannot figure out how to make the phone the origin when the app is running. We need to render the cadastre from the point where the phone is located with the right orientation.
The last iteration we tried were to make the origin in Unity a known position. We then went outside to the known location to test the app and found that the cadastre geometry is drawn as intended but the orientation of the phone decided where the lines were drawn. The absolute location of the cadastre is relative to the orientation of the phone, but that is the issue, we need the cadastre to be drawn at the right place regardless of the current orientation. The issue correlates with the origin being made in Unity as the place of origin, but we need it to be the phones origin. We can see what the issue is, but we don’t have the knowledge to fix it, and hope to find a solution here. We do not necessarily see an issue with the georeferenced being a Unity unit distance to the points, as long as we can get origin to be correct in relation to the phone location.
If you have any questions or need any clarification, please ask and we will try to provide. The structure of the app in unity is that we have an AR Geospatial Creator Origin with a Cesium Ion tileset as a child. Outside we have CesiumGeoreference GameObject that gets parsed coordinates into a CesiumGlobeAnchor children from the JSON file. These anchors then get connected using a LineRenderer two times, both with fixed height and one being a lower and one being upper, they are then connected using a plane to draw the borders.
Do we need to restructure? Do we need to use OriginShift? Can we make a new origin in the app, after build?
Kind regards,
Andreas, Frederik, Magnus, Niclas and Nicklas.