Giter Site home page Giter Site logo

petrichor-labs / nmea_data_convert Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 3.0 11.77 MB

Convert NMEA data to CSV files, or import NMEA data to PostgreSQL database

Python 100.00%
nmea nmea-parser nmea-sentences nmea-parsing-library csv csv-export database postgresql postgres nmea-postgres

nmea_data_convert's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nmea_data_convert's Issues

Not working

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.

Support for Galileo

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.