English 中文(简体)
4. 手工作业工具箱或照相机不正确
原标题:iPhone AR Toolkit or compass give incorrect orientation

I m using AR Toolkit, but I m not sure if it is working well or if I have a problem with my iPhone.

When I try to locate a point, I see its label on its right. It never points to that location. Do you have the same problem?

换言之,当我看一看一看一看一看一看我试图指出的地方。 我看到这一位置及其贴标签。

我不敢肯定,我是否对我的绕行或工具包有问题,工作不错。

任何cl?

问题回答

我已经修改了我的计算方法,以便与链接联系起来。

CLocation Coordination2Ds

double poiLon = coordinate.coordinateGeoLocation.coordinate.longitude;
double poiLat = coordinate.coordinateGeoLocation.coordinate.latitude;
double a = poiLon - self.currentLocation.coordinate.longitude;
double b = poiLat - self.currentLocation.coordinate.latitude;

poiLon=degreesToRadians(coordinate.coordinateGeoLocation.coordinate.longitude);
poiLat=degreesToRadians(coordinate.coordinateGeoLocation.coordinate.latitude);
double radCurrLatPoi=degreesToRadians(self.currentLocation.coordinate.latitude);
double radCurrLonPoi=degreesToRadians(self.currentLocation.coordinate.longitude);

a=sin(poiLon-radCurrLonPoi)*cos(poiLat);
b=cos(radCurrLatPoi)*sin(poiLat)-sin(radCurrLatPoi)*cos(poiLat)*cos(poiLon-radCurrLonPoi);

//sin(tLng-fLng)*cos(tLat), cos(fLat)*sin(tLat)-sin(fLat)*cos(tLat)*cos(tLng-fLng)
double alpha = 180.0 * atan2(a, b) / M_PI;

if (alpha < 0.0)
    alpha += 360.0;
else if (alpha > 360.0)
    alpha -= 360.0;

CLLocationDirection theHeading = self.currentHeading.trueHeading;
double deltaOrient = alpha - theHeading;
 CGFloat X = 320.0/2.0 + (deltaOrient * 320.0f / 30.0);//x position

Note: poiLon,poiLat -from positions in this context radCurrLatPoi,radCurrLonPoi-To position in this context

这一点很少奏效,在这种特定情况下并不相称。

My current Location: 18.551861,73.942108

My point of Interest: 73.943202,18.552456 73.943693,18.552754 73.943275,18.552687

我认为,这可能是因为我完成了360个视角...... 任何建议





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签