<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: C#, GPS Receivers, and Geocaching: Vincenty&#8217;s Formula</title>
	<atom:link href="http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/</link>
	<description>Mike Gavaghan blogs on Java, C#, .Net, and the software industry</description>
	<lastBuildDate>Fri, 03 Sep 2010 16:52:29 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: steve</title>
		<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/comment-page-1/#comment-833</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Mon, 23 Aug 2010 09:07:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/#comment-833</guid>
		<description>Hi Mike,

Just wanted to say thanks for ur c# implementation of Vincenty’s formula, 

cheers,
 steve</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>Just wanted to say thanks for ur c# implementation of Vincenty’s formula, </p>
<p>cheers,<br />
 steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aharon Levine</title>
		<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/comment-page-1/#comment-832</link>
		<dc:creator>Aharon Levine</dc:creator>
		<pubDate>Tue, 10 Aug 2010 09:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/#comment-832</guid>
		<description>Hi Mike

Thanks so much for sharing this brilliant code, it has proved invaluable to me in several projects.
I would like to propose a small change which made the code more robust for real applications:
The function GeodeticCalculator.calculateEndingGlobalCoordinates(...) goes into an infinite loop if its distance parameter is given as 0.
I added these lines to the beginning of the function:

if (distance == 0)
{
	 return new GlobalCoordinates(start.getLatitude(), start.getLongitude());
}

Thanks again
Aharon</description>
		<content:encoded><![CDATA[<p>Hi Mike</p>
<p>Thanks so much for sharing this brilliant code, it has proved invaluable to me in several projects.<br />
I would like to propose a small change which made the code more robust for real applications:<br />
The function GeodeticCalculator.calculateEndingGlobalCoordinates(&#8230;) goes into an infinite loop if its distance parameter is given as 0.<br />
I added these lines to the beginning of the function:</p>
<p>if (distance == 0)<br />
{<br />
	 return new GlobalCoordinates(start.getLatitude(), start.getLongitude());<br />
}</p>
<p>Thanks again<br />
Aharon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus</title>
		<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/comment-page-1/#comment-247</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Thu, 21 Jan 2010 04:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/#comment-247</guid>
		<description>Hello Mike,

Thanks for sharing your information. I found it very intriguing, but too much for my simple question. I was wondering if you could shed some light on my problem.

I need to generate a bounding box of min and max latitude and longitude values so I can return addresses within a given radius.

I have two func&#039;s below to return the range I need to +/- to the lon lat coordinates to establish the bounding box. However I don&#039;t think the math is 100%

I am using the Haversine formula to generate my distance calculations and that seems to be working accurately. I investigated the Vincenty formula for distance as well but for my needs that was overkill.

My problem is that I would like my search results to be as accurate as Haversine in that the range I +/- to the lon lat coordinates takes into account the ellipsoidal curvature or the earth.

Ok, here are my func&#039;s...please note I am not a Math professor :o)

static Func GetLatitudeRange = (latitude, distance) =&gt; (180.0 / Math.PI) * (distance / EARTH_RADIUS_IN_KM);


static Func GetLongitudeRange = (longitude, latitude, distance) =&gt;
            (
                Math.Asin(
                    Math.Sin(distance / EARTH_RADIUS_IN_KM) / Math.Cos(latitude)
                    )
            );

Many Thanks,
Markus</description>
		<content:encoded><![CDATA[<p>Hello Mike,</p>
<p>Thanks for sharing your information. I found it very intriguing, but too much for my simple question. I was wondering if you could shed some light on my problem.</p>
<p>I need to generate a bounding box of min and max latitude and longitude values so I can return addresses within a given radius.</p>
<p>I have two func&#8217;s below to return the range I need to +/- to the lon lat coordinates to establish the bounding box. However I don&#8217;t think the math is 100%</p>
<p>I am using the Haversine formula to generate my distance calculations and that seems to be working accurately. I investigated the Vincenty formula for distance as well but for my needs that was overkill.</p>
<p>My problem is that I would like my search results to be as accurate as Haversine in that the range I +/- to the lon lat coordinates takes into account the ellipsoidal curvature or the earth.</p>
<p>Ok, here are my func&#8217;s&#8230;please note I am not a Math professor <img src='http://www.gavaghan.org/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> )</p>
<p>static Func GetLatitudeRange = (latitude, distance) =&gt; (180.0 / Math.PI) * (distance / EARTH_RADIUS_IN_KM);</p>
<p>static Func GetLongitudeRange = (longitude, latitude, distance) =&gt;<br />
            (<br />
                Math.Asin(<br />
                    Math.Sin(distance / EARTH_RADIUS_IN_KM) / Math.Cos(latitude)<br />
                    )<br />
            );</p>
<p>Many Thanks,<br />
Markus</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/comment-page-1/#comment-246</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Thu, 14 Jan 2010 10:38:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/#comment-246</guid>
		<description>Hi Mike,
Thanks for sharing this. It is a great help and timesaver for my little freeware project: Generation of airspace boundaries to be uploaded to an Variometer/GPS unit for Paraglider and Hanglider pilots.
Many thanks &amp; Regards from Switzerland
Daniel</description>
		<content:encoded><![CDATA[<p>Hi Mike,<br />
Thanks for sharing this. It is a great help and timesaver for my little freeware project: Generation of airspace boundaries to be uploaded to an Variometer/GPS unit for Paraglider and Hanglider pilots.<br />
Many thanks &amp; Regards from Switzerland<br />
Daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ramesh</title>
		<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/comment-page-1/#comment-243</link>
		<dc:creator>ramesh</dc:creator>
		<pubDate>Wed, 11 Nov 2009 17:12:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/#comment-243</guid>
		<description>excellent stuff for beginners... Thanks a lot...</description>
		<content:encoded><![CDATA[<p>excellent stuff for beginners&#8230; Thanks a lot&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen</title>
		<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/comment-page-1/#comment-228</link>
		<dc:creator>Stephen</dc:creator>
		<pubDate>Sat, 06 Jun 2009 17:50:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/#comment-228</guid>
		<description>Hi Mike - this looks like a great implementation, with excellent documentation. I&#039;m looking to incorporate some inverse 3D geodetic calcs into a sunrise/sunset type app for photographers. Specifically, I need to be able to calculate the elevation angle (or altitude - I think there&#039;s a subtle difference depending on if you&#039;re an astronomer or a surveyor, but I don&#039;t know what it is...) between two points.

Taking your Pike&#039;s Peak example in the source code, if you were standing on the plane east of Pike&#039;s Peak and wanted to determine when the run might set behind it, I need the elevation angle between the two points.

My question is: is it possible to use your implementation to return the zenith distance from which elevation angle/altitude can be derived? I can see the ElevationChange, but am unsure how I&#039;d get to an accurate angle from this.

Some examples of the problem I mean here: http://photo.net/nature-photography-forum/00SigL (about half way down the page) and here http://www.ngs.noaa.gov/cgi-bin/Inv_Fwd/invers3d.prl.

Many thanks for making this code available.

Stephen</description>
		<content:encoded><![CDATA[<p>Hi Mike &#8211; this looks like a great implementation, with excellent documentation. I&#8217;m looking to incorporate some inverse 3D geodetic calcs into a sunrise/sunset type app for photographers. Specifically, I need to be able to calculate the elevation angle (or altitude &#8211; I think there&#8217;s a subtle difference depending on if you&#8217;re an astronomer or a surveyor, but I don&#8217;t know what it is&#8230;) between two points.</p>
<p>Taking your Pike&#8217;s Peak example in the source code, if you were standing on the plane east of Pike&#8217;s Peak and wanted to determine when the run might set behind it, I need the elevation angle between the two points.</p>
<p>My question is: is it possible to use your implementation to return the zenith distance from which elevation angle/altitude can be derived? I can see the ElevationChange, but am unsure how I&#8217;d get to an accurate angle from this.</p>
<p>Some examples of the problem I mean here: <a href="http://photo.net/nature-photography-forum/00SigL" rel="nofollow">http://photo.net/nature-photography-forum/00SigL</a> (about half way down the page) and here <a href="http://www.ngs.noaa.gov/cgi-bin/Inv_Fwd/invers3d.prl" rel="nofollow">http://www.ngs.noaa.gov/cgi-bin/Inv_Fwd/invers3d.prl</a>.</p>
<p>Many thanks for making this code available.</p>
<p>Stephen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob</title>
		<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/comment-page-1/#comment-227</link>
		<dc:creator>Jacob</dc:creator>
		<pubDate>Mon, 25 May 2009 17:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/#comment-227</guid>
		<description>@Kenny: 
To get the midpoint, simply use GeodeticCalculator to
1. calculate the distance and initial bearing between the two points, 
2. calculate the point at half the distance and at the same bearing from the starting point.</description>
		<content:encoded><![CDATA[<p>@Kenny:<br />
To get the midpoint, simply use GeodeticCalculator to<br />
1. calculate the distance and initial bearing between the two points,<br />
2. calculate the point at half the distance and at the same bearing from the starting point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenny</title>
		<link>http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/comment-page-1/#comment-226</link>
		<dc:creator>Kenny</dc:creator>
		<pubDate>Thu, 21 May 2009 12:05:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.gavaghan.org/blog/2007/08/06/c-gps-receivers-and-geocaching-vincentys-formula/#comment-226</guid>
		<description>Hi Mike: Your library saved me loads of time developing an applications I&#039;m writing to track objects.  Do you know if there is C# code available that would compute the midpoint between two GPS locations.  In my case the two points would always be less than 100 yards apart.</description>
		<content:encoded><![CDATA[<p>Hi Mike: Your library saved me loads of time developing an applications I&#8217;m writing to track objects.  Do you know if there is C# code available that would compute the midpoint between two GPS locations.  In my case the two points would always be less than 100 yards apart.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
