zac / iphonearkit

An Objective-C augmented reality kit for iPhone.
http://iphonear.org/
808 stars 251 forks source link

azimuth problem #9

Open costamatrix opened 13 years ago

costamatrix commented 13 years ago

Hi Zac...thanks for this wonderful project...

i got a problem....on your example when you turn the iphone slighly to the left or right, in an angle different from the 90o the points start to "run" to the sides and disappear.... you know this...

there is a way to simply fix this points on the screen disregarding the angle of the iphone?

thx for your help!

nielswh commented 12 years ago

Check out this fork. I fixed this issue. https://github.com/nielswh/iPhone-AR-Toolkit

Tibolte commented 12 years ago

Hi! I'm also working on this location-based augmented reality. Now, I've got the same problem. It works like a charm most of the time, but sometimes the markers on the screen jump suddenly to another position, or "run" as you say costamatrix. I'd like to keep them fixed on the screen. I looked at your fork nielswh, but I did'n't get how you did to fix this issue, could you explain it please?

Tibolte commented 12 years ago

Get it! Figured out later by myself ;)

hanneslarsson commented 12 years ago

please explain what you figured out Tibolte, I'm having the same problem

Tibolte commented 12 years ago

Hi,

First I don't really know if my question was suiting this topic. My problem was that at a specific range of azimuth my annotations were suddenly disappearing (in landscape mode), strange... The thing is, when you rotate your device, you have to adjust your azimuth by substracting 90° for example (landscape right), here you get the range from Portrait [90;359] becoming [-269;-1], you have to add 360° to correct it, it looked like having a "ghost range".

Another thing is, I got a jumpy problem, at first I was thinking I asked too much performance to the device, but I forgot to use pointers, and the problem was solved. The critical point was when we update the locations, we should use a pointer to point at our current azimuth while we are calling the function to calculate the delta azimuth between our current location and the location being processed. Before I wasn't doing it, and now it is much smoother.

I don't really know if I answered your question, but I hope it will help some people who will perhaps find this topic!