Assigning sensor information to image coordinates

15 views Asked by At

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.

enter image description here

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);
                    }
0

There are 0 answers