petrichor-labs / nmea_data_convert Goto Github PK
View Code? Open in Web Editor NEWConvert NMEA data to CSV files, or import NMEA data to PostgreSQL database
Convert NMEA data to CSV files, or import NMEA data to PostgreSQL database
Hi. Bro
This is Scott from S.Korea.
I just wanna test this code for checking my drone-GPS ~
I install python3.12
when I try to this, found error logs. could you please let me know how to fix it ?
python nmea_data_convert.py test_data/test_data_0_all.nmea csv -cs GNRMC
PS D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master> python nmea_data_convert.py test_data/test_data_0_all.nmea csv -cs GNRMC
Reading in data... done.
Processing data... Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 939, in _finalize_columns_and_data
columns = _validate_or_indexify_columns(contents, columns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 986, in _validate_or_indexify_columns
raise AssertionError(
AssertionError: 20 columns passed, passed data had 18 columns
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master\nmea_data_convert.py", line 686, in
main()
File "D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master\nmea_data_convert.py", line 659, in main
sentence_dfs = process_data_common(sentences, args) # Cycle starts with 'GNRMC' sentence
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master\nmea_data_convert.py", line 644, in process_data_common
sentence_dfs = sentences_to_dataframes(sentence_sets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\02_DEV_TOOLS\102.GNSS Utility\nmea_data_convert-master\nmea_data_convert-master\nmea_data_convert.py", line 432, in sentences_to_dataframes
df = pd.DataFrame(list_of_data_rows, columns=columns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\frame.py", line 851, in init
arrays, columns, index = nested_data_to_arrays(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 520, in nested_data_to_arrays
arrays, columns = to_arrays(data, columns, dtype=dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 845, in to_arrays
content, columns = _finalize_columns_and_data(arr, columns, dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\internals\construction.py", line 942, in _finalize_columns_and_data
raise ValueError(err) from err
ValueError: 20 columns passed, passed data had 18 columns
Thanks in advanced
Scott.
I've been working with the Quectel RM500Q-GL module, which has a GNSS engine and can output NMEA sentences.
I found your project and it almost fit my needs, except that I'm not using GLONASS but a combination of GPS and Galileo.
So I've decided to add Galileo support next to GPS and GLONASS in your project.
This has been tested with several files containing various states of NMEA sentences and all issues, including issues in the original code, should be fixed with PR #8 .
I've also made all the code comply more with Python coding guidlines using linters, etc.
I hope you like my work!
Hi,
is it possible after extrapolating "lat "and "lon" coordinate to automatically convert it into sexagesimal or sexadecimal degrees?
Maybe I'm not getting something back?
I attach the file:
2022-07-09_18-14-05-190.log
2022-07-09_18-14-05-190_GNGGA.csv
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.