Page 472 - 2
P. 472
try {
List<Address> addr = geocoder.getFromLocation(lat,lon,1);
Address address = addr.get(0);
Log.d(tag, city = address.getLocality());
mBluetooth_data.setW_City(city);
} catch (IOException e) {
e.printStackTrace();
}
Node node_tmEf = description.getElementsByTagName("hour").item(0);
if (node_tmEf != null) {
Log.d(tag, pub = node_tmEf.getTextContent());
mBluetooth_data.setW_Pub(pub);
}
Node node_tmp = description.getElementsByTagName("temp").item(0);
if (node_tmp != null) {
Log.d(tag, tmp = node_tmp.getTextContent());
mBluetooth_data.setW_Tmp(tmp);
}
Node node_wf = description.getElementsByTagName("wfKor").item(0);
if (node_wf != null) {
Log.d(tag, wf = node_wf.getTextContent());
mBluetooth_data.setW_wf(wf);
}
}
}catch (DOMException de) {
de.toString();
}
}
Log.d(tag,mBluetooth_data.getW_City() + mBluetooth_data.getW_Pub()+mBluetooth_data.getW_Tmp()+
mBluetooth_data.getW_wf());
}
double RE = 6371.00877; // 지구 반경(km)
double GRID = 5.0; // 격자 간격(km)
double SLAT1 = 30.0; // 투영 위도1(degree)
double SLAT2 = 60.0; // 투영 위도2(degree)
double OLON = 126.0; // 기준점 경도(degree)
double OLAT = 38.0; // 기준점 위도(degree)
double XO = 43; // 기준점 X 좌표(GRID)
double YO = 136; // 기 준점1 Y 좌표(GRID)
public Map<String, Object> getGridxy(double v1, double v2) {
double DEGRAD = Math.PI / 180.0;
// double RADDEG = 180.0 / Math.PI;
double re = RE / GRID;
double slat1 = SLAT1 * DEGRAD;
double slat2 = SLAT2 * DEGRAD;
double olon = OLON * DEGRAD;
- 472 -