Sunday, June 23, 2013

Building the Navigation Computer

Back in my discussions about chart plotters and other navigation equipment, you may recall that I've picked Rose Point Marine's Coastal Explorer as my primary charting software.  One of my side projects has been to sort out the computer that I'll use to run Coastal Explored (CE) along with a few other navigation related programs.  I'll have two computers in the pilot house, one dedicated to critical navigation tasks and locked down so random software isn't being installed, and with tightly controlled network access, all geared towards keeping the system reliable.  The second computer will be more casually controlled and be used for email, web browsing, music and videos, etc.  The goal is to have common hardware so if I need to cannibalize the casual system to repair the navigation computer, I can easily do that.

I'm a total convert to Macs.  I've suffered through every version of Windows since V1.0, and did so because there have always been a handful of apps that were only available on Windows.  All it took was one app to keep you from a Mac.  But all that changed with the advent of VMware Fusion and Parallels.  These programs let you boot and run windows as part of MacOS.  You can run Mac and Windows apps side by side.  This had broken the Windows stranglehold and allowed me to dump my PCs and never turn back.  Now I suffer though Windows only for the few apps that are still only run there.

OK, I'm done with the rant, but the bad news is that CE is one of those apps that only runs on Windows.  This unfortunate reality means that I either need a PC for the nav system, or a Mac running either Fusion of Parallels.  Since I prefer a Mac in every way, it's an easy decision, so I started putting together a Mac Mini.  It's a nice compact machine, has very low power draw, supports dual screens, etc.

There's another reason too.  Since the introduction of the iPhone, scrolling on handheld devices has been the reverse of a computer.  On a computer, the scrolling action moves the window over the document; scrolling down moves you towards the bottom of the document.  On a touch device you drag the document within the window; dragging down takes you towards the top of the document.  About a year ago, Apple changed the scrolling in MacOS to match the touch devices.  It was very disorienting at first, but seems completely natural now - at least until you get on a PC - then everything is backwards again.  One of the things I struggled with on the MaxSea laptop was the scrolling.  I'd scroll one way to zoom in or out, and it would go in the opposite direction from what I expected.  Add to that the redraw delay and I never knew if I was coming or going.  All this is a long way of saying that when you run a windows app via Fusion on a Mac, the scrolling on the windows app is consistent with the Mac scrolling, not the opposite, so everything works as expected.

The big remaining question has been how CE would run under Fusion or Parallels.  They both extract a performance penalty on the underlying windows app, and I wanted to be sure CE would be responsive, especially for scrolling and zooming charts.  Another concern was how well the various USB interface devices would work.  I've got three of them for this computer.  They are:

1) Rose Point's NMEA 2000 to USB converter.  This allows native N2K communications between CE and the rest of the boat.  There is no translating back and forth to NMEA 0183, and no resulting loss of information.  Since I started this project Rose Point really fleshed out their support for N2K, bringing it from a rudimentary implementation to a very complete one with all the requisite features for use on a larger boat with a more complex system.  I participated in the Beta program for this feature and have been using it on the Grand Banks since launching this spring, and it's working great.  This was one of the leaps of faith that I took with this whole nav system, and Rose Point didn't let me down.  Back to this particular interface, I picked the Rose Point device because there will be no excuses from Rose Point for it not working.

2) Maretron USB100 NMEA 2000 to USB converter.  I've had this device for a few years and historically use it to run Maretron's N2K utility program which is very handy for confirming proper operation of your N2K network and devices.  It also works with CE, but Rose Point says they cannot guarantee bug free operation because Maretron has stopped supporting third-party use of the interface.  This is what drove me to get the Rose Point Interface, but I continue to use the USB100 for the Maretron diagnostics program.

It's not only important that these devices work, but they also need to work properly through sleep/wake cycles, and shutdown/reboot cycles on the Mac.  Plus, they need to work through start/stop of Fusion, boot/shutdown of windows within Fusion, and suspend/resume of windows within Fusion.  In my experience, this sort of thing has always been problematic under Windows.  Layer in Fusion and MacOS and the risk only goes up.

I've never tried Parallels, but have been running Fusion for about 4 years now, so that seemed like the obvious starting point.  I've heard good things about Parallels and suspect it would work just as well as Fusion, but I've got enough new stuff to learn so I started with Fusion.

So, with the mini set up, Fusion installed, and CE installed, it was off to the races.

Fast forwarding ahead, the results are excellent.  CE's performance is more than acceptable.  The Apple wireless mouse and keyboard are small and comfortable to use, and the mini's form factor and low power use are well suited to a boat.

After getting everything working, I decided to do a few things to help ensure success.  The Mini that I bought was the lowest end model.  I figured if it ended up being too slow for CE, I could always move it over to be the second computer on the boat and get a faster one for the nav computer.  But performance wise it was fine so I decided to stick with it as the core computer.  However, I was running at the minimum recommended memory size, and I'm a bit worried about disk activity slowing things down when CE needs to fetch charts from the disk.  So I decided to pimp the machine out with max memory (16GB) and a solid state disk (SSD).  In addition to being faster, the SSD also draws less power than a spinning disk, and is immune to physical jostling around which happens on a boat.  I think this is a really good application for one.  Swapping memory on the Mini is a piece of cake, and 16GB only cost  $110.  Swapping the disk was a bit trickier, but with patience and the right size Torx drivers it's very doable.  I went with a 256G drive which is more than enough for this application, and it only set me back $190.  Now I have a smokin' fast, physically robust machine that runs CE like a champ.

But nothing is perfect, and I did discovered a few nits along the way.  The Mini can be powered down from the keyboard, but it can't be powered up.  You need to press the power button on the unit itself.  That's not conducive to mounting the computer in an out of the way cavity on the boat.  The last time I used a Mac desktop was back in the 90's, and at that time you could power it on from the keyboard.  I assumed that was still the case, but the salesman looked at me cross-eyed when I asked what had happened to that feature.  I haven't looked around yet, but it might be possible to have the Mini automatically boot when power is applied.  If so, I'll set it up that way, and I should be able to trigger a boot by cycling the power breaker.  The other issue is the SD card slot.  That's the means to move data between the Mini and the Simrad equipment, so it creates another need for easy physical access.  If the power button and SD card slot were on the front side of the Mini it wouldn't be so bad.  I could put them in a cabinet and have all the wires neatly dressed in the back, and the computer front with power button and SD card facing out.  But both the power button and SD slot are on the back side with all the wires, so access will be ugly and messing with SD cards and power buttons in close proximity to control cables is likely to result in dislodged cables and unreliable operation.  If I can solve the power-on problem, then I might get a panel mount SD reader that connects to one of the mini's USB ports.  That combination should allow for mounting the mini where it only needs to be accessed for service.

Another thing I need to sort out is backup of both computers and a procedure for quick fail over or replacement if the Nav computer dies.  This will be a project for another day once I have the second computer configured and working.

6 comments:

  1. It is certainly possible to set the Mac Mini to boot up when the breaker is toggled. It's a check box in System Preferences / Energy Saver called "Start up automatically after a power failure".

    ReplyDelete
  2. Great write-up, as per usual, PH. Thanks for sharing in such detail. It feels like we're building T2 with you. Also happy to hear that you've hit another epiphany with the monitors.

    ReplyDelete
  3. Oops. T3. Or will she get a different name?

    ReplyDelete
  4. Thanks Ced. It just going to be "Tanglewood".

    Regarding the monitors, it turns out to still be a serious moving target. I'm now looking at three widescreens, all the same. But the good news is that I think I finally found the right manufacturer/vendor. I hope to have an update in another week or so.

    ReplyDelete
  5. Unfortunately I've found that the Mac Mini cannot boot automatically when power is applied. The "restart after power failure" will cause it to autostart only if it was running when the powered failed. If you shut it down manually/intentionally, the only way to start it up again is with the power button. Some people have suggested running a couple of wires to a dash panel button and hooking them up in parallel with the power button. It's certainly a possibility to consider. But first I think I'll try putting it to sleep when not in use because you can wake it with any keyboard or mouse action. If that's too inconvenient, then I'll consider the button hack.

    Also, I tried the mini with two different resolution screens to see how that works, and it's really pretty good. Assuming you are mirroring the display which is what I would be doing, you can pick which screen you want the disktop to be based on. By pickign the smaller of the two screens, you get an image that's viewable on both screens. That will work to allow a smaller screen on the fly bridge and a bigger one in the PH.

    ReplyDelete

Make comments here