-
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.
this package will no longer be under active development and so will be cleaned up and shelved. * added notice to readme * removed proprietary types becuause it was pointed out that such things do not belong in (a) a standard parser library as they are NOT NMEA standard, (b) a open source package as it is for closed source products and (c) a product that does not have a lisence to use a non-public version of NMEA protocol. The 3rd point contains potential legal repercussions which is why I have also stripped all record of this data from the git history; as I do not want to be responsible for exposing non-public data from a company.
- Loading branch information
1 parent
3a56663
commit 47b8872
Showing
19 changed files
with
4,576 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,69 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: ['*'] | ||
pull_request: | ||
concurrency: | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
jobs: | ||
test: | ||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- '1.8' | ||
- '1.9' | ||
- '1' | ||
os: | ||
- ubuntu-latest | ||
- macOS-latest | ||
- windows-latest | ||
arch: | ||
- x64 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.version }} | ||
arch: ${{ matrix.arch }} | ||
- uses: julia-actions/cache@v1 | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-runtest@v1 | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: lcov.info | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
statuses: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: '1' | ||
- name: Configure doc environment | ||
run: | | ||
julia --project=docs/ -e ' | ||
using Pkg | ||
Pkg.develop(PackageSpec(path=pwd())) | ||
Pkg.instantiate()' | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-docdeploy@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: | | ||
julia --project=docs -e ' | ||
using Documenter: DocMeta, doctest | ||
using NMEAParser | ||
DocMeta.setdocmeta!(NMEAParser, :DocTestSetup, :(using NMEAParser); recursive=true) | ||
doctest(NMEAParser)' |
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,16 @@ | ||
name: CompatHelper | ||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
jobs: | ||
CompatHelper: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pkg.add("CompatHelper") | ||
run: julia -e 'using Pkg; Pkg.add("CompatHelper")' | ||
- name: CompatHelper.main() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} | ||
run: julia -e 'using CompatHelper; CompatHelper.main()' |
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,31 @@ | ||
name: TagBot | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
inputs: | ||
lookback: | ||
default: 3 | ||
permissions: | ||
actions: read | ||
checks: read | ||
contents: write | ||
deployments: read | ||
issues: read | ||
discussions: read | ||
packages: read | ||
pages: read | ||
pull-requests: read | ||
repository-projects: read | ||
security-events: read | ||
statuses: read | ||
jobs: | ||
TagBot: | ||
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: JuliaRegistries/TagBot@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ssh: ${{ secrets.DOCUMENTER_KEY }} |
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,16 @@ | ||
name: Register Package | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to register or component to bump | ||
required: true | ||
jobs: | ||
register: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: julia-actions/RegisterAction@latest | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
*.jl.*.cov | ||
*.jl.cov | ||
*.jl.mem | ||
/Manifest.toml | ||
/docs/Manifest.toml | ||
/docs/build/ |
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,2 @@ | ||
{ | ||
} |
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 Nicholas Shindler <[email protected]> | ||
|
||
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,21 @@ | ||
name = "NMEAParser" | ||
uuid = "e33883a1-8aa8-4e6e-a42d-0daf9e203b40" | ||
authors = ["Nicholas Shindler <[email protected]>"] | ||
version = "2.3.0" | ||
|
||
[weakdeps] | ||
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" | ||
|
||
[extensions] | ||
PrecompileExt = "PrecompileTools" | ||
|
||
[compat] | ||
Aqua = "0.8" | ||
julia = "1.8" | ||
|
||
[extras] | ||
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Aqua", "Test"] |
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,78 @@ | ||
# NMEAParser.jl | ||
|
||
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaMessaging.github.io/NMEAParser.jl/stable/) | ||
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaMessaging.github.io/NMEAParser.jl/dev/) | ||
[![Build Status](https://github.com/JuliaMessaging/NMEAParser.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaMessaging/NMEAParser.jl/actions/workflows/CI.yml?query=branch%3Amain) | ||
[![Coverage](https://codecov.io/gh/JuliaMessaging/NMEAParser.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaMessaging/NMEAParser.jl) | ||
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) | ||
|
||
## NOTICE: THIS PACKAGE IS NO LONGER UNDER ACTIVE MAINTENANCE. | ||
|
||
Hopefully there is no need for maintenance, because this is a relatively simple package, and should be able to be used as is. However as Julia is a rapidly changing language I expect there to eventually be compatibility issues. I am working on a NMEAProtocol.jl package that can read and write NMEA strings from Julia and plan for this package to be a replacement for NMEAParser.jl. Ideally it will be ready to go by the time this packages starts breaking, but I have limited time to invest on this. | ||
|
||
FYI: I am making a new package because I want to align better with Julia code design and provide more functionality with better performance. This was not possible without a serious re-write of the package resulting in breaking changes that go beyond what can be contained in a simple release/update. I will update this message when the new package is functional. | ||
|
||
## Introduction | ||
|
||
NMEAParser.jl is a Julia package for parsing NMEA GPS protocol sentences. | ||
|
||
NMEA strings are sentences that follow the NMEA 0183 messaging protocol. The NMEA 0183 messaging protocol was originally adopted in 1983 for interfacing marine electronics, but its use has expanded to terrestrial electronics as well. | ||
|
||
Data in this messaging protocol is transmitted in ASCII strings or “sentences” from one “talker” to multiple “listeners” at a time. These sentences contain information such as position, speed, depth, wind direction and speed, and other navigation data. NMEA strings are commonly used by GPS receivers and other navigation equipment to communicate with each other and with other devices such as computers and chart plotters. | ||
|
||
## Getting Started | ||
|
||
### Installation | ||
|
||
To install NMEAParser.jl, use the Julia package manager: | ||
|
||
```julia | ||
using Pkg | ||
Pkg.add("NMEAParser") | ||
``` | ||
|
||
### Usage | ||
Here’s a simple example that demonstrates how to parse an NMEA sentence: | ||
|
||
```julia | ||
using NMEAParser | ||
|
||
example = nmea_parse(raw"$GPGGA,134740.000,5540.3248,N,01231.2992,E,1,09,0.9,20.2,M,41.5,M,,0000*61") | ||
println(example.latitude) | ||
``` | ||
|
||
``` | ||
GGA("GPS", 49660.0, 55.67208, 12.521653333333333, "GPS (SPS)", 9, 0.9, 20.2, 41.5, 0.0, 0, true) | ||
55.67208 | ||
``` | ||
|
||
## Documentation | ||
|
||
### Standard Types | ||
* `GGA`: Global Positioning System Fix Data. | ||
* `GSA`: GNSS DOP and Active Satellites. | ||
* `ZDA`: Time and Date. | ||
* `GBS`: RAIM GNSS Satellite Fault Detection. | ||
* `GLL`: Geographic Position - Latitude/Longitude. | ||
* `GSV`: GNSS Satellites in View. | ||
* `RMC`: Recommended Minimum Specific GNSS Data. | ||
* `VTG`: Course over Ground and Ground Speed. | ||
* `DTM`: Datum. | ||
|
||
#### Store obj for standard types | ||
* `NMEAData`: Stores data for the last parsed sentence of all NMEA message types. | ||
|
||
### Methods | ||
* `parse_msg!`: Parses an NMEA line/sentence and stores data in an NMEAData object; returns the message type. | ||
* `nmea_parse`: Parses nmea strings to nmea type structs. | ||
* `is_string_supported`: Checks if a string is a valid standard type. | ||
* `update`: Update the last received message of type T in the NMEAData object s with the given message msg. | ||
|
||
## Contributing | ||
|
||
If you would like to contribute to the project, please submit a PR. Or better, check out [NMEAProtocol.jl](https://github.com/NickMcSweeney/NMEAProtocol.jl) to contribute on the new and improved version of this package. | ||
|
||
This work is based on the [NMEA.jl](https://github.com/RobBlackwell/NMEA.jl) package, and a lot of credit is due to [RobBlackwell](https://github.com/RobBlackwell) for his work along with the other contributors to that repository. | ||
|
||
## License | ||
This project is licensed under the MIT License - see the LICENSE file for details. |
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,3 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
NMEAParser = "e33883a1-8aa8-4e6e-a42d-0daf9e203b40" |
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,22 @@ | ||
push!(LOAD_PATH, "../src/") | ||
|
||
using NMEAParser | ||
using Documenter | ||
|
||
DocMeta.setdocmeta!(NMEAParser, :DocTestSetup, :(using NMEAParser); recursive = true) | ||
|
||
makedocs(; | ||
modules = [NMEAParser], | ||
authors = "Nicholas Shindler <[email protected]>", | ||
repo = "https://github.com/JuliaMessaging/NMEAParser.jl/blob/{commit}{path}#{line}", | ||
sitename = "NMEAParser.jl", | ||
format = Documenter.HTML(; | ||
prettyurls = get(ENV, "CI", "false") == "true", | ||
canonical = "https://JuliaMessaging.github.io/NMEAParser.jl", | ||
edit_link = "main", | ||
assets = String[], | ||
), | ||
pages = ["Home" => "index.md"], | ||
) | ||
|
||
deploydocs(; repo = "github.com/JuliaMessaging/NMEAParser.jl", devbranch = "main") |
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,14 @@ | ||
```@meta | ||
CurrentModule = NMEAParser | ||
``` | ||
|
||
# NMEAParser | ||
|
||
Documentation for [NMEAParser](https://github.com/JuliaMessaging/NMEAParser.jl). | ||
|
||
```@index | ||
``` | ||
|
||
```@autodocs | ||
Modules = [NMEAParser] | ||
``` |
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,23 @@ | ||
module PrecompileExt # Should be same name as the file (just like a normal package) | ||
|
||
using PrecompileTools, NMEAParser | ||
|
||
@setup_workload begin | ||
@debug "running optional precompiler set" | ||
test_msgs = [ | ||
raw"$GPGGA,134735.000,5540.3232,N,01231.2946,E,1,10,0.8,23.6,M,41.5,M,,0000*69", | ||
raw"$GPGSA,A,3,03,22,06,19,11,14,32,01,28,18,,,1.8,0.8,1.6*3F", | ||
raw"$GPRMC,134735.000,A,5540.3232,N,01231.2946,E,1.97,88.98,041112,,,A*5C", | ||
raw"$GPVTG,88.98,T,,M,1.97,N,3.6,K,A*36", | ||
raw"$GLGSV,3,3,09,72,07,273,,0*44", | ||
raw"$GNRMC,094810.000,A,5547.94084,N,03730.27293,E,0.25,50.34,260420,,,A,V*31", | ||
raw"$GNVTG,50.34,T,,M,0.25,N,0.46,K,A*14", | ||
raw"$GNZDA,094810.000,26,04,2020,00,00*4C", | ||
raw"$GNGLL,5547.94084,N,03730.27293,E,094810.000,A,A*4B", | ||
] | ||
@compile_workload begin | ||
nmea_strings = NMEAParser.nmea_parse.(test_msgs) | ||
end | ||
end | ||
|
||
end # PrecompileTools Extension |
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,12 @@ | ||
module NMEAParser | ||
|
||
export NMEAData, parse_msg!, is_string_supported, update, nmea_parse | ||
export NMEAString | ||
export GGA, GSA, ZDA, GBS, GLL, GSV, GST, RMC, VTG, DTM | ||
|
||
include("utils.jl") | ||
include("types.jl") | ||
include("parse.jl") | ||
|
||
|
||
end # module NMEAParser |
Oops, something went wrong.
47b8872
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
47b8872
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/114645
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: