[Top][All Lists]

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

Re: GPSD 3.23~rc1 connection to GPS

From: Gary E. Miller
Subject: Re: GPSD 3.23~rc1 connection to GPS
Date: Tue, 10 Aug 2021 20:07:38 -0700

Yo Aranza!

On Tue, 10 Aug 2021 21:51:58 -0700
Aranza Shaccid Leon <> wrote:

> Okay thank you for the advice. I'm attempting to have all this
> information moved into an Excel file,

Not a good idea.

> so I'm also attempting to use
> gpspipe for the JSON format since Excel can obtain data from a JSON
> file, but it currently states that there is an error "We found extra
> characters at the end of JSON input".

WIthout seeing your JSON file, no way to know your error.

gpsd JSON passes all JSON  validators we have tried.

> I've been looking through the
> JSON data and using reformatters to check what the issue is and I've
> found that it has an error of multiple JSON root error (according to
> the formatter) and after placing brackets between the beginning of
> the JSON message and the end and including commas between each new
> class ( }, {"class":SKY) that Excel will now open and organize the
> data.

The Excel is only expecting a single JSON object.  gpspipe is outputting
multiple JSON objects in series.

> Is there any way I can alter the JSON format within the code
> to include these commas?

Dunno.  Depends on how handy you are at programming.

> Otherwise if I'm attempting to collect a
> large group of data, parsing through the JSON to place commas before
> every class would be inconvenient.

1) a large group of data will overflow Excel.
2) just write a filter.

> Also following on the suggestion of running gpscsv three different
> times, I could attempt this but the only issue is the time column.

Not that I see.

> I've was attempting this with the TPV class and SKY class since I
> understand the SAT class will produce more data per second than the
> other two,

Please note, there is no SAT class.  Never has been.  gpscsv  defined it
as a meta class to make the CLI easier.

> but due to the different starting times the merge of these
> two in Excel was slightly strange.

Welcome to gpsd.  Nothing but strange here.

> Below I will try to send the data:
> time lat lon altHAE gps2.time gps2.xdop gps2.ydop gps2.vdop gps2.tdop
> gps2.hdop gps2.gdop gps2.pdop

I have no idea where gps2 comes from.  Does not look like a CSV file.

> My attempt to have the SKY,TPV, and SAT data running simultaneously
> is to create a program where all three will run under one command.


> I
> wished to ask if it possible to make a program within Putty to have

Lost me.  Putty is not a programming languge.  I never use Putty.

I could see using Putty to ssh to a remote machine and run a program on
the remote machine.

> gpscsv -c
> TPV>gps1.txt and gpscsv -c SKY>gps2.txt. I attempted this by opening
> TPV>a file  
> named

I have no idea what you are trying to do there.

> and used these commands, but the following errors
> occurred. May I ask if there is anyway to write this program or what
> commands I should be using instead?

There is always a way.  But you will have to write it yourself as I have
no idea what you do or do not know about programming.  And doing
anything to get into Excel will  be ultimatly disappointing.

> pi@clover-9676:~ $ python3
> Traceback (most recent call last):
>   File "", line 1, in <module>
>     gpscsv>gps1.txt  
> NameError: name 'gpscsv' is not defined
> pi@clover-9676:~ $ nano
> pi@clover-9676:~ $ python3
>   File "", line 1
>     gpscsv -c SKY >gps1.txt
>                 ^
> SyntaxError: invalid syntax

Python language is not shell language.  Totally different and you
are trying to execute shell language with Python interpreter.

Let me suggest you take a Python programming class before continuing on
that thought.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  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: pgpofLNo4ZBug.pgp
Description: OpenPGP digital signature

reply via email to

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