iphone - CLLocation - Find magnetic declination / deviation at another location -
i know how find true heading/magnetic heading location phone at, possible find magnetic deviation/declination remote location?
what able drop pin @ place on map , find both true bearing , bearing magnetic variance point.
thanks!
have solved it? otherwise can calculate azimuth angle of remote location. firstly magnetic north heading , true north heading. subtract 2 magnetic deviation.
here how calculate azimuth angle remote location:
-(float)azimuthfromlocations:(cllocationcoordinate2d)first tocoordinate:(cllocationcoordinate2d)second{ float longitudedifference = second.longitude - first.longitude; float latitudedifference = second.latitude - first.latitude; float possibleazimuth = (m_pi * .5f) - atan(latitudedifference / longitudedifference); if (longitudedifference > 0) return possibleazimuth; else if (longitudedifference < 0) return possibleazimuth + m_pi; else if (latitudedifference < 0) return m_pi; return 0.0f; }
Comments
Post a Comment