Re: medians for degree measurements

2010-01-25 Thread Steve Howell
On Jan 24, 5:26 pm, Robert Kern wrote: > On 2010-01-23 05:52 , Steven D'Aprano wrote: > > On Fri, 22 Jan 2010 22:09:54 -0800, Steve Howell wrote: > > >> On Jan 22, 5:12 pm, MRAB  wrote: > >>> Steve Howell wrote: > I just saw the thread for medians, and it reminded me of a problem > that

Re: medians for degree measurements

2010-01-25 Thread Bas
> >> On 2010-01-25 10:16 AM, Bas wrote: > >>> P.S. > >>> Slightly off-topic rant against both numpy and matlab implementation > >>> of unwrap: They always assume data is in radians. There is some option > >>> to specify the maximum jump size in radians, but to me it would be > >>> more useful to sp

Re: medians for degree measurements

2010-01-25 Thread Robert Kern
On 2010-01-25 11:06 AM, Bas wrote: On 2010-01-25 10:16 AM, Bas wrote: P.S. Slightly off-topic rant against both numpy and matlab implementation of unwrap: They always assume data is in radians. There is some option to specify the maximum jump size in radians, but to me it would be more useful t

Re: medians for degree measurements

2010-01-25 Thread Bas
> On 2010-01-25 10:16 AM, Bas wrote: > > > P.S. > > Slightly off-topic rant against both numpy and matlab implementation > > of unwrap: They always assume data is in radians. There is some option > > to specify the maximum jump size in radians, but to me it would be > > more useful to specify the i

Re: medians for degree measurements

2010-01-25 Thread Robert Kern
On 2010-01-25 10:16 AM, Bas wrote: P.S. Slightly off-topic rant against both numpy and matlab implementation of unwrap: They always assume data is in radians. There is some option to specify the maximum jump size in radians, but to me it would be more useful to specify the interval of a complete

Re: medians for degree measurements

2010-01-25 Thread Bas
On Jan 23, 1:09 am, Steve Howell wrote: [snip problem with angle data wrapping around at 360 degrees] Hi, This problem is trivial to solve if you can assume that you that your data points are measured consecutively and that your boat does not turn by more than 180 degrees between two samples, wh

Re: medians for degree measurements

2010-01-24 Thread Robert Kern
On 2010-01-23 05:52 , Steven D'Aprano wrote: On Fri, 22 Jan 2010 22:09:54 -0800, Steve Howell wrote: On Jan 22, 5:12 pm, MRAB wrote: Steve Howell wrote: I just saw the thread for medians, and it reminded me of a problem that I need to solve. We are writing some Python software for sailing,

Re: medians for degree measurements

2010-01-23 Thread Arnaud Delobelle
Steve Howell writes: > I just saw the thread for medians, and it reminded me of a problem > that I need to solve. We are writing some Python software for > sailing, and we need to detect when we've departed from the median > heading on the leg. Calculating arithmetic medians is > straightforwar

Re: medians for degree measurements

2010-01-23 Thread Steven D'Aprano
On Fri, 22 Jan 2010 22:09:54 -0800, Steve Howell wrote: > On Jan 22, 5:12 pm, MRAB wrote: >> Steve Howell wrote: >> > I just saw the thread for medians, and it reminded me of a problem >> > that I need to solve.  We are writing some Python software for >> > sailing, and we need to detect when we'

Re: medians for degree measurements

2010-01-23 Thread Terry Reedy
On 1/23/2010 1:09 AM, Steve Howell wrote: On Jan 22, 5:12 pm, MRAB wrote: I like this implementation, and it would probably work 99.% of the time for my particular use case. The only (very contrived) edge case that I can think of is when you have 10 bearings to SSW, 10 bearings to SSE, a

Re: medians for degree measurements

2010-01-22 Thread Steve Howell
On Jan 22, 10:29 pm, Nobody wrote: > On Fri, 22 Jan 2010 16:09:03 -0800, Steve Howell wrote: > > I just saw the thread for medians, and it reminded me of a problem > > that I need to solve.  We are writing some Python software for > > sailing, and we need to detect when we've departed from the med

Re: medians for degree measurements

2010-01-22 Thread Nobody
On Fri, 22 Jan 2010 16:09:03 -0800, Steve Howell wrote: > I just saw the thread for medians, and it reminded me of a problem > that I need to solve. We are writing some Python software for > sailing, and we need to detect when we've departed from the median > heading on the leg. Calculating arit

Re: medians for degree measurements

2010-01-22 Thread Steve Howell
On Jan 22, 5:12 pm, MRAB wrote: > Steve Howell wrote: > > I just saw the thread for medians, and it reminded me of a problem > > that I need to solve.  We are writing some Python software for > > sailing, and we need to detect when we've departed from the median > > heading on the leg.  Calculatin

Re: medians for degree measurements

2010-01-22 Thread MRAB
Steve Howell wrote: I just saw the thread for medians, and it reminded me of a problem that I need to solve. We are writing some Python software for sailing, and we need to detect when we've departed from the median heading on the leg. Calculating arithmetic medians is straightforward, but comp

Re: medians for degree measurements

2010-01-22 Thread Robert Kern
On 2010-01-22 18:09 PM, Steve Howell wrote: I just saw the thread for medians, and it reminded me of a problem that I need to solve. We are writing some Python software for sailing, and we need to detect when we've departed from the median heading on the leg. Calculating arithmetic medians is s

medians for degree measurements

2010-01-22 Thread Steve Howell
I just saw the thread for medians, and it reminded me of a problem that I need to solve. We are writing some Python software for sailing, and we need to detect when we've departed from the median heading on the leg. Calculating arithmetic medians is straightforward, but compass bearings add a twi