<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iPhone SDK develop &#38; programming tips &#187; 距离</title>
	<atom:link href="http://www.flyblog.info/tag/%e8%b7%9d%e7%a6%bb/feed" rel="self" type="application/rss+xml" />
	<link>http://www.flyblog.info</link>
	<description>ideas for programming</description>
	<lastBuildDate>Fri, 20 May 2011 09:49:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>根据经纬度计算两点之间的距离代码</title>
		<link>http://www.flyblog.info/catprogramming/400.html</link>
		<comments>http://www.flyblog.info/catprogramming/400.html#comments</comments>
		<pubDate>Thu, 10 Sep 2009 07:40:18 +0000</pubDate>
		<dc:creator>Flyblog</dc:creator>
				<category><![CDATA[编程开发]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[经纬度]]></category>
		<category><![CDATA[距离]]></category>

		<guid isPermaLink="false">http://www.flyblog.info/?p=400</guid>
		<description><![CDATA[今天看到cocoachina有人问起这个问题， 正好把好久以前的一段代码发了上来， 这段代码已经经过验证，精度还是可以保障的， 对于不同的应用需要更换调整地球半径值 ，先看代码

?View Code OBJC1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#define PI 3.1415926
&#160;
double LantitudeLongitudeDist&#40;double lon1,double lat1,
							  double lon2,double lat2&#41;
&#123;
	double er = 6378137; // 6378700.0f;
	//ave. radius = 6371.315 (someone said more accurate is 6366.707)
	//equatorial radius = 6378.388
	//nautical mile = 1.15078
	double radlat1 = PI*lat1/180.0f;
	double radlat2 = PI*lat2/180.0f;
&#160;
	//now long.
	double radlong1 = PI*lon1/180.0f;
	double radlong2 = PI*lon2/180.0f;
&#160;
	if&#40; radlat1 &#38;lt; 0 &#41; radlat1 = [...]]]></description>
		<wfw:commentRss>http://www.flyblog.info/catprogramming/400.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

