hmm..
Have you checked the numerical values that you get (mHeading,
mBearing, angleDegrees) ?
Log them and check if they look reasonable (assuming that you know
where north is :). Expect some deviation caused by your surroundings.
Not only the Earth is magnetic...
If that looks ok, I'd suggest
Sounds like writing some unit test cases would help. Of course, you may need
to refactor the code to make it testable.
The advantage would be that you will see more clearly the input parameters
and the constraints. It would divide and conquer the problem. The test
cases would be the theory of
this works for me:
1: listen to location changes. Store the most recent location. You
need it below.
2: listen to orientation changes. Store the most recent heading
(azimuth) in mHeading - that's the compass direction corresponding to
your viewing direction when holding your phone horizontally in
I'll try this method you described.
I have 1. 2. and the destinations coordinates of 3.So I guess I can
use it
PS: I just want this for landscape mode, I've set it on the Manifest
already.
On Sep 22, 2010, at 1:12 PM, Per wrote:
this works for me:
1: listen to location changes. Store
Per can you explain your example a little bit further?
My code seems fine but the direction of the arrow doesnt seem accurate:
public void onSensorChanged(SensorEvent event) {
double mLatitude = (mLocation.getLatitude()); // lat1 location
manager
double mLongitude =
5 matches
Mail list logo