By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,732 Members | 1,429 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,732 IT Pros & Developers. It's quick & easy.

Calculating Miles per Degree Longitude - Check my Math Please

P: n/a
I need to calculate miles per degree longitude, which obviously depends on
latitude since lines of longitude converge at the poles. Via Google, I've
come up with the following calculation:

private const double MilesPerDegLat = 69.04;
private const double EarthRadiusMiles = 3963.1676;
private static double PiDiv180 = Math.PI / 180;

double MilesPerDegLon = MilesPerDegLat * Math.Cos(Latitude * PiDiv180)

I'm not fluent at all in the trigonometric branches of mathematics and I'd
appreciate it if you could check my math for me.

I basically got this from:

http://answers.google.com/answers/threadview?id=577262

I'm using the formula which Steven expressed as: 69.1703234283616 *
COS(Lat*0.0174532925199433) with just one difference. I am using the value
69.06 for miles per degree latitude. Steven is using 69.17. I understand
that the Earth is not a perfect sphere and I'm under the impression that the
value 69.06 is the correct average to use. On the other hand, my
calculations will be exclusively confined to North America. Should I be
using a value of 69.17?

I'm also curious about how this formula works without taking into account
the Earth's radius. Again, I'm not fluent by any means in trigonometry, but
I'd been assuming that the Earth's radius would play a role in the
calculation. Also, I'm curious as to why the formula proposed directly prior
to the final solution doesn't work:

(pi/180) * R * cosA where R is the radius of the earth in miles and A is the
degree latitude.

For some reason this didn't work for me, but perhaps I encoded it
incorrectly. If this should work and is deemed to be more precise than the
claculation I've implemented I'll happily substitute it.

Thanks for your help!

- Joseph Geretz -
Mar 13 '07 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Assuming you are describing only movement eastward or westward, that looks
right. The cosine of the latitude is the crucial factor.

Mar 14 '07 #2

P: n/a
I need to calculate miles per degree longitude, which obviously
depends on latitude since lines of longitude converge at the poles.
Via Google, I've come up with the following calculation:

private const double MilesPerDegLat = 69.04; private const double
EarthRadiusMiles = 3963.1676; private static double PiDiv180 = Math.PI
/ 180;

double MilesPerDegLon = MilesPerDegLat * Math.Cos(Latitude * PiDiv180)

I'm not fluent at all in the trigonometric branches of mathematics and
I'd appreciate it if you could check my math for me.

I basically got this from:

http://answers.google.com/answers/threadview?id=577262

I'm using the formula which Steven expressed as: 69.1703234283616 *
COS(Lat*0.0174532925199433) with just one difference. I am using the
value 69.06 for miles per degree latitude. Steven is using 69.17. I
understand that the Earth is not a perfect sphere and I'm under the
impression that the value 69.06 is the correct average to use. On the
other hand, my calculations will be exclusively confined to North
America. Should I be using a value of 69.17?

I'm also curious about how this formula works without taking into
account the Earth's radius. Again, I'm not fluent by any means in
trigonometry, but I'd been assuming that the Earth's radius would play
a role in the calculation. Also, I'm curious as to why the formula
proposed directly prior to the final solution doesn't work:

(pi/180) * R * cosA where R is the radius of the earth in miles and A
is the degree latitude.

For some reason this didn't work for me, but perhaps I encoded it
incorrectly. If this should work and is deemed to be more precise than
the claculation I've implemented I'll happily substitute it.

Thanks for your help!

- Joseph Geretz -

If you start from your EarthRadiusMiles and multiply by 2*PI, you get the
circumference.
Divide by 360 (degrees) and you get 69,1703.. miles per degree.
(so the earth radius is a hidden part of that MilesPerDegLat number)

Hans Kesting
Mar 14 '07 #3

P: n/a
(so the earth radius is a hidden part of that MilesPerDegLat number)

Ah, I see. (Kind of - I don't pretend to completely understand the
mathematics, but I can see how the radius can be derived from miles per
degree latitdute.)

Thank you!

Joseph Geretz

"Hans Kesting" <ne***********@spamgourmet.comwrote in message
news:c0*************************@news.microsoft.co m...
>I need to calculate miles per degree longitude, which obviously
depends on latitude since lines of longitude converge at the poles.
Via Google, I've come up with the following calculation:

private const double MilesPerDegLat = 69.04; private const double
EarthRadiusMiles = 3963.1676; private static double PiDiv180 = Math.PI
/ 180;

double MilesPerDegLon = MilesPerDegLat * Math.Cos(Latitude * PiDiv180)

I'm not fluent at all in the trigonometric branches of mathematics and
I'd appreciate it if you could check my math for me.

I basically got this from:

http://answers.google.com/answers/threadview?id=577262

I'm using the formula which Steven expressed as: 69.1703234283616 *
COS(Lat*0.0174532925199433) with just one difference. I am using the
value 69.06 for miles per degree latitude. Steven is using 69.17. I
understand that the Earth is not a perfect sphere and I'm under the
impression that the value 69.06 is the correct average to use. On the
other hand, my calculations will be exclusively confined to North
America. Should I be using a value of 69.17?

I'm also curious about how this formula works without taking into
account the Earth's radius. Again, I'm not fluent by any means in
trigonometry, but I'd been assuming that the Earth's radius would play
a role in the calculation. Also, I'm curious as to why the formula
proposed directly prior to the final solution doesn't work:

(pi/180) * R * cosA where R is the radius of the earth in miles and A
is the degree latitude.

For some reason this didn't work for me, but perhaps I encoded it
incorrectly. If this should work and is deemed to be more precise than
the claculation I've implemented I'll happily substitute it.

Thanks for your help!

- Joseph Geretz -


If you start from your EarthRadiusMiles and multiply by 2*PI, you get the
circumference.
Divide by 360 (degrees) and you get 69,1703.. miles per degree.
(so the earth radius is a hidden part of that MilesPerDegLat number)

Hans Kesting


Mar 14 '07 #4

P: n/a
Hi Michael,
Assuming you are describing only movement eastward or westward, that looks
right. The cosine of the latitude is the crucial factor.
Yes, the movement is due east / west.

Thanks!

- Joseph Geretz -

"Michael A. Covington" <lo**@ai.uga.edu.for.addresswrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Assuming you are describing only movement eastward or westward, that looks
right. The cosine of the latitude is the crucial factor.

Mar 14 '07 #5

P: n/a
The earth is not spherical, so if you want a more exact value, you
should use the formula for an ellipse rather than a circle.

As it's not spherical, the radius varies with the latitude. What you
have seems to be the radius at the equator. The difference is only
0.19%, so again it depends on how exact you want the value to be.

Also, you should add the altitude over sea level to the radius if you
want a more exact value, but at five miles over sea level (Mount
Everest) the difference is only 0.12%
Joseph Geretz wrote:
I need to calculate miles per degree longitude, which obviously depends on
latitude since lines of longitude converge at the poles. Via Google, I've
come up with the following calculation:

private const double MilesPerDegLat = 69.04;
private const double EarthRadiusMiles = 3963.1676;
private static double PiDiv180 = Math.PI / 180;

double MilesPerDegLon = MilesPerDegLat * Math.Cos(Latitude * PiDiv180)

I'm not fluent at all in the trigonometric branches of mathematics and I'd
appreciate it if you could check my math for me.

I basically got this from:

http://answers.google.com/answers/threadview?id=577262

I'm using the formula which Steven expressed as: 69.1703234283616 *
COS(Lat*0.0174532925199433) with just one difference. I am using the value
69.06 for miles per degree latitude. Steven is using 69.17. I understand
that the Earth is not a perfect sphere and I'm under the impression that the
value 69.06 is the correct average to use. On the other hand, my
calculations will be exclusively confined to North America. Should I be
using a value of 69.17?

I'm also curious about how this formula works without taking into account
the Earth's radius. Again, I'm not fluent by any means in trigonometry, but
I'd been assuming that the Earth's radius would play a role in the
calculation. Also, I'm curious as to why the formula proposed directly prior
to the final solution doesn't work:

(pi/180) * R * cosA where R is the radius of the earth in miles and A is the
degree latitude.

For some reason this didn't work for me, but perhaps I encoded it
incorrectly. If this should work and is deemed to be more precise than the
claculation I've implemented I'll happily substitute it.

Thanks for your help!

- Joseph Geretz -


--
Göran Andersson
_____
http://www.guffa.com
Mar 14 '07 #6

P: n/a
Thanks, Goran,

You are correct of course, the Earth is not a perfect sphere, however the
assumption of a sphere yields close enough results for my purposes.
>private const double MilesPerDegLat = 69.04;
What you have seems to be the radius at the equator.
Not according to the information I've seen at
http://www.hypernews.org/HyperNews/g...SAR/291/1.html
------------------------------------
Conceptually and practically, latitude is the same no matter where you go on
earth; however, in reality it varies from 69.41 statute miles per minute at
the poles to 68.70 statute miles per minute at the equator due to the earth
bulging slightly from its rotational spin.
------------------------------------

So, what I've done is assume an equally distributed gradient (again, an
assumption which might not be strictly correct, but close enough for my
purposes) and taken the average of 69.41 and 68.70 to arrive at an average
distance of approximately 69.04. Mathematically speaking, this comes out to
69.055, but I did see the figure 69.04 referenced somewhere, which is why
I've used it. Again, in the context of the accuracy which I need, I don't
think this deviation is significantly altering my results.

Thanks!

Joseph Geretz

"Göran Andersson" <gu***@guffa.comwrote in message
news:eN**************@TK2MSFTNGP05.phx.gbl...
The earth is not spherical, so if you want a more exact value, you should
use the formula for an ellipse rather than a circle.

As it's not spherical, the radius varies with the latitude. What you have
seems to be the radius at the equator. The difference is only 0.19%, so
again it depends on how exact you want the value to be.

Also, you should add the altitude over sea level to the radius if you want
a more exact value, but at five miles over sea level (Mount Everest) the
difference is only 0.12%
Joseph Geretz wrote:
>I need to calculate miles per degree longitude, which obviously depends
on latitude since lines of longitude converge at the poles. Via Google,
I've come up with the following calculation:

private const double MilesPerDegLat = 69.04;
private const double EarthRadiusMiles = 3963.1676;
private static double PiDiv180 = Math.PI / 180;

double MilesPerDegLon = MilesPerDegLat * Math.Cos(Latitude * PiDiv180)

I'm not fluent at all in the trigonometric branches of mathematics and
I'd appreciate it if you could check my math for me.

I basically got this from:

http://answers.google.com/answers/threadview?id=577262

I'm using the formula which Steven expressed as: 69.1703234283616 *
COS(Lat*0.0174532925199433) with just one difference. I am using the
value 69.06 for miles per degree latitude. Steven is using 69.17. I
understand that the Earth is not a perfect sphere and I'm under the
impression that the value 69.06 is the correct average to use. On the
other hand, my calculations will be exclusively confined to North
America. Should I be using a value of 69.17?

I'm also curious about how this formula works without taking into account
the Earth's radius. Again, I'm not fluent by any means in trigonometry,
but I'd been assuming that the Earth's radius would play a role in the
calculation. Also, I'm curious as to why the formula proposed directly
prior to the final solution doesn't work:

(pi/180) * R * cosA where R is the radius of the earth in miles and A is
the degree latitude.

For some reason this didn't work for me, but perhaps I encoded it
incorrectly. If this should work and is deemed to be more precise than
the claculation I've implemented I'll happily substitute it.

Thanks for your help!

- Joseph Geretz -


--
Göran Andersson
_____
http://www.guffa.com

Mar 14 '07 #7

P: n/a
purposes) and taken the average of 69.41 and 68.70 to arrive at an average
distance of approximately 69.04. Mathematically speaking, this comes out
to 69.055, but I did see the figure 69.04 referenced somewhere,
Actually, it's right there in that same page:

http://www.hypernews.org/HyperNews/g...SAR/291/1.html

-----------------------------------------
A degree of latitude is 60 nautical miles, or 69.04 statute miles. A minute
of latitude is equal to one nautical mile, or 6076 feet; thus, a second of
latitude (6076 divided by 60) is 101 feet, 3 inches. Conceptually and
practically, latitude is the same no matter where you go on earth; however,
in reality it varies from 69.41 statute miles per minute at the poles to
68.70 statute miles per minute at the equator due to the earth bulging
slightly from its rotational spin.
-----------------------------------------

- Joe Geretz -

"Joseph Geretz" <jg*****@nospam.comwrote in message
news:eE**************@TK2MSFTNGP02.phx.gbl...
Thanks, Goran,

You are correct of course, the Earth is not a perfect sphere, however the
assumption of a sphere yields close enough results for my purposes.
>>private const double MilesPerDegLat = 69.04;
>What you have seems to be the radius at the equator.

Not according to the information I've seen at
http://www.hypernews.org/HyperNews/g...SAR/291/1.html
------------------------------------
Conceptually and practically, latitude is the same no matter where you go
on earth; however, in reality it varies from 69.41 statute miles per
minute at the poles to 68.70 statute miles per minute at the equator due
to the earth bulging slightly from its rotational spin.
------------------------------------

So, what I've done is assume an equally distributed gradient (again, an
assumption which might not be strictly correct, but close enough for my
purposes) and taken the average of 69.41 and 68.70 to arrive at an average
distance of approximately 69.04. Mathematically speaking, this comes out
to 69.055, but I did see the figure 69.04 referenced somewhere, which is
why I've used it. Again, in the context of the accuracy which I need, I
don't think this deviation is significantly altering my results.

Thanks!

Joseph Geretz

"Göran Andersson" <gu***@guffa.comwrote in message
news:eN**************@TK2MSFTNGP05.phx.gbl...
>The earth is not spherical, so if you want a more exact value, you should
use the formula for an ellipse rather than a circle.

As it's not spherical, the radius varies with the latitude. What you have
seems to be the radius at the equator. The difference is only 0.19%, so
again it depends on how exact you want the value to be.

Also, you should add the altitude over sea level to the radius if you
want a more exact value, but at five miles over sea level (Mount Everest)
the difference is only 0.12%
Joseph Geretz wrote:
>>I need to calculate miles per degree longitude, which obviously depends
on latitude since lines of longitude converge at the poles. Via Google,
I've come up with the following calculation:

private const double MilesPerDegLat = 69.04;
private const double EarthRadiusMiles = 3963.1676;
private static double PiDiv180 = Math.PI / 180;

double MilesPerDegLon = MilesPerDegLat * Math.Cos(Latitude * PiDiv180)

I'm not fluent at all in the trigonometric branches of mathematics and
I'd appreciate it if you could check my math for me.

I basically got this from:

http://answers.google.com/answers/threadview?id=577262

I'm using the formula which Steven expressed as: 69.1703234283616 *
COS(Lat*0.0174532925199433) with just one difference. I am using the
value 69.06 for miles per degree latitude. Steven is using 69.17. I
understand that the Earth is not a perfect sphere and I'm under the
impression that the value 69.06 is the correct average to use. On the
other hand, my calculations will be exclusively confined to North
America. Should I be using a value of 69.17?

I'm also curious about how this formula works without taking into
account the Earth's radius. Again, I'm not fluent by any means in
trigonometry, but I'd been assuming that the Earth's radius would play a
role in the calculation. Also, I'm curious as to why the formula
proposed directly prior to the final solution doesn't work:

(pi/180) * R * cosA where R is the radius of the earth in miles and A is
the degree latitude.

For some reason this didn't work for me, but perhaps I encoded it
incorrectly. If this should work and is deemed to be more precise than
the claculation I've implemented I'll happily substitute it.

Thanks for your help!

- Joseph Geretz -


--
Göran Andersson
_____
http://www.guffa.com


Mar 14 '07 #8

P: n/a
"Joseph Geretz" <jg*****@nospam.comwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
>
Also, I'm curious as to why the
formula proposed directly prior to the final solution doesn't work:

(pi/180) * R * cosA where R is the radius of the earth in miles and
A is the degree latitude.

It does work. If we use R = 4000 miles and latitude zero, then the
formula gives about 70 miles. At latitude 60, it gives about 35 miles,
as it should. Did you remember to convert latitude to radians before
passing it to cos()?

I like this second formula better than the first one you gave, because
earth radius is a more fundamental and easily verified value than
miles per degree.

There's no advantage in accuracy, though. Both formulas assume a
sphere. This is close enough for many purposes, since the oblateness
of the Earth is only about 1 part in 250.

To tune the solution for a specific latitude, compare your result to a
calculated value which does allow for non-spherocity. I think the
NGA's online calculator will produce such a figure:
http://www.nga.mil/MSISiteContent/St...rs/degree.html

Multiply the equation by a fudge factor to make your program yield the
"right answer" at the latitude of interest.

--
Paul Hirose <jv********@earINVALIDthlink.net>
To reply by email remove INVALID

Mar 15 '07 #9

P: n/a
Hi Paul.
It does work. If we use R = 4000 miles and latitude zero, then the
formula gives about 70 miles. At latitude 60, it gives about 35 miles,
as it should. Did you remember to convert latitude to radians before
passing it to cos()?
OK, that explains it - no, I was not converting to radians.

Thanks for straightening that out for me.

- Joseph Geretz -
"Paul Hirose" <jv********@earINVALIDthlink.netwrote in message
news:We*****************@newsread3.news.pas.earthl ink.net...
"Joseph Geretz" <jg*****@nospam.comwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
>>
Also, I'm curious as to why the
formula proposed directly prior to the final solution doesn't work:

(pi/180) * R * cosA where R is the radius of the earth in miles and
A is the degree latitude.


It does work. If we use R = 4000 miles and latitude zero, then the
formula gives about 70 miles. At latitude 60, it gives about 35 miles,
as it should. Did you remember to convert latitude to radians before
passing it to cos()?

I like this second formula better than the first one you gave, because
earth radius is a more fundamental and easily verified value than
miles per degree.

There's no advantage in accuracy, though. Both formulas assume a
sphere. This is close enough for many purposes, since the oblateness
of the Earth is only about 1 part in 250.

To tune the solution for a specific latitude, compare your result to a
calculated value which does allow for non-spherocity. I think the
NGA's online calculator will produce such a figure:
http://www.nga.mil/MSISiteContent/St...rs/degree.html

Multiply the equation by a fudge factor to make your program yield the
"right answer" at the latitude of interest.

--
Paul Hirose <jv********@earINVALIDthlink.net>
To reply by email remove INVALID

Mar 15 '07 #10

P: n/a
On Wed, 14 Mar 2007 23:47:48 +0800, Joseph Geretz <jg*****@nospam.com>
wrote:
>(so the earth radius is a hidden part of that MilesPerDegLat number)

Ah, I see. (Kind of - I don't pretend to completely understand the
mathematics, but I can see how the radius can be derived from miles per
degree latitdute.)
I don't think he's saying it's derived from (though it could be). The
"magic number" in the formula was itself derived using the radius. In
other words, even though you don't see the radius used explicitly, it's in
there.
Mar 15 '07 #11

This discussion thread is closed

Replies have been disabled for this discussion.