Re: Floating point questions
- From: bill@xxxxxxxxxxx (Bill Gunshannon)
- Date: 29 Jun 2006 14:12:11 GMT
In article <ZrydnXatrricSD7ZnZ2dnUVZ_q-dnZ2d@xxxxxxxxxx>,
Dave Froble <davef@xxxxxxxxxxxxx> writes:
Bill Gunshannon wrote:
In article <pbmdnWPxweiwrD7ZnZ2dnUVZ_rSdnZ2d@xxxxxxxxxx>,
Dave Froble <davef@xxxxxxxxxxxxx> writes:
JF Mezei wrote:
briggs@xxxxxxxxxxxxxxxxx wrote:In your particular case you're dealing in latitude and longitude,
Doesn't help if you have to convert from float binary to float decimalSource data is a GPS that provides litten endian IEEE 32 bit value.
to perform the comparison.
We haven't been told what format the source data is in.
Someone mentioned that 1.0e25 could not be precisely represented in such
a 32 bit entity ? Is that really the case ? Isn't it just a case of
representing 1.0 and then "25" in the field that defines where the
decimal is located ?
usually expressed in degrees, minutes, seconds, and fractions thereof.
It will not be hard to convert such to whatever measurement you wish to
use, meters, feet, yards, miles, etc.
Not hard????
What is the distance between:
70d0m0s E 70d0m0s N and 80d0m0s E 70d0m0s
and now:
70d0m0s E 10d0m0s N and 80d0m0s E 10d0m0s
Somehow I have to believe the math needed to compute distance
based on latitude and longitude is complex enough to not qualify
as "not hard". :-)
Of course, if there is a simple method I would love to see it. I
assumed the this difficulty is why the military always used UTM
rather than Lat/Lon.
bill
Assume a sphere. Ok, I'm aware that the Planet is not really so
uniform, but for most purposes the assumption is adequate.
There was a time when I'd have been able to do the math. That was about
40 years ago, and I'm not going to dig out the books for this question.
I've got a couple under $100 GPS units that will give me distance from
one point to another. It is doable.
I wasn't arguing that it wasn't doable. Just that because the
distance between lines of longitude are not uniform varying with
latitude the math is more complex. When someone tells me some
math problem is "not hard" I assume that means the average person
can do it nn their head. Somehow I doubt that the linear distance
between two arbitrary points on the globe meets that definition.
Now if altitude is also a consideration, then the math is a bit more
complex. However, once the formulas are set up, it's just a matter of
plugging in the numbers.
But that's true about any math formula no matter how complex. The
initial programming is the part that doesn't meet the "not hard"
criteria.
bill
--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
bill@xxxxxxxxxxxxxxx | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>
.
- Follow-Ups:
- Re: Floating point questions
- From: Doug Phillips
- Re: Floating point questions
- References:
- Floating point questions
- From: JF Mezei
- Re: Floating point questions
- From: Tom Linden
- Re: Floating point questions
- From: JF Mezei
- Re: Floating point questions
- From: briggs
- Re: Floating point questions
- From: Tom Linden
- Re: Floating point questions
- From: briggs
- Re: Floating point questions
- From: JF Mezei
- Re: Floating point questions
- From: Dave Froble
- Re: Floating point questions
- From: Bill Gunshannon
- Re: Floating point questions
- From: Dave Froble
- Floating point questions
- Prev by Date: Re: Floating point questions
- Next by Date: Re: SFTP Output redirection
- Previous by thread: Re: Floating point questions
- Next by thread: Re: Floating point questions
- Index(es):
Relevant Pages
|
Loading