Skip to content

Commit 8c49eaa

Browse files
authored
Merge branch 'master' into ktuukkangh-116
2 parents 21d35c1 + 2f804ba commit 8c49eaa

File tree

91 files changed

+4786
-378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4786
-378
lines changed

.github/workflows/test.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Build & Test
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up JDK 11
20+
uses: actions/setup-java@v2
21+
with:
22+
java-version: '11'
23+
distribution: 'adopt'
24+
cache: maven
25+
- name: Build
26+
run: mvn compile --file pom.xml
27+
- name: Test
28+
run: mvn test --file pom.xml

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
target/
66
*.iml
77
.gradle
8+
.vscode/

.travis.yml

-10
This file was deleted.

README.md

+104-58
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
# Java Marine API
22
[![License](https://img.shields.io/badge/License-LGPL%20v3-brightgreen.svg)](./LICENSE)
3-
[![Build Status](https://travis-ci.org/ktuukkan/marine-api.png)](https://travis-ci.org/ktuukkan/marine-api)
3+
[![Build](https://github.com/ktuukkan/marine-api/actions/workflows/test.yml/badge.svg)](https://github.com/ktuukkan/marine-api/actions/workflows/test.yml)
44
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sf.marineapi/marineapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sf.marineapi/marineapi)
55
[![Download Java Marine API](https://img.shields.io/sourceforge/dm/marineapi.svg)](https://sourceforge.net/projects/marineapi/files/Releases/)
66
[![Javadocs](http://www.javadoc.io/badge/net.sf.marineapi/marineapi.svg)](http://www.javadoc.io/doc/net.sf.marineapi/marineapi)
77
[![Sponsored by Spice](https://img.shields.io/badge/sponsored%20by-Spice-brightgreen.svg)](http://www.spiceprogram.org)
88

9-
- [About](#about)
9+
- [Java Marine API](#java-marine-api)
10+
- [About](#about)
1011
- [Features](#features)
11-
- [Licensing](#licensing)
12-
- [Disclaimer](#disclaimer)
13-
- [Requirements](#requirements)
14-
- [Usage](#usage)
15-
- [Supported Protocols](#supported-protocols)
12+
- [Licensing](#licensing)
13+
- [Disclaimer](#disclaimer)
14+
- [Requirements](#requirements)
15+
- [Usage](#usage)
16+
- [Supported Protocols](#supported-protocols)
1617
- [NMEA 0183](#nmea-0183)
1718
- [AIS](#ais)
18-
- [Raymarine SeaTalk](#raymarine-seatalk1)
19-
- [Distribution](#distribution)
19+
- [Raymarine SeaTalk<sup>1</sup>](#raymarine-seatalksup1sup)
20+
- [u-blox](#u-blox)
21+
- [Distribution](#distribution)
2022
- [Pre-built JARs](#pre-built-jars)
2123
- [Maven](#maven)
22-
- [Contributing](#contributing)
23-
- [References](#references)
24+
- [Snapshots](#snapshots)
25+
- [Contributing](#contributing)
26+
- [References](#references)
27+
- [National Marine Electronics Association](#national-marine-electronics-association)
28+
- [Navigation Center of U.S. Department of Homeland Security](#navigation-center-of-us-department-of-homeland-security)
29+
- [Product Manuals and User Guides](#product-manuals-and-user-guides)
30+
- [Wikipedia](#wikipedia)
31+
- [Miscellaneus](#miscellaneus)
32+
- [No longer available](#no-longer-available)
2433

2534
## About
2635

@@ -76,43 +85,60 @@ should never be your only reference.
7685

7786
### Requirements
7887

79-
* Java 2 SE JRE/JDK v1.8.0 or newer
80-
* For serial port communication:
81-
82-
* [Neuron Robotics Java Serial Library](https://github.com/NeuronRobotics/nrjavaserial)
83-
* [PureJavaComm](http://www.sparetimelabs.com/purejavacomm)
84-
* [RXTX library](http://rxtx.qbang.org)
85-
* [Java Communications API](http://www.oracle.com/technetwork/java/index-jsp-141752.html)
88+
* Java 2 SE JRE/JDK 11 or newer
89+
* For serial port communication (choose one):
90+
* [Neuron Robotics Java Serial Library](https://github.com/NeuronRobotics/nrjavaserial)
91+
* [PureJavaComm](http://www.sparetimelabs.com/purejavacomm)
92+
* [RXTX library](http://rxtx.qbang.org)
93+
* [Java Communications API](http://www.oracle.com/technetwork/java/index-jsp-141752.html)
8694

8795
### Usage
8896

8997
Write a listener:
9098

91-
class GGAListener extends AbstractSentenceListener<GGASentence> {
92-
public void sentenceRead(GGASentence gga) {
93-
Position pos = gga.getPosition();
94-
// .. your code
95-
}
99+
```java
100+
class GGAListener extends AbstractSentenceListener<GGASentence> {
101+
public void sentenceRead(GGASentence gga) {
102+
Position pos = gga.getPosition();
103+
// .. your code
96104
}
105+
}
106+
```
97107

98108
Set up the reader:
99109

100-
File file = new File("/var/log/nmea.log");
101-
SentenceReader reader = new SentenceReader(new FileInputStream(file));
102-
reader.addSentenceListener(new GGAListener());
103-
reader.start();
110+
```java
111+
File file = new File("/var/log/nmea.log");
112+
SentenceReader reader = new SentenceReader(new FileInputStream(file));
113+
reader.addSentenceListener(new GGAListener());
114+
reader.start();
115+
```
104116

105117
Manual parsing:
106118

107-
String nmea = "$GPGSA,A,3,03,05,07,08,10,15,18,19,21,28,,,1.4,0.9,1.1*3A";
108-
SentenceFactory sf = SentenceFactory.getInstance();
109-
GSASentence gsa = (GSASentence) sf.createParser(nmea);
119+
```java
120+
String nmea = "$GPGSA,A,3,03,05,07,08,10,15,18,19,21,28,,,1.4,0.9,1.1*3A";
121+
SentenceFactory sf = SentenceFactory.getInstance();
122+
GSASentence gsa = (GSASentence) sf.createParser(nmea);
123+
```
124+
125+
Recommended Android Proguard settings when `minifyEnabled` is set `true`:
126+
127+
```
128+
-keep class net.sf.marineapi.** { *; }
129+
-keep interface net.sf.marineapi.** { *; }
130+
-keepattributes MethodParameters
131+
-dontwarn gnu.io.CommPortIdentifier
132+
-dontwarn gnu.io.RXTXPort
133+
-dontwarn gnu.io.SerialPort
134+
```
110135

111136
See also:
112137
- [Examples](src/main/java/net/sf/marineapi/example)
113138
- [Javadocs](http://www.javadoc.io/doc/net.sf.marineapi/marineapi)
114139
- [Graphical User Interface](https://github.com/aitov/gps-info) using marine-api by @aitov
115140

141+
116142
## Supported Protocols
117143

118144
### NMEA 0183
@@ -152,12 +178,15 @@ the library. See wiki for
152178
|MTW |Water temperature in degrees Celcius
153179
|MWD |Wind speed and direction.
154180
|MWV |Wind speed and angle
181+
|OSD |Own ship data
155182
|RMB |Recommended minimum navigation information "type B"
156183
|RMC |Recommended minimum navigation information "type C"
157184
|ROT |Vessel's rate of turn
158185
|RPM |Engine or shaft revolutions
159186
|RSA |Rudder angle in degrees
187+
|RSD |Radar system data
160188
|RTE |GPS route data with list of waypoints
189+
|TLB |Target label
161190
|TTM |Tracked target message
162191
|TXT |Text message
163192
|VBW |Dual ground/water speed.
@@ -191,6 +220,7 @@ messages are decoded.
191220
|19 |Extended Class B Equipment Position Report
192221
|21 |Aid-to-Navigation Report
193222
|24 |Static Data Report
223+
|27 |Position Report for long range applications
194224

195225
### Raymarine SeaTalk<sup>1</sup>
196226

@@ -200,6 +230,15 @@ Only the NMEA layer is currently supported, see
200230
[STALKSentence](src/main/java/net/sf/marineapi/nmea/sentence/STALKSentence.java)
201231
and [Issue #67](https://github.com/ktuukkan/marine-api/issues/67).
202232

233+
### u-blox
234+
235+
The following [u-blox](https://www.u-blox.com/)
236+
vendor extension messages are supported:
237+
238+
| ID | Description
239+
|--- |---
240+
| PUBX,01 |Lat/Long Position Data
241+
| PUBX,03 |Satellite Status
203242

204243
## Distribution
205244

@@ -222,41 +261,47 @@ package naming.
222261
Both releases and snapshots are deployed to [Maven Central Repository](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.sf.marineapi%22)
223262
and may be imported by adding the following dependency in your `pom.xml`.
224263

225-
<dependency>
226-
<groupId>net.sf.marineapi</groupId>
227-
<artifactId>marineapi</artifactId>
228-
<version>0.10.0</version>
229-
<type>bundle</type>
230-
</dependency>
264+
```xml
265+
<dependency>
266+
<groupId>net.sf.marineapi</groupId>
267+
<artifactId>marineapi</artifactId>
268+
<version>0.10.0</version>
269+
<type>bundle</type>
270+
</dependency>
271+
```
231272

232273
#### Snapshots
233274

234275
The snapshots should be mostly stable, but they are still *Work In Progress* and
235276
should be considered as a preview of the next release.
236277

237-
See [changelog](changelog.txt) for the current `SNAPSHOT` version. Notice that
278+
See [changelog.txt](changelog.txt) for the current `SNAPSHOT` version. Notice that
238279
you may need to tweak your [Maven settings](https://gist.github.com/ktuukkan/8cf2de1e915185118c60)
239280
to enable snapshot dependencies.
240281

241-
<dependency>
242-
<groupId>net.sf.marineapi</groupId>
243-
<artifactId>marineapi</artifactId>
244-
<version>0.11.0-SNAPSHOT</version>
245-
<type>bundle</type>
246-
</dependency>
282+
```xml
283+
<dependency>
284+
<groupId>net.sf.marineapi</groupId>
285+
<artifactId>marineapi</artifactId>
286+
<version>0.11.0-SNAPSHOT</version>
287+
<type>bundle</type>
288+
</dependency>
289+
```
247290

248291
Snapshots may also be downloaded manually from the
249292
[repository](https://oss.sonatype.org/content/repositories/snapshots/net/sf/marineapi/marineapi/).
250293

294+
251295
## Contributing
252296

253297
Any feedback or contribution is welcome. You have several options:
254298

255299
- [Contact me](https://github.com/ktuukkan)
256300
- [Report a bug](https://github.com/ktuukkan/marine-api/issues)
257-
- [Fork](https://help.github.com/articles/fork-a-repo/) and open a [pullrequest](https://help.github.com/articles/about-pull-requests/)
301+
- [Fork](https://help.github.com/articles/fork-a-repo/) and open a [pull request](https://help.github.com/articles/about-pull-requests/)
258302
to share improvements.
259303

304+
260305
## References
261306

262307
All information and specifications for this library has been gathered from the
@@ -265,11 +310,6 @@ following documents, availability last checked on 2020-03-15.
265310
*Notice: any warnings regarding the accuracy of the information in below
266311
documents apply equally to Java Marine API.*
267312

268-
### Wikipedia
269-
270-
* [NMEA 0183](http://en.wikipedia.org/wiki/NMEA_0183)
271-
* [Automatic Identification System](https://en.wikipedia.org/wiki/Automatic_identification_system)
272-
273313
### National Marine Electronics Association
274314

275315
* [Amendment to NMEA 0183 v4.10 # 20130814](https://www.nmea.org/Assets/21030814%20nmea%200183_man%20overboard%20notification_mob_sentence%20amendment.pdf)
@@ -295,19 +335,25 @@ documents apply equally to Java Marine API.*
295335
* [SeaTalk/NMEA/RS232 Converter Manual](https://community.atmel.com/sites/default/files/project_files/ManualV3-5.pdf) by gadgetPool
296336
* [SiRF NMEA Reference Manual](https://www.sparkfun.com/datasheets/GPS/NMEA%20Reference%20Manual-Rev2.1-Dec07.pdf) by SiRF Technology, Inc.
297337
* [The NMEA Information Sheet](https://www.actisense.com/wp-content/uploads/2020/01/NMEA-0183-Information-sheet-issue-4-1-1.pdf) by Actisense
338+
* [ZED-F9P F9 high precision GNSS receiver Interface Description](https://www.u-blox.com/en/docs/UBX-18010854) by u-blox
339+
340+
### Wikipedia
341+
342+
* [NMEA 0183](http://en.wikipedia.org/wiki/NMEA_0183)
343+
* [Automatic Identification System](https://en.wikipedia.org/wiki/Automatic_identification_system)
298344

299345
### Miscellaneus
300346

301-
* [NMEA Revealed](http://catb.org/gpsd/NMEA.html) by Eric S. Raymond
302-
* [AIVDM/AIVDO protocol decoding](http://catb.org/gpsd/AIVDM.html) by Eric S. Raymond
303-
* [NMEA Data](http://www.gpsinformation.org/dale/nmea.htm) by Dale DePriest
347+
* [AIVDM/AIVDO protocol decoding](https://gpsd.gitlab.io/gpsd/AIVDM.html) by Eric S. Raymond
348+
* [NMEA Revealed](https://gpsd.gitlab.io/gpsd/NMEA.html) by Eric S. Raymond
304349
* [SeaTalk Technical Reference](http://www.thomasknauf.de/seatalk.htm) by Thomas Knauf
305350

306351
### No longer available
307352

308-
* [RS232/SeaTalk/NMEA Converter manual](http://www.gadgetpool.de/nuke/downloads/ManualRS232.pdf)
309-
by gadgetPool (not found)
310-
* [NMEA Sentence Information](http://home.mira.net/~gnb/gps/nmea.html)
311-
by Glenn Baddeley (not found)
312-
* [The NMEA FAQ](http://vancouver-webpages.com/peter/nmeafaq.txt)
313-
by Peter Bennett (see [older copy](http://www.eoss.org/pubs/nmeafaq.htm))
353+
* [NMEA Data](http://www.gpsinformation.org/dale/nmea.htm) by Dale DePriest
354+
* [NMEA Sentence Information](http://home.mira.net/~gnb/gps/nmea.html) by Glenn Baddeley (not found)
355+
* [RS232/SeaTalk/NMEA Converter manual](http://www.gadgetpool.de/nuke/downloads/ManualRS232.pdf) by gadgetPool (not found)
356+
* [The NMEA FAQ](http://vancouver-webpages.com/peter/nmeafaq.txt) by Peter Bennett (see [older copy](http://www.eoss.org/pubs/nmeafaq.htm))
357+
358+
359+
---

build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
app.id=marineapi
22
app.name=Java Marine API
3-
app.version=0.11.0
3+
app.version=0.12.0

changelog.txt

+25-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
11
Java Marine API - changelog
22
<http://ktuukkan.github.io/marine-api/>
33

4-
Version 0.12.0-SNAPSHOT
4+
Version 0.12.0 (2023-02-26)
5+
6+
- Added support for OSD sentences; own ship data
7+
- Added support for RSD sentences; radar system data
8+
- Added support for TLB sentences; target label data
9+
- Added support for TLL sentences; target latitude and longitude
10+
- Added support for AIS message 27; long-range automatic identification
11+
- Added support for u-blox message 01; lat/long position data
12+
- Added support for u-blox message 03; satellite status
513
- AIS message length validation moved to AISMessageParser.
614
- AISMessage05; added missing DTE flag getter.
715
- TalkerId enum
816
- Checked against latest list of official mnemonics and added DP, DU, EI,
917
FD, FE, FR, FS, HD, HF, HS, JA, JB, JC, JD, JE, JF, JG, JH, MX, NL, RB,
1018
RI, SC, SG, TC, UP, VA, VR, VS, VT and WL
1119
- Added WV to suppport Wärtsilä proprietary sentences
12-
- Updated javadocs and removed @Deprecated annotation from obsolete entries
13-
to avoid unnecessary compiler warnings when working with legacy devices
14-
- Added support for TLL sentences;
20+
- Updated javadocs and removed @Deprecated annotations to avoid unecessary
21+
compiler warnings when working with legacy versions of NMEA 0183.
1522
- TTMSentence; refactored bearing and course setters/getters
23+
- Changed some speed units (KMH, KNOT, MPH) to their base units
24+
(KILOMETERS, NAUTICAL_MILES, STATUTE_MILES) so that more sentences
25+
can use them.
26+
- ShipType; added convenience methods for ship and cargo type (AIS)
27+
- FaaMode enum; added RTK modes
28+
- AbstractProvider; ensure expired events are disposed to avoid unnecessary
29+
memory consumption.
1630

1731
Contributions:
18-
- TTM parser by @NontasPantzopoulos
32+
- TTM sentence by Epameinondas Pantzopoulos (@NontasPantzopoulos)
33+
- TLB, OSD and RSD sentences by Joshua Sweaney (@joshsweaney)
34+
- AIS message 27 by Krzysztof Borowski (@liosedhel)
35+
- Unit and ShipType improvements by Joshua Sweaney (@joshsweaney)
36+
- u-blox support by Gunnar Hillert (@ghillert)
37+
- AIS interfaces improved by Alexis Manin (@alexismanin)
1938

2039
Version 0.11.0 (2019-07-06)
2140

@@ -24,7 +43,7 @@ Version 0.11.0 (2019-07-06)
2443
- Support for HTC sentences; Heading/Track control command
2544
- Support for HTD sentences; Heading/Track control data
2645
- Support for TXT sentences; Text messages, e.g. device boot screens etc.
27-
- Support for DTA/DTB sentences; Boreal GasFinder2 and GasFinderMC.
46+
- Support for DTA/DTB sentences; Boreal GasFinder2 and GasFinderMC.
2847
- Support for $STALK sentences; NMEA-0183 layer of Raymarine SeaTalk protocol.
2948
- AbstracSentenceListener; improvements in generic types resolving to support
3049
more advanced use of generics and inheritance.

0 commit comments

Comments
 (0)