I am currently working on a location based app (using JS) and have a question concerning the class AR.RelativeLocation.
Does northing, easting etc. mean the real North, East etc. direction as the compass points to?
Example: If I create a GeoLocation with parameters in Salzburg, Mirabell castle
var castleLLA = new AR.GeoLocation(47.805403, 13.041763, 0);
and then a new relativeLocation with the following parameters:
var loc = new AR.RelativeLocation(castleLLA, -500, -1000, 1);
Does this mean, that the location "loc" is 500 m to the South, 1000 m to the West of Mirabell castle? If the user is located directly at the castle and is looking with his device to the Northeast (real Northeast as indicated by the compass) , he will not see the model because it is placed to the Southwest. Is this correct?
Concerning the altitude parameter, does the value 1 (of my example) mean : the model is placed at 1 m height = 1 m higher than the user's device? Or does it mean 1 m altitude as the compass app would show it?
Hope to hear from you, as it is really important to know this.
Regards,
Berenice
D
Daniel Guttenberg
said
over 6 years ago
Hi B. Terwe,
I expect the RelativeLocation object to behave as you detailed in your example.
Regarding altitude the former should be correct; a RelativeLocation with an altitude value of 1 should appear 1 meter above the referenced GeoLocation object.
Did you experience unexpected behaviour when you tried this?
Kind Regards
Daniel
V
Visualfan2012
said
over 6 years ago
Hi Daniel,
Many thanks for your reply!
"Did you experience unexpected behaviour when you tried this?" - No, the altitude works as expected. I had confused metaio's and Wikitude's coordinate systems.
But, I have 2 other questions concerning "AR.context.onLocationChanged":
1)
How is a location change checked, is there a kind of interval like each 500 milliseconds or similar?
In my usecase, the user shall walk on foot. A 3D model shall update its position depending on the user?s location.
I get a locationChanged event approx. every 5-12 seconds (or 15-20 steps) depending on the speed (m per second), the accuracy is about 2-3 m. I wish, I could get this event fired more often, in shorter intervals.
2)
Second problem is that the model disappears for a moment - it is not rendered. While debugging, this disappearing effect happens each time the function associated to ?World.locationChanged? is called, so in fact every 5-12 seconds when OnLocationChanged happens and the new LLA position for the model is computed.
Visualfan2012