Hello and good afternoon!
Okay thank you for the advice. I'm attempting to have all this information moved into an Excel file, 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". 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. Is there any way I can alter the JSON format within the code to include these commas? 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.
Also following on the suggestion of running gpscsv three different times, I could attempt this but the only issue is the time column. 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, but due to the different starting times the merge of these two in Excel was slightly strange. 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 |
8/9/2021 14:04 |
41.5636974 |
-86.5541748 |
180.492 |
|
|
|
|
|
|
|
|
8/9/2021
14:04 |
41.5637008 |
-86.554154 |
182.294 |
8/9/2021 14:04 |
0.66 |
0.95 |
1.55 |
1.14 |
1.16 |
2.24 |
1.93 |
8/9/2021 14:04 |
41.5636981 |
-86.5541725 |
180.747 |
|
|
|
|
|
|
|
|
8/9/2021
14:04 |
41.5637009 |
-86.5541525 |
182.554 |
8/9/2021 14:04 |
0.66 |
0.95 |
1.55 |
1.14 |
1.16 |
2.24 |
1.93 |
8/9/2021 14:04 |
41.5636981 |
-86.5541698 |
180.976 |
|
|
|
|
|
|
|
|
8/9/2021
14:04 |
41.5637005 |
-86.5541493 |
182.789 |
8/9/2021 14:04 |
0.66 |
0.95 |
1.55 |
1.14 |
1.16 |
2.24 |
1.93 |
8/9/2021 14:04 |
41.5636986 |
-86.5541665 |
181.283 |
|
|
|
|
|
|
|
|
8/9/2021
14:04 |
41.5636991 |
-86.5541474 |
183.059 |
8/9/2021 14:04 |
0.66 |
0.95 |
1.55 |
1.14 |
1.16 |
2.24 |
1.93 |
8/9/2021 14:04 |
41.5636986 |
-86.5541633 |
181.511 |
|
|
|
|
|
|
|
|
8/9/2021
14:04 |
41.5636982 |
-86.5541471 |
183.283 |
8/9/2021 14:04 |
0.67 |
0.95 |
1.55 |
1.14 |
1.16 |
2.24 |
1.93 |
8/9/2021 14:04 |
41.5636991 |
-86.5541602 |
181.683 |
|
|
|
|
|
|
|
|
8/9/2021
14:05 |
41.5636981 |
-86.5541474 |
183.481 |
8/9/2021 14:05 |
0.67 |
0.95 |
1.55 |
1.14 |
1.16 |
2.24 |
1.93 |
8/9/2021 14:04 |
41.5636997 |
-86.5541577 |
181.869 |
|
|
|
|
|
|
|
|
8/9/2021
14:05 |
41.5636976 |
-86.5541468 |
183.603 |
8/9/2021 14:05 |
0.56 |
0.85 |
1.55 |
1.14 |
1.16 |
2.24 |
1.93 |
8/9/2021 14:04 |
41.5637005 |
-86.5541556 |
182.063 |
|
|
|
|
|
|
|
|
8/9/2021
14:05 |
41.5636976 |
-86.5541457 |
183.737 |
8/9/2021 14:05 |
0.56 |
0.85 |
1.45 |
1 |
1.02 |
2.04 |
1.77 |
8/9/2021 14:05 |
41.5636965 |
-86.5541454 |
184.007 |
8/9/2021 14:05 |
0.56 |
0.85 |
1.45 |
1 |
1.02 |
2.04 |
1.77 |
8/9/2021
14:05 |
41.5636966 |
-86.5541459 |
184.206 |
8/9/2021 14:05 |
0.56 |
0.85 |
1.45 |
1 |
1.02 |
2.04 |
1.77 |
8/9/2021 14:05 |
41.5636969 |
-86.554145 |
184.325 |
8/9/2021 14:05 |
0.56 |
0.85 |
1.45 |
1 |
1.02 |
2.04 |
1.77 |
8/9/2021
14:05 |
41.5636968 |
-86.5541458 |
184.569 |
8/9/2021 14:05 |
0.56 |
0.85 |
1.45 |
1 |
1.02 |
2.04 |
1.77 |
8/9/2021 14:05 |
41.5636979 |
-86.5541456 |
184.736 |
8/9/2021 14:05 |
0.59 |
0.89 |
1.45 |
1 |
1.02 |
2.04 |
1.77 |
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 gpscsv -c TPV>gps1.txt and gpscsv -c SKY>gps2.txt. I attempted this by opening a file named gpsdata.py 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?
pi@clover-9676:~ $ python3 gpsdata.py
Traceback (most recent call last):
File "gpsdata.py", line 1, in <module>
gpscsv>gps1.txt
NameError: name 'gpscsv' is not defined
pi@clover-9676:~ $ nano gpsdata.py
pi@clover-9676:~ $ python3 gpsdata.py
File "gpsdata.py", line 1
gpscsv -c SKY >gps1.txt
^
SyntaxError: invalid syntax
Thank you for your time and consideration.
Sincerely,
Leon