[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: Niccolo Rigacci
Subject: Re: [gpsd-users] Create an SVG skyview image from JSON data
Date: Sat, 6 Oct 2018 17:20:31 +0200
User-agent: NeoMutt/20170113 (1.7.2)

Hi Gary!

I made some changes to the script! This is a resumee.

With your suggestion, now it runs also with Python3.

Now the program can run in pipe with gpspipe, as documented into 
the first lines of docstring.

Now I get no complaint from pycodestyle nor pylint, EXCEPT for 
the "line-too-long". I think that leaving that long lines is 
compliant with PEP 8, (paragraph #2, point #1), because "applying 
the guideline would make the code less readable". There are many 
literal strings that are theirself over 80 chars: is there a 
trick to break them without loosing readability?

I sorted the satellite bar char by PRN.

You said that "Signal Strength" is flat wrong, because it is 
actually a Signal/Noise Ratio: yes, you are right! But I'm 
preparing the SVG for non-expert people, which ignores the SNR 
meaning. I supposed that "signal strengt" was an acceptable 
approssimation, considering alsto that the JSON key is "ss" and 
it is referred as "Signal strength in dB" in the doc 

Also you said that "horizontal precision" is wrong, it is DOP! 
Actually the displayed bars are not DOP ("less is better"), but 
somewhat the inverse: a cutted-off value between a max and a min. 
Can we call it "concentration" of precision? I had non-expert 
people in mind, which understand "more is better". The 
"precision" bars in my SGV are a simple "long bars = good, short 
bars = evil", no unit of measure required.

About your question about the SVG viewer: it seems that in the 
GNU/Linux world there are two main families: Imagemagick's 
convert uses the library modules-Q16/coders/ (installed by 
the libmagickcore-6.q16-3-extra Debian packages), other tools 
uses the librsvg2 library (installed by the librsvg2-bin Debian 
package). Programs that uses the latter are rsvg-convert, Gimp, 
Geeqie, etc. It turned out that the librsvg2 has a bug with 
multiple (chained) CSS class selectors, see
So I changed my script a bit, to circumvent this bug. Now I can 
watch the produced SVG graphics with both families of tools.

I attach the new version of the script and a new SVG produced.

Thanks again for your time!

Niccolo Rigacci -
Campi Bisenzio - Firenze - Italy
Tel. Mobile: +39-327-5619352

Attachment: skyview2svg.gz
Description: application/gzip

Attachment: skyview.svg.gz
Description: application/gzip

reply via email to

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