[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0
From: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0 |
Date: |
Fri, 22 Jul 2016 17:01:12 -0700 |
Yo Fred!
On Fri, 22 Jul 2016 16:34:14 -0700 (PDT)
Fred Wright <address@hidden> wrote:
> > IETF Standard 754-2008 "quad precision" : 128 bits
>
> Sure, but nothing states that "long double" == IEEE "quad precision".
Except my next Wikipedia quote.
> > "long double is defined as IEEE 754 extended precision (e.g.,
> > Intel 80-bit double extended precision on x86 or x86-64 platforms),
> > or some form of quad precision where available; otherwise, it is
> > double precision."
From the c11:
Recommended practice
The long double type should match an IEC 60559 extended format
So, only recommended, not mandatory. Change everything I said from
'standard' to 'recommended by standard'.
But we are getting off in the weeds, the issue is Python, not C.
C at least 'recommends' the IETF 754-2008 standard.
Python is not standardized. And I can't figure out how to force
it to some minimum precision past double.
> > Yeah, but then gpsprof calculates spherical distances. Lot's of
> > squaring and square rooting. So, double is probably good enough,
> > but somewhere I'm losing enough precision to mess up my plots.
>
> Spherical distances are tricky, and ISTR that GPSD switched distance
> algorithms at one point. You almost certainly don't want the simple
> spherical law-of-cosines formula, since that has awful numerical
> sensitivities for short distances.
Yeah, tricky indeed. Check out gps/misc.py
Check out these two function:
def MeterOffset(c1, c2):
"Return offset in meters of second arg from first."
def EarthDistance(c1, c2):
"Distance in meters between two points specified in degrees."
I agree, they are not optimized at all for very small angles.
If this were C I would take a shot at it. But this is Python.
Can some Python person just improve that code? I can provide the JSON
input to gpsprof if anyone wants to try, instead of just kvetch.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
address@hidden Tel:+1 541 382 8588
pgp0B7Wz8RAnd.pgp
Description: OpenPGP digital signature
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, (continued)
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Gary E. Miller, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Fred Wright, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Hal Murray, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Gary E. Miller, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Hal Murray, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Fred Wright, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Gary E. Miller, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Fred Wright, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Gary E. Miller, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Fred Wright, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0,
Gary E. Miller <=
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Hal Murray, 2016/07/22
- Re: [gpsd-dev] several messages, Fred Wright, 2016/07/22
- Re: [gpsd-dev] several messages, Greg Troxel, 2016/07/23
- Re: [gpsd-dev] CEP(50) 0.285 meters, Fred Wright, 2016/07/23
- Re: [gpsd-dev] CEP(50) 0.285 meters, Fred Wright, 2016/07/23
- Re: [gpsd-dev] ✘CEP(50) 0.285 meters, Gary E. Miller, 2016/07/23
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Greg Troxel, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Gary E. Miller, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Hal Murray, 2016/07/22
- Re: [gpsd-dev] ✘CEP(50) 0.285 metersMime-Version: 1.0, Gary E. Miller, 2016/07/22