-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init commit.
- Loading branch information
0 parents
commit 3899f4f
Showing
13 changed files
with
953 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"configuration": "FlashFreq=80,UploadSpeed=921600,DebugLevel=none", | ||
"board": "esp32:esp32:esp32doit-devkit-v1", | ||
"port": "COM22", | ||
"sketch": "examples\\Print_GPRMC\\Print_GPRMC.ino" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"files.associations": { | ||
"array": "cpp", | ||
"string": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
**+05:30 11:42:21 PM 12-07-2023, Wednesday** | ||
|
||
* First commit. | ||
* Version 0.1.0. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
####################################### | ||
# Syntax Coloring Map | ||
####################################### | ||
|
||
####################################### | ||
# Datatypes (KEYWORD1) | ||
####################################### | ||
|
||
CSE_GNSS KEYWORD1 | ||
NMEA_0183_Data KEYWORD1 | ||
|
||
####################################### | ||
# Methods and Functions (KEYWORD2) | ||
####################################### | ||
|
||
parse KEYWORD2 | ||
print KEYWORD2 | ||
set KEYWORD2 | ||
check KEYWORD2 | ||
find KEYWORD2 | ||
count KEYWORD2 | ||
getDataIndex KEYWORD2 | ||
begin KEYWORD2 | ||
read KEYWORD2 | ||
addData KEYWORD2 | ||
getDataCount KEYWORD2 | ||
getDataRef KEYWORD2 | ||
|
||
###################################### | ||
# Constants (LITERAL1) | ||
####################################### | ||
|
||
PT_MODE_ONESHOT LITERAL1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (C) 2023 Vishnu Mohanan | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# CSE_GNSS | ||
|
||
CSE_GNSS is a generic Arduino library from *CIRCUITSTATE Electronics* to read and write any GPS/GNSS module that supports NMEA output over UART. You can define the NMEA sentence formats however you want and extract the data coming from the GNSS module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
|
||
//======================================================================================// | ||
/** | ||
* @file Print_GPRMC.ino | ||
* @brief Reads the NMEA output from the GNSS module and prints it on the serial monitor. | ||
* @date +05:30 11:24:49 PM 12-07-2023, Wednesday | ||
* @version 0.1.0 | ||
* @author Vishnu Mohanan (@vishnumaiea) | ||
* @par GitHub Repository: https://github.com/CIRCUITSTATE/CSE_GNSS | ||
* @par MIT License | ||
* | ||
*/ | ||
//======================================================================================// | ||
|
||
#include <Arduino.h> | ||
#include <CSE_GNSS.h> | ||
|
||
//======================================================================================// | ||
|
||
#define PORT_GPS_SERIAL Serial1 // GPS serial port | ||
#define PORT_DEBUG_SERIAL Serial // Debug serial port | ||
|
||
//======================================================================================// | ||
// Forward declarations | ||
|
||
void setup(); | ||
void loop(); | ||
|
||
//======================================================================================// | ||
|
||
// Set the serial ports and the baudrate for the GNSS module. | ||
// Both ports have to be manually initialized through begin() call. | ||
CSE_GNSS GNSS_Module (&PORT_GPS_SERIAL, &PORT_DEBUG_SERIAL); | ||
|
||
// GPRMC (No Second Mode indicator) | ||
String GPRMC_Sample = "$GPRMC,165729.00,A,0902.595184,N,07632.860862,E,0.0,,031022,1.9,W,A*00"; | ||
String GPRMC_Data_Names [] = {"Header", "UTC", "Status", "Latitude", "Latitude Direction", "Longitude", "Longitude Direction", "Speed", "Course", "Date", "Mag Variation", "Mag Variation Direction", "Mode", "Checksum"}; | ||
String GPRMC_Description = "Recommended Minimum Specific GNSS Data"; | ||
NMEA_0183_Data NMEA_GPRMC ("GPRMC", GPRMC_Description, 14, GPRMC_Data_Names, GPRMC_Sample); | ||
|
||
//======================================================================================// | ||
/** | ||
* @brief Setup the serial ports and pins. | ||
* | ||
*/ | ||
void setup() { | ||
PORT_DEBUG_SERIAL.begin (115200); | ||
|
||
// For ESP32 boards | ||
PORT_GPS_SERIAL.begin (9600, SERIAL_8N1, 17, 16); | ||
|
||
// // For other boards. | ||
// PORT_GPS_SERIAL.begin (9600); | ||
|
||
GNSS_Module.begin(); | ||
GNSS_Module.addData (&NMEA_GPRMC); | ||
|
||
PORT_DEBUG_SERIAL.println(); | ||
PORT_DEBUG_SERIAL.println ("--- CSE_GNSS View_GNSS_Data ---"); | ||
delay (1000); | ||
} | ||
|
||
//======================================================================================// | ||
/** | ||
* @brief Runs indefinitely. | ||
* | ||
*/ | ||
void loop() { | ||
String GNSS_Data = GNSS_Module.read ("$GPRMC"); | ||
GNSS_Module.getDataRef ("GPRMC").find (GNSS_Data, 0); | ||
GNSS_Module.getDataRef ("GPRMC").print(); | ||
delay (10); | ||
} | ||
|
||
//======================================================================================// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
//======================================================================================// | ||
/** | ||
* @file View_GNSS_Data.ino | ||
* @brief Reads the NMEA output from the GNSS module and prints it on the serial monitor. | ||
* @date +05:30 04:34:13 PM 10-07-2023, Monday | ||
* @version 0.1.0 | ||
* @author Vishnu Mohanan (@vishnumaiea) | ||
* @par GitHub Repository: https://github.com/CIRCUITSTATE/CSE_GNSS | ||
* @par MIT License | ||
* | ||
*/ | ||
//======================================================================================// | ||
|
||
#include <Arduino.h> | ||
#include <CSE_GNSS.h> | ||
|
||
//======================================================================================// | ||
|
||
#define PORT_GPS_SERIAL Serial1 // GPS serial port | ||
#define PORT_DEBUG_SERIAL Serial // Debug serial port | ||
|
||
//======================================================================================// | ||
// Forward declarations | ||
|
||
void setup(); | ||
void loop(); | ||
|
||
//======================================================================================// | ||
|
||
// Set the serial ports and the baudrate for the GNSS module. | ||
// Both ports have to be manually initialized through begin() call. | ||
CSE_GNSS GNSS_Module (&PORT_GPS_SERIAL, &PORT_DEBUG_SERIAL); | ||
|
||
//======================================================================================// | ||
/** | ||
* @brief Setup the serial ports and pins. | ||
* | ||
*/ | ||
void setup() { | ||
PORT_DEBUG_SERIAL.begin (115200); | ||
|
||
// For ESP32 boards | ||
PORT_GPS_SERIAL.begin (9600, SERIAL_8N1, 17, 16); | ||
|
||
// // For other boards. | ||
// PORT_GPS_SERIAL.begin (9600); | ||
|
||
GNSS_Module.begin(); | ||
|
||
PORT_DEBUG_SERIAL.println(); | ||
PORT_DEBUG_SERIAL.println ("--- CSE_GNSS View_GNSS_Data ---"); | ||
delay (1000); | ||
} | ||
|
||
//======================================================================================// | ||
/** | ||
* @brief Runs indefinitely. | ||
* | ||
*/ | ||
void loop() { | ||
String GNSS_Data = GNSS_Module.read ("$GPRMC"); | ||
delay (10); | ||
} | ||
|
||
//======================================================================================// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "CSE_GNSS", | ||
"keywords": "gps, sensor, NMEA, GNSS, positioing", | ||
"description": "Arduino library for reading and writing GPS/GNSS receivers with NMEA output.", | ||
"repository": | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/CIRCUITSTATE/CSE_GNSS.git" | ||
}, | ||
"authors": | ||
{ | ||
"name": "Vishnu Mohanan", | ||
"url": "https://github.com/vishnumaiea", | ||
"maintainer": true | ||
}, | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
"frameworks": "arduino", | ||
"platforms": "*" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name=CSE_GNSS | ||
version=0.1.0 | ||
author=Vishnu Mohanan | ||
maintainer=Vishnu Mohanan | ||
sentence=Arduino library for reading and writing NMEA-supported GNSS/GPS modules. | ||
paragraph=Supports all GPS and GNSS modules with NMEA data output. Directly read and write NMEA and proprietary sentences to GNSS receivers. | ||
category=Sensor | ||
url=https://github.com/CIRCUITSTATE/CSE_GNSS | ||
architectures=* |
Oops, something went wrong.