Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 09-08-2021, 14:06   #1
Registered User

Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,187
Get compass heading into my laptop?

Hi folks -

What's an easy way to get compass heading data into my laptop?

I have a custom software setup to do live true-wind computation, VMG, polar plot data collection, etc. It currently uses 2 sensors: A USB GPS and an NMEA-0183 connection to my wind sensor.

Relying solely on GPS heading is problematic for a number of reasons and I'm trying to figure out the easiest way to get compass heading into the PC.

I don't know if I'm just looking in the wrong places, the only workable solution I've found so far is getting an NMEA-2000 heading sensor ($$) and an NMEA-to-USB gizmo ($$). Its not just the price I don't love about that solution, it also seems like interfacing my custom software to the NMEA2000 network might be some effort, more effort than parsing NMEA-0183 sentences?

Any suggestions?
chris95040 is offline   Reply With Quote
Old 09-08-2021, 14:24   #2
Registered User
 
Reefmagnet's Avatar

Join Date: May 2008
Location: puɐןsuǝǝnb 'ʎɐʞɔɐɯ
Boat: Nantucket Island 33
Posts: 4,864
Re: Get compass heading into my laptop?

You need a flux gate compass with NMEA 0183 output and a USB RS422 converter. The former can be $$$. the latter is a few bucks on EBay. If you go the NMEA 2000 route, the latter also becomes $$$ because you'll need a gateway as well.


Edit.. If you're writing your own custom software, you might want to take a look at SignalK if you haven't already.


Edit #2. Just thinking about it, don't most phones include a magnetic compass? If you could get the data to stream over wifi, this could be super cheap to implement.
Reefmagnet is offline   Reply With Quote
Old 09-08-2021, 14:31   #3
Registered User
 
Sailmonkey's Avatar

Join Date: Sep 2009
Location: Houston
Boat: ‘01 Catana 401
Posts: 9,626
Re: Get compass heading into my laptop?

Do you have an autopilot? Why not just port the compass data from it to your computer.
Sailmonkey is offline   Reply With Quote
Old 09-08-2021, 15:36   #4
Registered User

Join Date: Jun 2020
Location: La Conner, WA, USA
Boat: Atlas Pompano 21
Posts: 90
Re: Get compass heading into my laptop?

Digital Yacht makes a flux gate compass (HCS100) that uses NMEA 0183. It's under $400. I've found it to be quite accurate if you're willing to put a lot of effort into calibrating it.
ScottRhodes13 is offline   Reply With Quote
Old 09-08-2021, 15:37   #5
Registered User

Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,187
Re: Get compass heading into my laptop?

Quote:
Originally Posted by Sailmonkey View Post
Do you have an autopilot? Why not just port the compass data from it to your computer.


Just a basic course-keeper (CPT). No external connectivity.
chris95040 is offline   Reply With Quote
Old 09-08-2021, 15:40   #6
Registered User

Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,187
Get compass heading into my laptop?

Quote:
Originally Posted by Reefmagnet View Post
You need a flux gate compass with NMEA 0183 output and a USB RS422 converter. The former can be $$$. the latter is a few bucks on EBay. If you go the NMEA 2000 route, the latter also becomes $$$ because you'll need a gateway as well.


Edit.. If you're writing your own custom software, you might want to take a look at SignalK if you haven't already.


Edit #2. Just thinking about it, don't most phones include a magnetic compass? If you could get the data to stream over wifi, this could be super cheap to implement.


Yeah the NMEA0183 heading sensors I’ve seen are like $600!?! I guess if it’s the only game in town that’s what I’ll do, I was just surprised since, as you note, they seem to be basic commodity items able to be thrown into iPhones for the hell of it.

The idea about having the phone relay the heading is very clever- but daunting since I haven’t programmed for the iPhone in years and suspect it’d take me several weeks to get that going.
chris95040 is offline   Reply With Quote
Old 09-08-2021, 15:43   #7
Registered User
 
Reefmagnet's Avatar

Join Date: May 2008
Location: puɐןsuǝǝnb 'ʎɐʞɔɐɯ
Boat: Nantucket Island 33
Posts: 4,864
Re: Get compass heading into my laptop?

Quote:
Originally Posted by chris95040 View Post
Yeah the NMEA0183 heading sensors I’ve seen are like $600!?! I guess if it’s the only game in town that’s what I’ll do, I was just surprised since, as you note, they seem to be basic commodity items able to be thrown into iPhones for the hell of it.

Ahh, but if it was a marine iPhone it would be $$$$$
Reefmagnet is offline   Reply With Quote
Old 09-08-2021, 15:45   #8
Registered User

Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,187
Re: Get compass heading into my laptop?

Quote:
Originally Posted by ScottRhodes13 View Post
Digital Yacht makes a flux gate compass (HCS100) that uses NMEA 0183. It's under $400. I've found it to be quite accurate if you're willing to put a lot of effort into calibrating it.


That looks promising- thanks!!
chris95040 is offline   Reply With Quote
Old 10-08-2021, 08:37   #9
Registered User

Join Date: Sep 2018
Location: Nanaimo, British Columbia, Canada
Boat: Currently boatless
Posts: 165
Re: Get compass heading into my laptop?

I don't know Android systems or PCs these days but the App store has sundry compass options for the iPhone and iPad.
Ken Pole is offline   Reply With Quote
Old 10-08-2021, 10:33   #10
Registered User

Join Date: Sep 2015
Location: Hailey, ID
Boat: Gulf 32
Posts: 712
Re: Get compass heading into my laptop?

Not sure what their output is or if you can even use it directly without the whole autopilot system, but what about a used fluxgate compass from an older autopilot? eBay shows Raymarine M81190 or Autohelm fluxgate compasses, if they directly output NMEA 0183 or some other easily parsed serial data might work?


(Disclaimer: I know they're for sale on eBay because I sold mine on eBay when I got too frustrated with trying to get it properly calibrated and moved on to Raymarine EV-1).


-- Bass
__________________
Hailey, Idaho & Bellingham, WA
Sailing blog: https://Sailing.PictureOfNectar.com
basssears is offline   Reply With Quote
Old 11-08-2021, 01:19   #11
Registered User

Join Date: Sep 2017
Posts: 1,075
Get compass heading into my laptop?

Custom software already?
Just spend $20 and buy an Arduino Nano 33 BLE. 10 minutes of programming will give you streaming 3 axis compass data into your laptop via USB or Bluetooth if you get fancy. Oh, and you can also get 6 axis attitude/acceleration from the same board, in case you want to measure the pitch and roll of your boat for giggles. You’ll want to put the tiny thing in a $5 case to be neat, I suppose.

Or spend hundreds.
cyan is offline   Reply With Quote
Old 11-08-2021, 04:01   #12
Registered User
 
thomm225's Avatar

Join Date: Aug 2011
Location: Lower Chesapeake Bay Area
Boat: Bristol 27
Posts: 10,553
Re: Get compass heading into my laptop?

Why is relying on a digital compass not problematic and GPS is?

Many of us have multiple GPS inputs into OpenCPN for example in case one fails then the one with the next closest priority comes online.

And you can have multiple computers with OpenCPN as well.

A Raspberry Pi can be had for like $50 and up. Used Laptops $225 and up.

Handheld compass for backup.
thomm225 is online now   Reply With Quote
Old 11-08-2021, 07:39   #13
Registered User

Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,187
Get compass heading into my laptop?

Quote:
Originally Posted by thomm225 View Post
Why is relying on a digital compass not problematic and GPS is?



Many of us have multiple GPS inputs into OpenCPN for example in case one fails then the one with the next closest priority comes online.



And you can have multiple computers with OpenCPN as well.



A Raspberry Pi can be had for like $50 and up. Used Laptops $225 and up.



Handheld compass for backup.


It’s not about redundancy. Direction the boat is pointing and direction of course over ground are two different things, and I need both.
chris95040 is offline   Reply With Quote
Old 11-08-2021, 07:50   #14
Registered User

Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,187
Re: Get compass heading into my laptop?

Quote:
Originally Posted by cyan View Post
Custom software already?
Just spend $20 and buy an Arduino Nano 33 BLE. 10 minutes of programming will give you streaming 3 axis compass data into your laptop via USB or Bluetooth if you get fancy. Oh, and you can also get 6 axis attitude/acceleration from the same board, in case you want to measure the pitch and roll of your boat for giggles. You’ll want to put the tiny thing in a $5 case to be neat, I suppose.

Or spend hundreds.


I’ve thought about that, but for me the fun of this project is the math and I’m trying to avoid diving down any other ratholes. You may be right about the effort level to get up and running, but then there’s getting the case right, the power supply right, debugging when the arduino suddenly stops spitting out the data, blah blah blah.

Still, a good suggestion I’ll consider, esp since having heel angle would be neat supplemental data in my polars: “Well, given the conditions, our fastest way there would be this sail config and this course, but we’ll be on our ears all day. Let’s do this one instead.”
chris95040 is offline   Reply With Quote
Old 11-08-2021, 14:18   #15
Registered User

Join Date: Sep 2017
Posts: 1,075
Re: Get compass heading into my laptop?

Quote:
Originally Posted by chris95040 View Post
I’ve thought about that, but for me the fun of this project is the math and I’m trying to avoid diving down any other ratholes. You may be right about the effort level to get up and running, but then there’s getting the case right, the power supply right, debugging when the arduino suddenly stops spitting out the data, blah blah blah.

Still, a good suggestion I’ll consider, esp since having heel angle would be neat supplemental data in my polars: “Well, given the conditions, our fastest way there would be this sail config and this course, but we’ll be on our ears all day. Let’s do this one instead.”
You previously mentioned wanting USB data to your laptop. Well, the Arduino (or Raspberry Pi) is already powered by USB. No “power supply” to get right. Plastic cases already exist for $5. It’s simply going to always run the last code you uploaded, every time you plug it in.

I used an Arduino Uno (with an IMU add-on board) to do a similar thing, but just for pitch/yaw/roll data in my boat. The code is just a few lines of C. The Nano model I mentioned instead has the IMU built in. Starting out, it could take you more like an hour if it’s your 1st time using the IDE, but wayyy simpler than Visual Studio with good instructions that a child could follow. I think there are even a few similar projects on this forum, but endless sample code, drivers, and help on the Arduino site.

The OpenCPN/Raspberry Pi suggestion upthread was a good one, as you don’t need to reinvent the wheel. However, if you really wish to do your own system, then my suggestion for compass data is a no-brainer. You could even go with a different model for additional GPS, etc.

If you’re into the math, then writing code to create a virtual compass gimbal out of the 3 axis data might be fun. If not, I’m sure it’s already been done, and the code is easy to find.
cyan is offline   Reply With Quote
Reply

Tags
compass, head, laptop


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TRUE heading shows 372 degrees when MAG Heading is 359...? PeterKissam OpenCPN 7 20-02-2019 09:46
Connecting heading sensor to laptop mwybo OpenCPN 16 04-02-2015 20:10
Compass Heading - True vs Magnetic Randyonr3 Navigation 54 27-07-2012 19:07
Compass Heading tuberider Electrical: Batteries, Generators & Solar 4 25-06-2012 05:30
Compass Heading tuberider Marine Electronics 1 24-06-2012 12:37

Advertise Here


All times are GMT -7. The time now is 15:41.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.