Questions tagged [compass-geolocation]

Geolocation is the identification of the real-world geographic location of an object, such as a cell phone or an Internet-connected computer terminal. Geolocation may refer to the practice of assessing the location, or to the actual assessed location.

328 questions
108
votes
4 answers

Android phone orientation overview including compass

I've been trying to get my head around the Android orientation sensors for a while. I thought I understood it. Then I realised I didn't. Now I think (hope) I have a better feeling for it again but I am still not 100%. I will try and explain my…
Tim
  • 5,697
  • 9
  • 43
  • 60
63
votes
11 answers

Calculate compass bearing / heading to location in Android

I want to display an arrow at my location on a google map view that displays my direction relative to a destination location (instead of north). a) I have calculated north using the sensor values from the magnetometer and accelerometer. I know this…
Damian
  • 7,822
  • 4
  • 40
  • 42
30
votes
4 answers

Compensating compass lag with the gyroscope on iPhone 4

I've been experimenting with the compass and gyroscope on iPhone 4 and would like some help with an issue I'm having. I want to compensate for the slowness of the compass by using data from the gyroscope. Using CMMotionManager and its CMDeviceMotion…
donkim
  • 13,018
  • 3
  • 40
  • 47
21
votes
4 answers

Get direction (compass) with two longitude/latitude points

I'm working on a "compass" for a mobile-device. I have the following points: point 1 (current location): Latitude = 47.2246, Longitude = 8.8257 point 2 (target location): Latitude = 50.9246, Longitude = 10.2257 Also I have the following…
eav
  • 1,925
  • 7
  • 24
  • 34
17
votes
1 answer

How to make an accurate compass on android

my android application shows the direction of a particular place in the world and therefore in needs to get the compass degree. This is the code I've been using to calculate the degrees: public void getDirection() { mySensorManager =…
eladrich
  • 745
  • 1
  • 5
  • 15
17
votes
5 answers

Cardinal direction algorithm in Java

This weekend I spend a few minutes thrashing together an algorithm that would take in a heading (in degrees) and return a String for the cardinal direction (I'm using it in an android compass application I'm using). What I ended up with was…
MattyW
  • 1,481
  • 3
  • 16
  • 33
16
votes
1 answer

In Android can I programmatically detect that the compass is not yet calibrated?

I've found that when I start up my game the compass is often out of whack. Objects will fly around and not be where they're supposed to be. But, if I move the phone in a figure eight (or just wave it round in random directions) everything snaps into…
HappyEngineer
  • 3,819
  • 8
  • 42
  • 58
16
votes
8 answers

Disable compass on MKMapView

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…
BlackM
  • 3,869
  • 7
  • 34
  • 64
15
votes
5 answers

Android Compass orientation on unreliable (Low pass filter)

Im creating an application where i need to position a ImageView depending on the Orientation of the device. I use the values from a MagneticField and Accelerometer Sensors to calculate the device orientation with…
14
votes
4 answers

How to rotate a Direction Arrow to particular location

In my app I have a latitude-longitude of 1 fix location. Now user with iPhone device can move anywhere and even he rotate his device, the arrow (some uiimageview) should point to that fix location so User will get direction to that location every…
12
votes
6 answers

Compass give me crazy data, is calibration needed or it's the sensor broken?

I'm working with android sensor data. My application use SensorManager.getRotationMatrixFromVector( mRotationMatrix , event.values); and it has been working well until this morning, when the rotation matrix started to send a lot of…
vgonisanz
  • 11,352
  • 12
  • 74
  • 123
12
votes
1 answer

Use native iOS compass within an app

Is it possible to use the native compass that iOS has within my own application? Or do I need to draw and animate my own compass?
theDuncs
  • 4,211
  • 4
  • 35
  • 58
12
votes
8 answers

Compass True Heading in iPhone/iPad

I having some problem on the iPhone/iPad compass development. The trueHeading taken from the CLHeading alway give me the '-1' value, I'm stuck here. Here is my code: self.locationManager = [[[CLLocationManager alloc] init]…
Sola
  • 1,481
  • 3
  • 14
  • 31
12
votes
1 answer

Sensor Fusion on iOS Devices

I'm trying to find out how could I start to implement sensor fusion on the iPhone. I've started from this talk from David Sachs: Sensor Fusion on Android Devices Although David's talk is very illustrative, it doesn't show any code (it makes sense).…
Ruben Marin
  • 1,540
  • 13
  • 24
12
votes
1 answer

Using orientation sensor to point towards a specific location

I'm trying to implement an arrow that uses the orientation sensor in order to point towards a specific location. Google Places implements this arrow in a ListView for each place it finds. I've managed to get the azimuth, but given a location, I…
Flávio Faria
  • 6,370
  • 3
  • 37
  • 57
1
2 3
21 22