compass-geolocation

Using Compass to point to actual coordinate location instead of just North

泪湿孤枕 提交于 2019-12-04 16:53:02
I have seen a few examples of this but am not sure exactly how to implement it, (such as iPhone Compass GPS Direction ) in do I need to call calcBearingWithLatitude in (void)startup? All I am trying to do is have the compass pull a point from memory and use that point as its "north" so to speak and point to it, no need for distance or anything like that. My implementation file as of now looks like @implementation TrackerViewController @synthesize locationManager; @synthesize compass; @synthesize headingLabel; - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if (

Compass and Accelerometer precision

我们两清 提交于 2019-12-04 14:43:01
问题 i made my own application in Android that use compass and accelerometer sensors to display the degrees of rotation and inclination of my device. I initialized all the listener and objects i needed (i followed some tutorials), and now i can catch the degrees as i wished. The problem is that the measures that sensors return aren't accurate. I mean even if i try to round the values of degrees i catch from the sensor, they oscillate between -/+ 7 (or 8) degrees every fraction of a second, even if

How to retrieve high quality compass orientation (as in Google Maps)?

天大地大妈咪最大 提交于 2019-12-04 06:43:09
All of the guides to getting compass orientation in Android I've found have a bug: when you hold the phone in portrait mode and "look" above the horizon, the compass arrow turns 180 degrees from the correct direction. Google Maps orientation indicator doesn't have this problem. Another nice thing that Google Maps have is that they somehow estimate compass accuracy. Any idea how they do this? Error you ask is caused because of Euler angles or called Gimbal Lock. To solve very high angle difference, you should check if your device is flat or not checking inclination after getting inclination

Getting the difference between two headings

南楼画角 提交于 2019-12-04 02:49:44
I have this method for figuring out the difference between 2 0-360 compass headings. Although this works for figuring out how far absolutely (as in, always positive output) off I am, I am having trouble figuring out what needs to be done to introduce the sign into the output. Ideally, if the shortest distance from the initial heading to the final heading is by going around clockwise, I'd like the error to have a positive sign, if the shortest distance between the headings involves going around counterclock-wise, I'd like the error to have a negative sign. A few examples of desired inputs

How to make compass point to my particular latitude longitude location based on my current location? [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 20:38:13
This question already has an answer here: Calculate compass bearing / heading to location in Android 13 answers I'm developing an android application where I want the compass to point to a particular latitude longitude position instead of the usual north location. Can anyone suggest how to implement this. I've developed an application which points to north direction. Thanks in advance in how to implement this. Any demo application which does this would be of great help. Check out this tutorial. It should get you started in the right direction Compass Tutorial Also here is another good one

Disable compass on MKMapView

三世轮回 提交于 2019-12-03 15:59:34
问题 I am using a MapView in my app to show some annotations. In iOS 7 a compass appears randomly on the map. I can't reproduce the error because it appears randomly but I want to disable it. Any ideas how to disable it? Update: I found out is not appears randomly but on a specific gesture. When you use 2 fingers and slide one right and the other left. 回答1: You can disable the compass easily on OSX 10.9 / iOS 9 and later with the showsCompass property: yourMapView.showsCompass = NO; On iOS 8 or

Android accelerometer, sensor usage and power consumption

醉酒当歌 提交于 2019-12-03 12:46:41
I have a quick question about the accelerometer in Android devices. Is it always on/active? Given that accelerometer is used to detect the orientation of the device, either landscape or portrait. In the official documentation ( SensorManager ) it states that sensors should be turned off to save power. But I wonder if this only applies to others sensors like magnetic field sensors, gyroscope, light sensor and so on. I need to make a case for power conservation and I don't want to make the mistake of saying that the accelerometer can at times be disabled, and instead use it for the purpose of

Finding Direction in iPhone like in Compass?

此生再无相见时 提交于 2019-12-03 11:32:53
Do any one have idea for finding true direction using iPhone? I want to implement such application in which I need to find direction in which iPhone is pointing and want to make application same as compass application in iphone 3GS. Does iPhone 3G supports compass functionality? And can any one tell me how compass application find directions so accurately like a real magnetic compass? Please help me for this. I am in a critical situation. Thanks in advance. akshayk80 here is a sample code link from apple.com for using magnetometer and Core Location https://developer.apple.com/library/ios/

iPhone compass showing to a specific location

独自空忆成欢 提交于 2019-12-03 10:16:36
问题 I am new to objective-c so I want to apologize if my question is too rubbish. I am programming a compass and yet, it is working (thanks to a tutorial). Actual position (Longitude and Lattitude) is given. Is it possible that my arrow within the compass can show me the direction to a specific location (longitude2 and lattitude2)? I have read that I have to consider the magnetic and the true heading of the iphone. 回答1: - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:

Compass and Accelerometer precision

南笙酒味 提交于 2019-12-03 10:11:11
i made my own application in Android that use compass and accelerometer sensors to display the degrees of rotation and inclination of my device. I initialized all the listener and objects i needed (i followed some tutorials), and now i can catch the degrees as i wished. The problem is that the measures that sensors return aren't accurate. I mean even if i try to round the values of degrees i catch from the sensor, they oscillate between -/+ 7 (or 8) degrees every fraction of a second, even if i stay in a grass field away from any disturbing source. What i want to have is a accurate measure of