Android的ExifInterface TAG_GPS_LATITUDE DENOM值 [英] Android ExifInterface TAG_GPS_LATITUDE denom values

查看:761
本文介绍了Android的ExifInterface TAG_GPS_LATITUDE DENOM值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用地理标记用我自己的相机应用。什么我做的是让我的当前地理位置为十进制值(例:纬度= 6.8447375),并希望将其转换中的要想在 ExifInterface 使用公共静态最后弦乐TAG_GPS_LATITUDE 字段DMS格式。按照 Android文档我需要给分母(如文档denom1,denom2,denom3)什么是我要使用那些分母正确的价值观?有没有计算那些分母的标准方法。当我使用denom1 = 1,denom2 = 1和denom3 = 1000,我得到我的附近的实际位置不同的位置。我怎样才能提高准确率?

I am trying to use geo-tagging with my own camera application. What I am doing is getting my current geo-location as decimal value (Ex. Latitude = 6.8447375) and want to convert it in to DMS format in order to use public static final String TAG_GPS_LATITUDE field in the ExifInterface. According to the Android documentation I need to give denominators (as in documentation denom1, denom2, denom3 ) What are the correct values that I have to use for those denominators? Is there any standard method to calculate those denominators. When I use denom1=1, denom2=1 and denom3=1000 I get different location near my actual location. How can I increase the accuracy ?

推荐答案

您提供正确的价值观分子一起去那些分母?

Are you providing the correct numerator values to go with those denominators?

NUM1 / denom1 =度

num1/denom1 = degrees

NUM2 / denom2 =分钟

num2/denom2 = minutes

NUM3 / denom3 =秒。

num3/denom3 = seconds

我目睹了大多数摄像机连接code为分母的值1,1,1000。

I've witnessed most cameras encode the values 1,1,1000 for the denominators.

让我们用你的样品值,并将其转换成精确的合理值:

Let's use your sample value and convert it into accurate rational values:

6.8447375度

下面的步骤是:

1)取角的整个部分

NUM1 = 6 / denom1 = 1 - > 6度

num1 = 6 / denom1 = 1 --> 6 degrees

2)乘以60的小数部分,然后利用这一整体的一部分:
0.8447375 * 60 = 50.68425

2) Multiply the fractional part by 60 and then take the whole part of that: 0.8447375 * 60 = 50.68425

NUM2 = 50 / denom2 = 1 - > 50分

num2 = 50 / denom2 = 1 --> 50 minutes

3)每度×1000)

3) Subtract 6 deg 50' (6.833333333) from your original value = 0.0114041667, then multiply by 3600000 (3600 seconds per degree x 1000)

NUM3 = 41055 / denom3 = 1000 - >41.055秒

num3 = 41055 / denom3 = 1000 -> 41.055 seconds

您现在的位置是EN codeD为6度,50'41.055

Your position is now encoded as 6 deg, 50' 41.055"

这篇关于Android的ExifInterface TAG_GPS_LATITUDE DENOM值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆