Giter VIP home page Giter VIP logo

aislib's People

Contributors

babisk avatar borchsenius avatar bushaev avatar christopherlakey avatar clupprich avatar darius-wattimena avatar dependabot[bot] avatar dimitrispallas avatar dvm-ed avatar githubcx avatar jenstuxen avatar johnmartel avatar kaspernielsen avatar kottmann avatar mablae avatar mikaelulvesjo avatar mvlcek avatar oteken avatar peder280370 avatar rutsky avatar sastafford avatar serializingme avatar steen-elv avatar tbsalling avatar tejl avatar wojciechk avatar

Stargazers

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

Watchers

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

aislib's Issues

AisMessage::getEncoded is largely untested

The test suite does not cover the getEncoded method of most messages, and the tests which call that method are heavily obfuscated, making it unclear what messages are being tested without debugging the tests as they run.
During debugging, aisDecodeEncode only tested getEncoded in messages 1, 3, 4, 5, and 24 (assuming the changes in #37), and the rest of EncodeTest only covered getEncoded in the above messages and message 12. Overall, only messages 1, 3, 4, 5, 6, 8, 12, 18, and 24 had their getEncoded methods called in any test methods.

Decoder null pointer exception with AIS message type 5

I found, what I believe, to be a bug while trying to decode ais 5 message type.
It seems if ETA is not present the decoder will not output a result and will return null due to a null pointer exception. Below you can see

image

image

All is broken

Can't build or use the Maven version. Is there any alternative to this ?

VDM parser and decimal places

Hello,

I've been looking at AisLib, specially the vdm parser and have some questions regarding decimal values.
When parsing latitude/longitude i get int/long but there is a field resolution which i believe can be used to obtain the proper value of lat/lon. For other cases i don't see the same, things like rog, sog, heading, etc. How can i know the decimal parts? Is it like a convention that, example, the first 2 digits are the integer part and the others the decimal?
If you could point me to some documentation, that would help.

Another error : AisLib building

I tried your solution on a closed issue "AisLib is not building". The different error came up.

[INFO] Scanning for projects...
Downloading from dma-releases: http://repository-dma.forge.cloudbees.com/release/dk/dma/dma-root-pom/24/dma-root-pom-24.pom
Downloading from central: https://repo.maven.apache.org/maven2/dk/dma/dma-root-pom/24/dma-root-pom-24.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for dk.dma.ais.lib:ais-parent:2.4-SNAPSHOT: Could not transfer artifact dk.dma:dma-root-pom:pom:24 from/to dma-releases (http://repository-dma.forge.cloudbees.com/release/): repository-dma.forge.cloudbees.com and 'parent.relativePath' points at wrong local POM @ line 5, column 10
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project dk.dma.ais.lib:ais-parent:2.4-SNAPSHOT (C:\Users\Kafilah\AisLib\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for dk.dma.ais.lib:ais-parent:2.4-SNAPSHOT: Could not transfer artifact dk.dma:dma-root-pom:pom:24 from/to dma-releases (http://repository-dma.forge.cloudbees.com/release/): repository-dma.forge.cloudbees.com and 'parent.relativePath' points at wrong local POM @ line 5, column 10: Unknown host repository-dma.forge.cloudbees.com -> [Help 2]
[ERROR]

Thanks

Regards,
Oki

Ais Message 1 not parsed properly

Following is the message I'm trying to parse:
!BSVDM,1,1,,B,33@nl?@01EPk<FDPw<2qW7`B07kh,0*5E

However, I keep getting an exception because the binArray is less than 168 in length. All other online decoders, decode this message properly.

Following is my code:

String msgNmea = "!BSVDM,1,1,,B,33@nl?@01EPk<FDPw<2qW7`B07kh,0*5E";
AisPacket packet = AisPacket.readFromString(msgNmea);
AisMessage msg = packet.tryGetAisMessage();

AisMessage1 msg1 = new AisMessage1(msg.getVdm());

Serial Connection?

The README Introduction suggests AisLib can handle AIS data arriving on a serial connection. Yet I don't see any classes anywhere that do indeed handle serial. Am I missing something here? I know Java's serial reading support is not perfect, and myself have used rxtx in the past, so expected to see use of that lib or similar in the AisLib dependency tree.

Message 24, Mothership MMSI

According to http://gpsd.berlios.de/AIVDM.html for auxiliary crafts, the mothership MMSI is transferred instead of the dimensions. Any support planned?

In order to read data in an extended Message class the message parsing should be done in parse(binArray), not parse() and BinArray should include methods reset() and skip(bits). Currently it is not practical to do the change in an extended class.

AisTcpReader has incomplete inheritance semantics

AisTcpReader has protected fields as well as important methods such as run() and connect(), indicating that it is intended to be inherited. But it has no way for an inheriting class to actually connect to a remote server as addHostPort() is package-private. This makes extending this class practically impossible.

The same applies for similar classes such as AisStreamReader.

AisMessage27 does not encode gnssPosStatus

AisMessage27::getEncoded returns a SixbitEncoder with 95 bits, missing the 1 bit gnssPosStatus field. Given AisMessage27::parse expects a BinArray with 96 bits, and reads gnssPosStatus, it seems this was an accidental omission, and it likely missed discovery due to #38.

cannot complete build using manual build process

good evening; cannot complete the build process using the instructions from #48 (comment)

E:\development\opt\nbspace-mars\AisLib\AisLib>mvn -e clean install -DargLine="-Djdk.net.URLClassPath.disableClassPathURLCheck=true"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for dk.dma.ais.lib:ais-lib-messages:jar:2.4
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ dk.dma.ais.lib:ais-parent:2.4, E:\development\opt\nbspa
ce-mars\AisLib\AisLib\pom.xml, line 70, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for dk.dma.ais.lib:ais-lib-communication:jar:2.4
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ dk.dma.ais.lib:ais-parent:2.4, E:\development\opt\nbspa
ce-mars\AisLib\AisLib\pom.xml, line 70, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for dk.dma.ais.lib:ais-lib-utils:jar:2.4
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ dk.dma.ais.lib:ais-parent:2.4, E:\development\opt\nbspa
ce-mars\AisLib\AisLib\pom.xml, line 70, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for dk.dma.ais.lib:ais-lib-cli:jar:2.4
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ dk.dma.ais.lib:ais-parent:2.4, E:\development\opt\nbspa
ce-mars\AisLib\AisLib\pom.xml, line 70, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for dk.dma.ais.lib:ais-lib-json:jar:2.4
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ dk.dma.ais.lib:ais-parent:2.4, E:\development\opt\nbspa
ce-mars\AisLib\AisLib\pom.xml, line 70, column 14
[WARNING]
[WARNING] Some problems were encountered while building the effective model for dk.dma.ais.lib:ais-parent:pom:2.4
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 70, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] AIS Parent [pom]
[INFO] AIS Messages [jar]
[INFO] AIS Communication [jar]
[INFO] AIS utils [jar]
[INFO] AisLib CLI [jar]
[INFO] AIS JSON Decoders [jar]
[INFO]
[INFO] ---------------------< dk.dma.ais.lib:ais-parent >----------------------
[INFO] Building AIS Parent 2.4 [1/6]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ ais-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven) @ ais-parent ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ ais-parent ---
[INFO] Installing E:\development\opt\nbspace-mars\AisLib\AisLib\pom.xml to C:\Users\ssdhaliwal.m2\repository\dk\dma\ais\lib\ais-parent\2.4\ais-parent-2.4.pom
[INFO]
[INFO] ------------------< dk.dma.ais.lib:ais-lib-messages >-------------------
[INFO] Building AIS Messages 2.4 [2/6]
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for dk.dma.commons:dma-commons-util:jar:0.5-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for AIS Parent 2.4:
[INFO]
[INFO] AIS Parent ......................................... SUCCESS [ 0.864 s]
[INFO] AIS Messages ....................................... FAILURE [ 0.114 s]
[INFO] AIS Communication .................................. SKIPPED
[INFO] AIS utils .......................................... SKIPPED
[INFO] AisLib CLI ......................................... SKIPPED
[INFO] AIS JSON Decoders .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.753 s
[INFO] Finished at: 2020-06-22T22:04:42-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ais-lib-messages: Could not resolve dependencies for project dk.dma.ais.lib:ais-lib-messages:jar:2.4: Failure to find
dk.dma.commons:dma-commons-util:jar:0.5-SNAPSHOT in http://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will n
ot be reattempted until the update interval of oss.sonatype.org-snapshot has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project ais-lib-messages: Could not resolve dependencies for project dk.dma.ai
s.lib:ais-lib-messages:jar:2.4: Failure to find dk.dma.commons:dma-commons-util:jar:0.5-SNAPSHOT in http://oss.sonatype.org/content/repositories/snapshots was c
ached in the local repository, resolution will not be reattempted until the update interval of oss.sonatype.org-snapshot has elapsed or updates are forced
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project dk.dma.ais.lib:ais-lib-messages:jar:2.4: Failure t
o find dk.dma.commons:dma-commons-util:jar:0.5-SNAPSHOT in http://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution
will not be reattempted until the update interval of oss.sonatype.org-snapshot has elapsed or updates are forced
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve (DefaultProjectDependenciesResolver.java:209)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:243)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failure to find dk.dma.commons:dma-commons-util:jar:0.5-SNAPSHOT in http://oss.sonatype.
org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of oss.sonatype.org-snapshot
has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:357)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve (DefaultProjectDependenciesResolver.java:202)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:243)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find dk.dma.commons:dma-commons-util:jar:0.5-SNAPSHOT in http://oss.sonatype.or
g/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of oss.sonatype.org-snapshot h
as elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:424)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:340)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve (DefaultProjectDependenciesResolver.java:202)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:243)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find dk.dma.commons:dma-commons-util:jar:0.5-SNAPSHOT in http://oss.sonatype.org/co
ntent/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of oss.sonatype.org-snapshot has e
lapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException (DefaultUpdateCheckManager.java:218)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact (DefaultUpdateCheckManager.java:193)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads (DefaultArtifactResolver.java:559)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:483)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:401)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:340)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve (DefaultProjectDependenciesResolver.java:202)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:243)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :ais-lib-messages

E:\development\opt\nbspace-mars\AisLib\AisLib>

AisMessage19 has duplicate property names AisStaticCommon

AisMessage19 has duplicate property names/is hiding several protected properties of its super class AisStaticCommon.
I consider this a bug since

  1. it breaks json serialization libraries such as Gson for no good reason.
  2. it is bad practice.

Question: Message Filtering

Hello dear Devs,

If I setup multiple readers without a AisReaderGroup and then register the same doupletFilter handler to all of them, are the messages synced?!

Like messageA sent to readerA is the same as messageA sent to readerB, would it be filtered out?! Or do I need both readers in a AisReaderGroup ?!

I am trying to listen on UDP Port for incoming Packets on that ports and additonally have some TCP Readers in ClientMode.

I am just building some Kind of AisUdpServer for that purpose. Are you interested in a PR for that?!

For the moment I created a UdpInputStream class because UdpDatagram does not have getInputStream() method like Socket has.

My weekend work will be intgrating UdpServerReader in ais-lib structure and extend from AisReader

Thanks in advance!

mablae

Outdated README

In the last section of the README file (Sending a message), the AisTcpReader is created with:

AisReader aisReader = new AisTcpReader(host, port);

But it's not working with the last version, it should be:

AisReader aisReader = AisReaders.createReader(host, port);

Out of sequence Error

Can someone tell me why I'm getting a sentence out of order error for the following messages?? This error happens on about 10% of my multi-line messages, and appears to be random.

Error is at dk.dma.ais.sentence.EncapsulatedSentence.baseParse(EncapsulatedSentence.java:98) (sorry, markup is affecting the strings, please see the attached text file)

multiline-errors.txt

Failed to parse AIS message: [!AIVDM,2,1,2,B,5815Lcp2DqaeKL7;O;45<j1=Tm0PtqV222222216ChPF:5oA0N5Dp40m888,0\*08, !AIVDM,2,2,6,B,p0kk3k8880,2*61]
dk.dma.ais.sentence.SentenceException: Out of sequence sentence: !AIVDM,2,2,6,B,p0kk3k`8880,2*61

Failed to parse AIS message: [!AIVDO,2,1,3,B,5EAP2F000000h5FT4MD4MD6222222222222220m0h:32000000<`0@0000,0*69, !AIVDO,2,2,4,B,88888888880,2*21]
dk.dma.ais.sentence.SentenceException: Out of sequence sentence: !AIVDO,2,2,4,B,88888888880,2*21

Failed to parse AIS message: [!AIVDO,2,1,2,B,5EATk202=WLC222222222222221I<P:66400050UCRiDRCQs,0*60, !AIVDO,2,2,5,A,88888888880,2*23]
dk.dma.ais.sentence.SentenceException: Out of sequence sentence: !AIVDO,2,2,5,A,88888888880,2*23

Failed to parse AIS message: [!AIVDO,2,1,0,B,5C9QRdP2>MRL@@tc:21HDL60ITpDr2222222221702D0G5eC0>l0@m0`8888,039, !AIVDO,2,2,2,B,@PC0ShH8880,20F]
dk.dma.ais.sentence.SentenceException: Out of sequence sentence: !AIVDO,2,2,2,B,@PC0ShH8880,2*0F

What is destination?

From the examples, to send a message we need to do something like this:

var aisReader = AisReaders.createReader(host, port);
aisReader.start();

// Make AIS message 12
AisMessage12 msg12 = new AisMessage12();
msg12.setDestination(destination);
msg12.setMessage("Hello");

But what is destination and how to use it?

Decoder issue with user Id (MMSI) and MsgId

When i run the sample in your documentation:

`Vdm vdm = new Vdm();

    vdm.parse("!AIVDM,2,1,9,B,53nFBv01SJ<thHp6220H4heHTf2222222222221?50:454o<`9QSlUDp,0*09");
    vdm.parse("!AIVDM,2,2,9,B,888888888888880,2*2E");
    
    AisMessage message = AisMessage.getInstance(vdm);
    Decoder decoder = new Decoder(message);
    String json = decoder.decode(false);
    System.out.println(json);`

I get the following

{"msgId":0,"repeatDFO":{"ais_value":0,"decoded_text":"Message has been repeated 0 times"},"userId":0,"callsign":"LFNA ","name":"FALKVIK ","shipTypeDFO":{"ais_value":79,"decoded_text":"Cargo-no-additional-information"},"dimBowDFO":{"ais_value":40,"decoded_text":"Distance from GPS antenna to bow 40 m"},"dimSternDFO":{"ais_value":10,"decoded_text":"Distance from GPS antenna to stern 10 m"},"dimPortDFO":{"ais_value":4,"decoded_text":"Distance from GPS antenna to port 4 m"},"dimStarboardDFO":{"ais_value":5,"decoded_text":"Distance from GPS antenna to starboard 5 m"},"versionDFO":{"ais_value":0,"decoded_text":"Station compliant with Recommendation ITU-R M.1371-1"},"imo":6514895,"posTypeDFO":{"ais_value":1,"decoded_text":"Gps"},"etaDFO":{"dateInMillis":1584189600000,"textDate":"Sat 2020 Mar 14 12:40:00 GMT "},"draughtDFO":{"ais_value":38,"decoded_text":"Draught is 3.8 m"},"dest":"FORUS ","dteDFO":{"ais_value":0,"decoded_text":"Available"}}

From several executions, this happens all the time.

Message Type 25 Not Implemented

I'm processing a satellite AIS feed (global coverage) and quite often we receive AIS Message 25 which fails to parse with an exception. Given that this is a valid AIS Message type I would think it should probably be implemented (unless there is a good reason not to).

Sending messages as a server

In our use case we want to set up a server for sending AIS message to 1 or more clients.
The server obtains the AIS data from a simulator. The messages are converted in the AIS format ans transmitted to any connected client. The client can be an operational system.

There is one small example at the end of the readme file using the AisTcpReader that sends a message to a given client with a known host and port number. We couldn't make this example working but we also searching for a simple setup for our use case. Can you provide an example on how to do this ?

Unconditional branch in EncodeTest::aisDecodeEncode

The following branch in EncodeTest::aisDecodeEncode is unconditional and prevents the test from verifying any message encodings:

if (!(msg instanceof AisPositionMessage) || !(msg instanceof AisMessage4)
        || !(msg instanceof AisStaticCommon)) {
    vdm = new Vdm();
    continue;
}

The branch is unconditional because the three classes are mutually exclusive subclasses of AisMessage, and the condition is equivalent to testing if msg is an instance of all three:

!(msg instanceof AisPositionMessage && msg instanceof AisMessage4
        && msg instanceof AisStaticCommon)

It appears the intention was:

if (!(msg instanceof AisPositionMessage || msg instanceof AisMessage4
        || msg instanceof AisStaticCommon)) {
    vdm = new Vdm();
    continue;
}

However, the purpose of this is conditional expression is unclear, so I cannot be certain this is correct.

Note:

Due to #35, the change above causes an exception when the test is executed, as one of the later statements calls msg.getEncoded() on an instance of AisMessage24.

Encoding ROT in messages 1,2,3

When encoding AIS messages using AisLib, (specifically for AIS Message 1,2,3). There's an inconsistency in ROT (Rate of Turn) value encoding and decoding. Despite setting ROT to a specific value (e.g., -4), the encoded message returns a different value (e.g., 1) after decoding.
Could you please confirm whether this inconsistency stems from a misuse of the library on my end, or is it an issue with the library?

AisLib packet.getTimestamp is null when used in spark environment

Hi,
I am using AisLib to parse Ais Messages in a apache spark environment backed by HDFS.
I am using few simple steps like

  1. parse the message.
  2. map only the timestamp and UserId of each message.
  3. Save it to HDFS.
    Result: I see that my timestamp(Date field) is null all along.
    PS: When I pretty print only few of my messages of the RDD the result looks just fine.

Message24 modern format

With new ITU spec (version 5) which came out in 2014, Message24 part B has been changed, compared to previous version. Specifically last 6 bits of part B message had been spare bits, but with version 5 first 4 bits are now indicating epfd filled. Should AisLib be updated for these changes ? I'd be happy to do a pull-request.

Error creating reader? Guava?

Hi,

Using AisLib for the first time, the build process seemed to work well, but upon creating the reader I'm getting an error:

(AisReader reader = AisReaders.createReader("localhost", 4001);)

Exception in thread "Thread-0" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;I)V
at com.google.common.net.HostAndPort.fromParts(HostAndPort.java:143)
at dk.dma.ais.reader.AisReaders.createReader(AisReaders.java:92)

Googling, seems like the culprit could be Guava, the version 21 is the one which seemed to have been installed... Is this a result from something on my end (used M2Eclipse to import and build) or is this an issue with AisLib and its dependencies?

Thanks!

Ha... It appears that it's caused by a class conflict, when run with only the jars generated by this project it works, but not within my greater project... So it's not an issue with AisLib.

AisLib 2.3 release?

Hi

It is 10 months since 2.2 release, my question is when 2.3 is due to be released.
I know that there are not any big changes but I need the two I have sent pull requests on ( #18 and #23 ).

Multiple Line Messages

Does this API support messages that are more than one line long? It looks like it should in the SentenceLine.java class but I cannot figure out how to send the encoded data into it to make it work. Perhaps documentation or code comments to suppliment?

Build Issues

image

Today I downloaded and attempted to compile and got the error you see in the screenshot I took. Following the advice of the admin here:

#48

I am able to compile without issue using the following commands...

git clone https://github.com/dma-dk/dma-developers.git
cd dma-developers/rootpom/
mvn clean install -DskipTests
cd ../..
git clone https://github.com/dma-enav/e-Navigation.git
cd e-Navigation/
mvn clean install -DskipTests
cd ..
git clone https://github.com/dma-dk/dma-commons.git
cd dma-commons/
mvn clean install -DskipTests
cd ..
git clone https://github.com/kaspernielsen/codegen.git
cd codegen
mvn clean install -DskipTests
cd ..
git clone https://github.com/MaritimeConnectivityPlatform/MaritimeCloud.git
cd MaritimeCloud
sed -i 's/0.1/0.8-SNAPSHOT/' mc-msdl/mc-msdl-javagenerator/pom.xml
mvn clean install -DskipTests
cd ..
git clone https://github.com/dma-ais/AisLib.git
cd AisLib/
mvn clean install -DskipTests

Is there still an issue with the artifacts for this project? I'm on Centos 7.6 and I'm running maven v3.6.2.

Group tag block is only partially read since 0bba7e1

The properties on CommentBlockLine besides the parameterMap (e.g. groupId) aren't populated anymore since commit "Correct parsing of the messages in comment block parameters that contains G and g" / 0bba7e1. I discovered this when upgrading in a unit test that checked those values on example nmea lines.

I don't understand that commit. The commit message claims it affects lines containing g and G, but it actually acts on comments that start with \g:. And the new code seems to be an alernative implementation of the same thing (extract tag keys and values, old code by iteration, new code using String.split), with the difference that it skips handling g, G specially, checksum handling and group-id.

From my understanding the old code was working correctly, however I assume something was fixed by that commit - could you please explain what that is.

AisLib v2.4 published with invalid dependencies to maven central repo

In the ais-parent-2.4 POM as being release and published to central maven repos, the dependency towards

  • dk.dma.enav:enav-util is defined with property dependencies.enav.version=0.6-SNAPSHOT and
  • dk.dma.commons:dma-commons-util is defined with property dependencies.dma.commons.version=0.5-SNAPSHOT

Please note the "-SNAPSHOT" suffixes, those are wrong. No such versions were published to maven central repos obviously, but the final ones, 0.6 (enav-util) and 0.5 (dma-commons-util).

This makes projects depending on AisLib 2.4 to fail on maven build.

This was fixed meanwhile with commit "Update dependencies" (8190d2c). But one is unable to pull the dependencies from the public maven repos as defined for the released version 2.4.

Please create and publish a new release having this fixed.

fasterxml/jackson dependency update?

I've been trying to pipe AIS messages into AWS kinesis using the AisLib library (which is fantastic by the way - thank you!) and the AWS sdk (aws-java-sdk-bom, version 1.11.220). Consuming the messages using AisLib works great but the code fails on the aws sdk code calls. It seems the aws sdk probably uses a more updated version of fasterxml:

Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.annotation.JsonProperty.access()Lcom/fasterxml/jackson/annotation/JsonProperty$Access;

When I build the project, the version of fasterxml installed is 2.4

<classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.4.0/jackson-annotations-2.4.0.jar"/>

It looks like 2.9.2 is the most up to date version, although I don't know which version the aws sdk is using. Are there plans to update the version of fasterxml/jackson that is being used? Or can you suggest a workaround that I could use?

AisLib is not building

While trying to build AisLib with maven, using the following command:
mvn clean install
I encountered some errors about the repository for parent pom project not being available:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for dk.dma.ais.lib:ais-parent:2.4-SNAPSHOT: Could not find artifact dk.dma:dma-root-pom:pom:24 in dma-releases (http://repository-dma.
forge.cloudbees.com/release/) and 'parent.relativePath' points at wrong local POM @ line 5, column 10
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project dk.dma.ais.lib:ais-parent:2.4-SNAPSHOT (/home/bushaev/dev/ais/AisLib/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for dk.dma.ais.lib:ais-parent:2.4-SNAPSHOT: Could not find artifact dk.dma:dma-root-pom:pom:24 in dma-releases (http://repository-
dma.forge.cloudbees.com/release/) and 'parent.relativePath' points at wrong local POM @ line 5, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

About AisReaders.class

Hey i downloaded jar of AisLib so, i was trying to execute all given example by you.
but i got to know in my jar AisReader class is not there when i was trying to create UPD of tcp connection to get MSG.
i am unable to do it please suggest me somthing

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.