Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Java Marine API - NMEA 0183 library for Java

License

NotificationsYou must be signed in to change notification settings

ktuukkan/marine-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LicenseBuildMaven CentralDownload Java Marine APIJavadocsSponsored by Spice

About

Java Marine API is anNMEA 0183 parserlibrary for decoding and encoding the data provided by various electronic marinedevices such as GPS, echo sounder and weather instruments.

Features

  • Generic and extentable API
  • Detects NMEA 0183 sentences from most input streams
    • E.g. from file, serial port, TCP/IP or UDP socket
    • The provided data readers can be overridden with custom implementation
  • Converts the ASCII data stream to event/listener model with interfaces and parsers forselected sentences
  • Additional parsers may be added by extending the provided base classes
    • This can be done at runtime and does not require compiling the library
  • Sentence encoding with common validation and unified formatting
  • Several sentences can be aggregated to single event by usingproviders
    • For example, to record current position and depth of water
  • Decoding of selectedAIS messages
  • The NMEA 0183 layer ofRaymarine SeaTalk1
  • Utilities and enumerations for handling the extracted data

Licensing

Java Marine API is free software: you can redistribute it and/or modify itunder the terms of theGNU Lesser General Public License publishedby the Free Software Foundation, either version 3 of the License, or (at youroption) any later version.

Java Marine API is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public Licensefor more details.

You should have received a copy of the GNU Lesser General Public Licensealong with Java Marine API. If not, seehttp://www.gnu.org/licenses/.

Disclaimer

Java Marine API is not official NMEA 0183 software. Further, it is not relatedtoNational Marine Electronics Association.

The interpretation of NMEA 0183 and related protocols is based entirely onvarying set of publicly availabledocuments in the Internet.Thus, it is not guaranteed that the library follows and implements thesestandards correctly.

Electronic devices and software do not replace safe navigation practices andshould never be your only reference.

Requirements

Usage

Write a listener:

classGGAListenerextendsAbstractSentenceListener<GGASentence> {publicvoidsentenceRead(GGASentencegga) {Positionpos =gga.getPosition();// .. your code    }}

Set up the reader:

Filefile =newFile("/var/log/nmea.log");SentenceReaderreader =newSentenceReader(newFileInputStream(file));reader.addSentenceListener(newGGAListener());reader.start();

Manual parsing:

Stringnmea ="$GPGSA,A,3,03,05,07,08,10,15,18,19,21,28,,,1.4,0.9,1.1*3A";SentenceFactorysf =SentenceFactory.getInstance();GSASentencegsa = (GSASentence)sf.createParser(nmea);

Recommended Android Proguard settings whenminifyEnabled is settrue:

-keep class net.sf.marineapi.** { *; }-keep interface net.sf.marineapi.** { *; }-keepattributes MethodParameters-dontwarn gnu.io.CommPortIdentifier-dontwarn gnu.io.RXTXPort-dontwarn gnu.io.SerialPort

See also:

Supported Protocols

NMEA 0183

The following sentences are decoded and encoded. The provided parsers may beoverridden and additional parsers may be added at runtime,without compilingthe library. See wiki forinstructions.

IDDescription
ALKThe NMEA 0183 layer of Raymarine SeaTalk1 ($STALK)
APBAutopilot cross-track error, destination bearings and heading
BODBearing from origin to destination
CURWater currents information
DBTWater depth below transducer in meters, feet and fathoms
DPTWater depth in meters with offset to transducer
DTABoreal GasFinder2 and GasFinderMC
DTBBoreal GasFinder2 and GasFinderMC
DTMDatum reference
GBSGlonass satellite fault detection (RAIM support)
GGAGPS fix data
GLLCurrent geographic position and time
GNSGlonass fix data
GSAPrecision of GPS fix
GSTGPS pseudorange noise statistics
GSVDetailed GPS satellite data
HDGHeading with magnetic deviation and variation
HDMMagnetic heading in degrees
HDTTrue heading in degrees
HTCHeading/Track control systems input data and commands.
HTDHeading/Track control systems output data and commands.
MDAMeteorological composite
MHURelative and absolute humidity with dew point
MMBBarometric pressure
MTAAir temperature in degrees Celcius
MTWWater temperature in degrees Celcius
MWDWind speed and direction.
MWVWind speed and angle
OSDOwn ship data
RMBRecommended minimum navigation information "type B"
RMCRecommended minimum navigation information "type C"
ROTVessel's rate of turn
RPMEngine or shaft revolutions
RSARudder angle in degrees
RSDRadar system data
RTEGPS route data with list of waypoints
TLBTarget label
TTMTracked target message
TXTText message
VBWDual ground/water speed.
VDMThe NMEA 0183 layer of AIS: other vessels' data
VDOThe NMEA 0183 layer of AIS: vessel's own data
VDRSet and drift
VHWWater speed and heading
VLWDistance traveled through water
VTGCourse and speed over ground
VWRRelative wind speed and angle
VWTTrue wind speed and angle
WPLDestination waypoint location and ID
XDRTransducer measurements
XTEMeasured cross-track error
ZDAUTC time and date with local time offset

AIS

The followingAISmessages are decoded.

IDDescription
01Position Report Class A
02Position Report Class A (Assigned schedule)
03Position Report Class A (Response to interrogation)
04Base Station Report
05Static and Voyage Related Data
09Standard SAR Aircraft Position Report
18Standard Class B CS Position Report
19Extended Class B Equipment Position Report
21Aid-to-Navigation Report
24Static Data Report
27Position Report for long range applications

Raymarine SeaTalk1

Not to be confused with SeaTalkng derived from NMEA 2000.

Only the NMEA layer is currently supported, seeSTALKSentenceandIssue #67.

u-blox

The followingu-bloxvendor extension messages are supported:

IDDescription
PUBX,01Lat/Long Position Data
PUBX,03Satellite Status

Distribution

Releases and snapshots are published every now and then, but there is no clearplan or schedule for this as most of the development happens per user requestsor contribution.

Pre-built JARs

Release JARs may be downloaded fromreleasesandSourceforge.net.The ZIP package should contain all to get you going.

The project was first published in Sourceforge, hence thenet.sf.marineapipackage naming.

Maven

Both releases and snapshots are deployed toMaven Central Repositoryand may be imported by adding the following dependency in yourpom.xml.

<dependency>  <groupId>net.sf.marineapi</groupId>  <artifactId>marineapi</artifactId>  <version>0.10.0</version>  <type>bundle</type></dependency>

Snapshots

The snapshots should be mostly stable, but they are stillWork In Progress andshould be considered as a preview of the next release.

Seechangelog.txt for the currentSNAPSHOT version. Notice thatyou may need to tweak yourMaven settingsto enable snapshot dependencies.

<dependency>  <groupId>net.sf.marineapi</groupId>  <artifactId>marineapi</artifactId>  <version>0.11.0-SNAPSHOT</version>  <type>bundle</type></dependency>

Snapshots may also be downloaded manually from therepository.

Contributing

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

References

All information and specifications for this library has been gathered from thefollowing documents, availability last checked on 2020-03-15.

Notice: any warnings regarding the accuracy of the information in belowdocuments apply equally to Java Marine API.

National Marine Electronics Association

Navigation Center of U.S. Department of Homeland Security

Product Manuals and User Guides

Wikipedia

Miscellaneus

No longer available



[8]ページ先頭

©2009-2025 Movatter.jp