[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Create an SVG skyview image from JSON data

From: Gary E. Miller
Subject: Re: [gpsd-users] Create an SVG skyview image from JSON data
Date: Tue, 16 Oct 2018 09:41:31 -0700

Yo Niccolo!

On Tue, 16 Oct 2018 09:41:26 +0200
Niccolo Rigacci <address@hidden> wrote:

> On Sat, Oct 13, 2018 at 11:56:52AM -0700, Gary E. Miller wrote:
> > 
> > And a nit.  I think a better usage example is:
> > 
> > $ gpspipe -w | skyview2svg > skyview.svg  
> In the way you suggested gpspipe does not terminate and so 
> skyview2svg does not terminate (despite it outputs the .svg 
> nicely). I have to hit Ctrl-C to terminate the pipe.

Odd, works for me.  It looks like once skyview2svg has a SKY and
TPV sentence it continues.

Here is your code:

        while True:
            SENTENCE = json.loads(sys.stdin.readline())
            if 'class' in SENTENCE and SENTENCE['class'] == 'SKY':
                SKY = SENTENCE
            if 'class' in SENTENCE and SENTENCE['class'] == 'TPV':
                TPV = SENTENCE
            if SKY is not None and TPV is not None:

> I tried to sys.stdin.close(), but it is not sufficient. Do you 
> know if there is a way to terminate the pipeline from within 
> skyview2svg?

What is hapeneing when I do it:

1. skyview2svg get the SKY and TPV

2. skyview2svg builds the svg

3. skyview2svg exits

4. pipe is broken, so gpspipe exits.

Can you confirm your Python and gpspipe versions?

Also, what about getting the license changed to BSD-2-clause?

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgp_EXxajSj_I.pgp
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]