Hacker News new | ask | show | jobs
by tonny747 1904 days ago
Looks like it has moved slightly https://www.vesselfinder.com/?imo=9811000
2 comments

It does seem that the compass heading of the ship is now closer to parallel with the canal. One of the things I wonder about (this all comes from AIS data), is that I have observed some ships only have accurate compass headings on marinetraffic and vesselfinder for the 'arrow' of direction when they are underway, at 4-5 knots or more, and other ships such as this one show compass headings when they are at a dead stop.
AIS transmission frequency and message contents are dependent on nav status and speed. Nav status is set by humans. Beyond a certain speed AIS ignores nav status and transmits underway messages at underway frequency. Its been a few years since I've had to read the specs so I dont quite remember the details of what changes in message contents. Im guessing that you are seeing some vessels that havent set an underway nav status.
It depends on the source of heading for the AIS device. If using GPS heading then yes, you need to be underway to calculate heading. If the AIS is using ship heading then it should always be available. The AIS spec is mature but unfortunately not much guidance was given for the installation.
On commercial vessels it's simply linked through NMEA 0183. Heading information usually are provided by either a gyro compass, gps compass or fluxgate compass. Depending on size of vessel, legal requirements and so on.
More likely NEMA2000 which is on CAN, as opposed to serial (not RS232, but only an electrical engineer can understand the difference). CAN vs serial requires different message formats, but the difference is irrelevant if you don't have to implement it. (I've personally had to implement both)
Surprisingly much of the commercial style SOLAS equipment still sadly runs on NMEA 0183. It is a real hassle if you have a split system with some converters not liking each other, different baud rates for "high speed(!!!)" and so on. Ugh. Been there done that.

Like the Sailor 6222 Class A GMDSS VHF which is found in loads of commercial vessels and still is their "newest" model. That only accepts NMEA 0183 inputs.

I wouldn't be surprised if that "much" was "most." I did a couple of small projects for a commercial fishing vessel a few years back to ingest NMEA0183 sentences and convert them to an AIS message (I think he was connecting it to a newer chart plotter that only had AIS input).

I recall asking if this functionality wasn't available off the shelf and the answer was that it existed, but it was difficult without also buying a lot of new equipment he didn't need. It apparently cost a lot less to have me do the data conversions (and I didn't charge much for it) on a small SBC than it would to have to buy new equipment and deal with installation, fitment issues, etc.

Agreed. these ships are full of electronic sensors... but the tech installed the AIS transponder what did he use for heading? the ship gyro or one of the dozen gps receivers installed. This was not well defined and sloppy. Nobody asked questions..you just wanted to be compliant. They were not initially thrilled about being constantly tracked. Ideally always use the GYRO.. dont complicate life using GPS heading. If the gyro is out the ship is anchored most likely.
You can get accurate heading from GPS by placing two receivers far apart from each other. It would be sorta silly to do on a smaller ship, but a big ship would likely have multiple GPS receivers anyway.
It would be interesting to try as a DIY project on a small ship, for an electronics experiment... Since high quality GPS+Glonass receivers with the ublock m8n chipset are like $35 a piece now, and have standard UART interfaces on them. You could find a very small IP69 rated enclosure, connect one at the front of the ship to a small arduino with a RS485 link or ethernet back to some electronics in the pilothouse.
If you do this, do read up on Kalman and/or particle filters to stabilize the output and maybe even add in an IMU module. GNSS sensors have a fair amount of variance from atmospheric disturbances, so their reported position can jump around a fair bit. If you are out of range of DGPS stations you can have errors of 1-2m easily, which could lead to jumps in perceived course of tens of degrees.
Better yet, ignore Kalman filtering and read up on RTKLIB. You want moving baseline for this and you need some receivers that will give you raw measurements. Basically if you're trying to measure the distance between two GPS receivers that are relatively close together much of the error will be the same so measuring the delta between them is highly accurate. Here's a guy who did this on a kayak and the accuracy was quite good with only a 3m baseline.

https://community.emlid.com/t/using-a-pair-of-reach-units-as...

He was post processing the data, but part of RTKLIB is RTKNAVI which is real time and I haven't used it but in theory I'd think RTKNAVI would support moving baseline as well. Post processing should be slightly more accurate as you can use measurements in the future as well but it should still be very accurate real time.

Two receivers in the same general location tend to see the same atmospheric distortion, so a naive solution for demonstration purposes can still work well assuming the receivers mostly use the same satellites. No need to make an experiment for fun more complicated than you want to, although filters can be fun!

As others have mentioned, There's much better you can do if you're going for optimal and you have the raw satellite timing information from both receivers.

You can go to the extreme and build a full blown IMU that's tolerant to GPS outages. If it's sensitive enough, you can even measure the rotation of the planet. Big expensive ships presumably have that. The boats on a tracker that glitch their orientation when stopped seemingly don't have that, or at least don't have it integrated with that tracking system.

The issue here is less about the GPS signals and more about the math to compute heading. Its complicated, we did this in the early 2000's for ship pilots (portable heading system) in the US with mixed results. By the way you can get heading, COG and rate of turn. Rate of TURN is really what these pilots use from what I understand. (give you future prediction of bow / stern)
A single receiver with two frontends/antennas at arms length sharing a clock could probably determine direction fairly well. That’s no arduino process as you would have to implement the receiver from scratch to do this.
Those things exist, and they work pretty good. I don't know if they have a single receiver or a separate receiver for each antenna. Examples:

http://www.jrc.co.jp/eng/product/lineup/jlr21_31/pdf/JLR-21....

https://comnav.com/wp-content/uploads/2018/10/WEB_GNSS-G2G2B...

A traditional gyrocompass is the more common option though, I think.

A purpose-made device that estimates orientation by measuring the phase shift in the GPS carrier waves would be pretty cool. GPS receivers synchronize their internal clocks to GPS time within nanoseconds anyway, though, so it seems like getting raw timing data from two receivers and processing them together is still pretty good and doable without having to DIY a GPS receiver.
Well this is just how GPS works. Each satellite broadcasts what time it is and you calculate your position by knowing the orbit of each satellite and the varying delays in “now” timing received from a few satellites because of the speed of light and a few higher order effects.

That can get you xyzt position, if you want your three dof direction too, a second receiver/fe/antenna can do a second fix and the differential between the two can be used to find the orientation.

You can do this with a smaller antenna separation better by going down the stack into the guts of the receiver math but it’s difficult because these things are implemented in hardware and encumbered by arms control regulatory hurdles.

same general concept as antenna alignment tools used by tower climbing contractors. It has both magnetic compasses and several GPS receivers in it.

https://www.viavisolutions.com/en-us/products/3z-rf-vision

Ships usually have inertial measurement units for heading and attitude. Even smaller boats have IMUs for better autopilot performance, but vessels of this size have sensors precise enough for strap-down navigation with little enough drift to bridge potential GPS outages.
Many ships, and certainly all large oceangoing vessels, transmit both course over ground (direction of motion) and heading (direction the bow is pointed). Sites like MarineTraffic and VesselFinder use the heading to draw the vessels on the map in the correct orientation, but in the vessel details they only display the course over ground as far as I can see.

Inland-only vessels don't always have a gyrocompass or GPS compass, or don't have it connected to the AIS transponder, in which cases they only transmit course over ground and not their heading.