I'm developing an indoor navigation application. I want to move the arrow sign in the field with the information I obtain from the device's sensor. If we think of the area as a room, as you move around the room with the phone, the arrow sign will move towards the same place in the area.
At this stage, I can get pitch, tilt, azimuth values and detect whether a step has been taken.
What can I do to make the arrow mark reach the red dot?
I assigned the azimuth value to the arrow image.
float angle = (float) azimuth * -1;
imgMarker.setRotation(angle);
I try to change the position of the picture as I take each step.
if (imgMarker.getRotation() > 0) {
imgMarker.setPadding(imgMarker.getPaddingLeft(), imgMarker.getPaddingTop(), imgMarker.getPaddingRight() + 10,stepCount * 10);
} else {
imgMarker.setPadding(imgMarker.getPaddingLeft() + 10, imgMarker.getPaddingTop(), imgMarker.getPaddingRight(),stepCount * 10);
}
