2017년 10월 22일 일요일

Android SensorManager getInclination Inclination

Inclination

SensorManager API를 살펴보다보면 inclination이라는 말이 나옵니다. 뜻을 찾아보면 기울기라는 말만 나오는데 단순한 기울기가 아니라 자기장의 기울기가 됩니다. 이런 개념을 알고있으면 언젠가는 도움이 될꺼라는 확신을 가지고 정리해 보았습니다.

Android API 설명

getInclination

added in API level 3
float getInclination ()


Returns
floatThe inclination of the magnetic field in degrees -- positive means the magnetic field is rotated downwards. 


사용예제


float R[] = new float[9];
float I[] = new float[9];
boolean success = SensorManager.getRotationMatrix(R, I, mGravity, mGeomagnetic);
if (success) {
    float orientation[] = new float[3];
    SensorManager.getOrientation(R, orientation);
    mInclination = (float)Math.toDegrees(SensorManager.getInclination(I));
    mAzimut = (float)Math.toDegrees(orientation[0]);
    mPitch = (float)Math.toDegrees(orientation[1]);
    mRoll = (float)Math.toDegrees(orientation[2]);


의미

아래 그림에서 I로 나타나는 부분입니다.
Declination and Inclination.



http://geokov.com/education/magnetic-declination-inclination.aspx

Magnetic Inclination or Magnetic Dip

Magnetic inclination or magnetic dip is the angle (I) between the horizontal plane and the magnetic field vector. Moving closer to magnetic poles results in one side of the compass needle pointing downwards. Between the magnetic poles there is an area called the magnetic equator where inclination or the magnetic dip angle is zero; the magnetic field vector does not have a vertical component (Z) in this area. To the north of the magnetic equator, the north end of the compass needle points downward, both I and Z are positive. To the south of the magnetic equator, the south end of the needle points downward, that is I and Z are both negative.

Magnetic Inclination Map

Below is the contour map of the magnetic inclination based on the World Magnetic Model (WMM) 2010 accessed from NOAA http://www.ngdc.noaa.gov/geomag/WMM/image.shtml. Contour lines connecting points of equal magnetic inclination are called isoclinic lines or isoclinal lines. The contour line (green in map) connecting points where inclination is 0° is the magnetic equator or the aclinic line. To the north of the equator, red contour lines denote areas with positive inclination (magnetic dip angle is down) and to the south blue contour lines represent areas with negative inclination values (magnetic dip angle is up). Also inclination values for any location on Earth can be obtained using the magnetic field calculators mentioned in the earth's magnetic field section.

world magnetic inclination map
world magnetic inclination map


결론

Inclination의 값은 구해서 테스트해보면 항상 -40도 정도로 일정한 값이 나옵니다. 만약 다른다라에 있다면 다른값이 나올꺼라는 생각이 듭니다.
막상 의미를 알고 나니 위도 및 장소에 따라 일정한 값을 지니는 값으로 크게 응용할 곳이 생각나지는 않네요.
(그리고 테스트시 주변에 자기장이 없는곳에서 테스트해야 적당한 값이 나옵니다. 그리고 8자 보정을 해서 사용해야합니다. 오차가 많이 있습니다.)

댓글 없음:

댓글 쓰기