-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing Message2 #13
Comments
True, but I like keeping them all as separate parse functions for consistency instead of cluttering up a common parser with extra logic.
They are the raw 1/10000 positions value with sign. In C there is a pos2ddd function that converts them to decimal lat/long but it looks like I never wrote the equivalent function for Java. It would probably go in the Position class.
Correct, for the most part aisparser just presents the raw values to the user and lets them decide how they want to deal with them.
I don't remember anymore :) But my current philosophy is to change as little as possible while cleaning things up and adding tests. There are quite a few people using this codebase so I'd like to get better tests in place first, do a new release (I tagged my old one from 2015 as v1.0.0 today), then we can start changing the API. This will give people a better update path if they want to take it.
IIRC I wrote this using Eclipse. These days I use vim with 4 spaces everywhere (except for Go which insists on tabs), so if there is a java tool like go fmt that will reformat things in a nice consistent way feel free to include that. |
Taking a quick look at adding a test for Message2 and getting some suspicious results. Couple of surprising things that I see:
longitude
andlatitude
in message and position are confusing at it seems that are confusing names as they aresigned 1/10000 degree position
and longsThis is also an example of junit4 with test discovery and a touch of cleanup. I did a by hand conversion of tabs to 4 spaces as tabs cause endless tool troubles for me. Would be maybe best to pick a formatter tool and setting and use that?
Thoughts?
The text was updated successfully, but these errors were encountered: