|
|
09-08-2021, 15:06
|
#1
|
Registered User
Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,223
|
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?
|
|
|
09-08-2021, 15:24
|
#2
|
Registered User
Join Date: May 2008
Location: puɐןsuǝǝnb 'ʎɐʞɔɐɯ
Boat: Nantucket Island 33
Posts: 4,897
|
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.
|
|
|
09-08-2021, 15:31
|
#3
|
Registered User
Join Date: Sep 2009
Location: Houston
Boat: ‘01 Catana 401
Posts: 9,627
|
Re: Get compass heading into my laptop?
Do you have an autopilot? Why not just port the compass data from it to your computer.
|
|
|
09-08-2021, 16:36
|
#4
|
Registered User
Join Date: Jun 2020
Location: La Conner, WA, USA
Boat: Atlas Pompano 21
Posts: 101
|
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.
|
|
|
09-08-2021, 16:37
|
#5
|
Registered User
Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,223
|
Re: Get compass heading into my laptop?
Quote:
Originally Posted by Sailmonkey
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.
|
|
|
09-08-2021, 16:40
|
#6
|
Registered User
Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,223
|
Get compass heading into my laptop?
Quote:
Originally Posted by Reefmagnet
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.
|
|
|
09-08-2021, 16:43
|
#7
|
Registered User
Join Date: May 2008
Location: puɐןsuǝǝnb 'ʎɐʞɔɐɯ
Boat: Nantucket Island 33
Posts: 4,897
|
Re: Get compass heading into my laptop?
Quote:
Originally Posted by chris95040
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 $$$$$
|
|
|
09-08-2021, 16:45
|
#8
|
Registered User
Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,223
|
Re: Get compass heading into my laptop?
Quote:
Originally Posted by ScottRhodes13
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!!
|
|
|
10-08-2021, 09: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.
|
|
|
10-08-2021, 11:33
|
#10
|
Registered User
Join Date: Sep 2015
Location: Hailey, ID
Boat: Gulf 32
Posts: 713
|
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
|
|
|
11-08-2021, 02: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.
|
|
|
11-08-2021, 05:01
|
#12
|
Registered User
Join Date: Aug 2011
Location: Lower Chesapeake Bay Area
Boat: Bristol 27
Posts: 10,929
|
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.
|
|
|
11-08-2021, 08:39
|
#13
|
Registered User
Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,223
|
Get compass heading into my laptop?
Quote:
Originally Posted by thomm225
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.
|
|
|
11-08-2021, 08:50
|
#14
|
Registered User
Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 1,223
|
Re: Get compass heading into my laptop?
Quote:
Originally Posted by cyan
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.”
|
|
|
11-08-2021, 15:18
|
#15
|
Registered User
Join Date: Sep 2017
Posts: 1,075
|
Re: Get compass heading into my laptop?
Quote:
Originally Posted by chris95040
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.
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|