The challenge here was to receive GPS and depth data using the CAN protocol.
The NMEA 2000 is a communication standard used for connecting between marine sensors and displays. The network runs at 250k bps using a binary message format sent in packets. NMEA 2000 runs on a Controller Area Network (CAN) technology. The National Marine Electronics Association (NMEA) controls the copyright over the standard. The network is a multiple-broadcaster and multiple-listener. The code below hasn't gone through the NMEA certification process and thus it may not coexist with other devices on the network.