Forums > Windsurfing   Gps and Speed talk

Hope for a GPS alternative

Reply
Created by boardsurfr > 9 months ago, 1 Dec 2017
decrepit
WA, 12093 posts
31 Mar 2018 12:17PM
Thumbs Up

Ok I think you can add me to the experimenters list, The local Jaycar shop has Pi kits, so I'm thinking of buying one next week.
So ubox7 or 8?

I'm also tossing around the idea of a streamlined helmet, (like the time trial cyclists wear), attachment to house it all in, with the antenna on top and the gubbins behind, that should enable a big exposed antenna and a decent size battery.
For Kato we'll need to work out how to incorporate two of them.
Can the Pi log two antennas at once?

sailquik
VIC, 6090 posts
31 Mar 2018 6:02PM
Thumbs Up

Good one Mike!
Definitly go the Ublox8 unless M9 modules become available.
Whether the Pi could log two GPS? I don't think it would need much processing power. Just the ability to handle writing the data. I would assume there is some specs somewhere about how fast it can write to it's micro SD card?

boardsurfr
WA, 2312 posts
1 Apr 2018 2:48AM
Thumbs Up

Select to expand quote
sailquik said..
Whether the Pi could log two GPS? I don't think it would need much processing power. Just the ability to handle writing the data. I would assume there is some specs somewhere about how fast it can write to it's micro SD card?

Good question. SD card writing should be fast enough, and the cpu should also be fast enough, but it's a single-core cpu in the Pi Zero, which could cause problems. So far, I have not been able to record 18 Hz data reliably, although that could be due to the USB-serial interface, or the logging code, or other things. 5 and 10 Hz seems to work much better. But the logging code could be optimized - right now, it writes what it gets right away. Theoretically, we probably could keep all data for a session in memory, and write everything at the end (at least for regular sessions at 5 Hz - not sure about very long sessions and higher rates).

On the bright side, I found that I can reduce the energy consumption while logging to around 100 mA by turning off HDMI output and WiFi, and turning things back on (automatically from a script) when done. That means recording times should be pretty decent with a 2000 or 3000 mAh battery.

srtgumbee
111 posts
1 Apr 2018 6:10PM
Thumbs Up

Good job getting the power down

You may know and have tried this already but SD cards are fast at dealing with large chunks of data, but not so much with small chunks. If you are writing the data straight to the SD card as it comes in then it could be the SD card's write latency causing problems. SD card write latency is typically 10 to 50ms but is random and sometimes gets up to 250ms. @18hz (55ms) you would most likely have issues, but @ 10hz (100ms) you would most likely have no issue.......until you start analysing large amounts of data and run into issues with the odd large delay (eg 250ms) when the SD card is 'doing its internal cleaning' and your wanted data does not get written, instead it gets over written by the next incoming data sentence.

You metioned holding data in memory eg a FIFO buffer then writing to the SD card, this would be a way of getting around this. You can write to the SD from the buffer all the time and as long as the buffer is big enough it will cope with any long write delays. Just thought I would metion this in case you haven't tried this already.

boardsurfr
WA, 2312 posts
1 Apr 2018 8:45PM
Thumbs Up

Writing larger chunks is probably a good idea. As it is, it (probably) writes one UBX sentence at a time, and then flushes buffers. That was so to reduce the chance of file corruption due to power problems, but it can effectively circumvent buffers the OS uses to deal with latency issues. But it's also quite possible that the problem arises somewhere else, e.g. in the serial-to-USB converter. Some of the drivers are known to be buggy or have problems if the rate is too high or too low. But 18 Hz is not that attractive, anyway - it means you can use only GPS, not the other sat systems, and you'd get fewer satellites. That's likely to reduce signal quality. The theoretically possible accuracy gain you could get by going from 10 Hz to 18 Hz for windsurfing is minimal, anyway. If anything, higher rates are more likely to lead to overly optimistic accuracy estimates when using Gaussian error propagation, since the errors of adjacent data points are not sufficiently independent. That starts to become visible at 5 Hz already.

fangman
WA, 1528 posts
1 Apr 2018 10:57PM
Thumbs Up

Select to expand quote

boardsurfr said..
......
On the bright side, I found that I can reduce the energy consumption while logging to around 100 mA by turning off HDMI output and WiFi, and turning things back on (automatically from a script) when done. That means recording times should be pretty decent with a 2000 or 3000 mAh battery.



Some power consumptiom tips :-)

www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-power

www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-conserve-energy

boardsurfr
WA, 2312 posts
2 Apr 2018 4:27AM
Thumbs Up

Select to expand quote


Yup, that's what I had found, too. The VK172 USB dongle seems to need about 20 mA. Add the 80 mA he reports, and you end up with the 100 mA I saw.

I also have to make a few corrections of statements I made earlier.
- Recording at 18 Hz is not a problem after increasing the baud rate of the "serial" USB port on the Pi-side. Not sure why that's needed, put it seems to work. Edit: Nope, two tests were fine, but I just had a test where every second point is missing. Will need more tests.
- I thought the ublox 7 could use GPS + GLONASS satellites, but it's either-or, not both at the same time. So the ublox 8 has a definite advantage there, some (many?, all?) ublox 8 chips can use both at the same time. They also can use GPS + Galileo, which apparently is easier.

Andrew was definitely right about the Bluetooth setup being easy, I had things hooked up on a breadboard in a few minutes, and got data in a Bluetooth terminal app on the Android phone a few minutes later. Grabbing the data with a logger app also seems very straightforward, but I have not yet gotten around to doing that. Had some wind and decent weather today :-).

Here's a picture of the Pi Zero (the white box) and the dongle with a 2500 mA slim battery, which should be good enough for about 24 hours:

The battery is not quite the right thing, since it does not have a switch, so you have to unplug and re-plug the Pi to start it. It's set up to patiently wait for a dongle connection when turned on, start logging when a dongle connects (after configuring the ublox chip), and shutdown a couple of minutes after the dongle is unplugged.

decrepit
WA, 12093 posts
2 Apr 2018 1:57PM
Thumbs Up

Looks good and simple Peter, neat job.
My concern at the moment is the water proof case.
I doubt I can make a reliable seal in a big enough opening to get everything in and out of.
That case of yours, looks great, with a big clamp.
Does it have a name?
I'll see what I can find here.

kato
VIC, 3398 posts
2 Apr 2018 9:40PM
Thumbs Up

Is all that hooked up to a phone as well ??.

boardsurfr
WA, 2312 posts
2 Apr 2018 9:21PM
Thumbs Up

Select to expand quote
decrepit said..
That case of yours, looks great, with a big clamp.
Does it have a name?


The one in the picture is an Otterbox Pursuit 20 I bought in 2013. They don't seem to make this anymore. If I'd use it on the water, I'd put all the electronics inside a zipper bag. With the Pi Zero, all the parts are small and thin. Maybe I'll gut an old Android phone I have and use the shell to put stuff in :-).

Select to expand quote
kato said..
Is all that hooked up to a phone as well ??.


No, but theoretically, it could send data to a phone over Bluetooth. Not sure how attractive that is, since you'd have to wear two armbands. It would be easier to add some kind of display to the Pi, although that probably would break the plug-and-play simplicity.

decrepit
WA, 12093 posts
3 Apr 2018 3:10PM
Thumbs Up

Thanks Alby, that should do the job.
I've just bought a new "austrail" camel pack, it looks as if it's made from non absorbent material. So with any luck a gps may work inside it. I'll test it next time I sail. That box will sit in one of the back pockets nicely.

decrepit
WA, 12093 posts
3 Apr 2018 3:14PM
Thumbs Up

Pi zero starter kit ordered.
Now I have to find a U-blox 8 and antenna, any hints?
There's so much different stuff out there, I'm not sure what I need.
U-blox Australia only sells in bulk, and I can't see any antenna details on what they have anyway.

sailquik
VIC, 6090 posts
3 Apr 2018 10:54PM
Thumbs Up

decrepit said..
Pi zero starter kit ordered.
Now I have to find a U-blox 8 and antenna, any hints?
There's so much different stuff out there, I'm not sure what I need.
U-blox Australia only sells in bulk, and I can't see any antenna details on what they have anyway.






You actually are far better off getting the 'Module' which has the GPS chip already installed on a board.

see the ebay links above.

Edit: No, here is a cheaper one the same (there are quite a few selling on eBay): https://www.ebay.com.au/itm/NEO-M8N-NEO-M8N-Flight-Controller-GPS-Module-For-PX4-Pixhawk-V2-4-5-APM2-56-APM-/282570850732?_trksid=p2349526.m4383.l4275.c10

Or if you are happy with the M7 and want to follow Peters project, here is the USB device: www.ebay.com.au/itm/VK-172-Ublox7-USB-Receiver-GPS-Smart-Antenna-Gmouse-Glonass-Windows-PC-Laptop/192104715999?hash=item2cba5556df:g:eWgAAOSwCU1Yom9b

The big advantage of the M8 is that it can work multi GNSS @10Hz.

boardsurfr
WA, 2312 posts
3 Apr 2018 9:06PM
Thumbs Up

Select to expand quote
decrepit said..
Pi zero starter kit ordered.
Now I have to find a U-blox 8 and antenna, any hints?
There's so much different stuff out there, I'm not sure what I need.
U-blox Australia only sells in bulk, and I can't see any antenna details on what they have anyway.


It depends on whether you will write your own code, or want to use mine. My code requires a USB connection. I plan to look into using the GPIO pins sometime, but that probably won't happen for at least a month. However, you could use a serial-to-USB converter.

You can order a whole lot of ublox 8 chips directly from China via Aliexpress or similar web sites, but I have not used them. Shipping to the US takes a long time (up to a month), but Australia may be faster. I found lots of ublox 8 setup in online drone supply stores. I guess you should have those in Australia, too?

Otherwise, if you just want to get started quickly, get a VK172 or VK162 USB mouse. They are really easy to get from lots of different sources here in the US, so I assume getting them in Australia should not be too hard. Both have ublox 7 chips, which are most likely still better chips than what's in the Locosys GPS units. The VK172 has an 18x18x2 mm mm antenna, the VK 162 has a 25x25x4 mm antenna. The VK 162 has a long cable, but you can shorten that. The dongles and other ublox chips here are usually 1/15th or so of the price of a GW-60, so get a few .

sailquik
VIC, 6090 posts
3 Apr 2018 11:19PM
Thumbs Up

Have you used and configured the VK162 mouse Peter?

boardsurfr
WA, 2312 posts
3 Apr 2018 9:22PM
Thumbs Up

Select to expand quote
sailquik said..
The big advantage of the M8 is that it can work multi GNSS @10Hz.


That certainly could be a big advantage, especially for folks sailing on mountain lakes. When trying to see what the effect of that is, I discovered that I have to update the firmware to version 3.01 on my ublox 8 module first; the older firmware does not support any simultaneous use of different networks, nor does it support Galileo. I bought the thing in 2016, and the multi-GNSS firmware was released in 2017. Modules bought now should come with the new firmware.

boardsurfr
WA, 2312 posts
3 Apr 2018 9:29PM
Thumbs Up

Select to expand quote
sailquik said..
Have you used and configured the VK162 mouse Peter?


Configured, yes. It has an EEPROM, so it seems to keep the configuration better than the VK172. Use was limited to checking the satellites and SDoP indoors. I did not see a difference, but that does not mean much, it needs longer outdoor tests.

I had the thing lying around a while, but thought it was a ublox 6. Apparently, they upgraded to ublox 7 at some time. The box still says "5 Hz", but it can definitely do 10 and 18 Hz. Cool, since that will make the antenna comparison easy.

boardsurfr
WA, 2312 posts
3 Apr 2018 9:32PM
Thumbs Up

I also really liked the simple approach to waterproofing in the VK162. It's only IPX6, but that's good enough for use in a waterproof bag or box. Brought the FlySight back to my mind.

boardsurfr
WA, 2312 posts
3 Apr 2018 9:34PM
Thumbs Up

Here's another interesting approach to waterproofing (skip forward to 11:20):

.be&t=680

elmo
WA, 8723 posts
3 Apr 2018 9:44PM
Thumbs Up

Yep, Good stuff that liquid tape, got a can in my shed.

Can get it from
www.jaycar.com.au/liquid-electrical-tape-thread-locker-red/p/NM2834
www.jaycar.com.au/liquid-electrical-tape-thread-locker-black/p/NM2832
www.supercheapauto.com.au/

decrepit
WA, 12093 posts
3 Apr 2018 10:02PM
Thumbs Up

Select to expand quote
boardsurfr said..
>>>>

It depends on whether you will write your own code, or want to use mine. My code requires a USB connection. I plan to look into using the GPIO pins sometime, but that probably won't happen for at least a month. However, you could use a serial-to-USB converter.>>>>


Definitely I'd like to use your code for starters anyway.
The last time I programed anything it was machine code on a tape recorder.
Getting up to speed with python could take a very long time!
So I'll look for a module with USB.
Yoyo has offered me a lend of his usb dongle, so that should get me started,

decrepit
WA, 12093 posts
3 Apr 2018 10:23PM
Thumbs Up

sailquik said..
>>>>>>>>>

>>>>>>>

Edit: No, here is a cheaper one the same (there are quite a few selling on eBay): https://www.ebay.com.au/itm/NEO-M8N-NEO-M8N-Flight-Controller-GPS-Module-For-PX4-Pixhawk-V2-4-5-APM2-56-APM-/282570850732?_trksid=p2349526.m4383.l4275.c10

Or if you are happy with the M7 and want to follow Peters project, here is the USB device: www.ebay.com.au/itm/VK-172-Ublox7-USB-Receiver-GPS-Smart-Antenna-Gmouse-Glonass-Windows-PC-Laptop/192104715999?hash=item2cba5556df:g:eWgAAOSwCU1Yom9b

The big advantage of the M8 is that it can work multi GNSS @10Hz.


Thanks Andrew, $20 with faster postage, didn't want to wait until June!
But no USB, I'l have to figure out how to connect an adapter, but that shouldn't be too hard.

boardsurfr
WA, 2312 posts
4 Apr 2018 12:26AM
Thumbs Up

Select to expand quote
decrepit said..
Definitely I'd like to use your code for starters anyway.
The last time I programed anything it was machine code on a tape recorder.
Getting up to speed with python could take a very long time!

I use Java at work, so my code is in Java. There are a couple of little Python scripts to launch the app and shut down the Pi after the dongle is disconnected, but they are pretty trivial. I'll try to put the stuff that you'd need together within the next couple of days, and post links on my blog.
Eventually, this probably should be a regular open-source project, hosted on Github or similar. But since I have zero experience there, I'll start with a few downloadable files.

boardsurfr
WA, 2312 posts
4 Apr 2018 7:27AM
Thumbs Up

Brief instructions and the code needed to get started are now available at www.ecwindfest.org/GPS/

If anyone fluent in Java wants access to the sources, send me a PM. Anyone not fluent in Java who plays around with it and would like to have something changed, also send me a PM. It may take me a few days to respond since I'll be traveling.

tbwonder
NSW, 649 posts
4 Apr 2018 9:32AM
Thumbs Up

I am attempting to follow the general gist of this thread.
My understanding is the problem with off the shelf solutions (Garmin/Suunto watches etc) is that they do not provide Doppler speed data or satellite position data. I assume that this data is available from these uBlox devices. Do these ublox devices simply output everything in a data block or do they need to be configured to output Doppler speed and Satellite Position data?
Are there any off the shelf GPS data loggers that use Doppler for speed?
I would have thought that devices like this racing.qstarz.com/Products/BT-Q1000eX.html used for car racing would require good speed accuracy, but I don't see any mention of Doppler speed.

sailquik
VIC, 6090 posts
4 Apr 2018 10:41AM
Thumbs Up

There are some GPS loggers can record Doppler speed in NMEA data like the Q1000. There are one or two sports watches that can also record Doppler speed data. What they don't record is the accuracy data, or error data (which we originally labeled SDOP) which is essential for verification and evaluation. Ublox GPS can easily be configured to output .ubx data that does include this and much more. Unfortunately, there are very few GPS consumer loggers yet that use Ublox GPS chips. And the few that are available are pricy.

There are other important factors as well, such as the sensitivity of the antenna and the recording interval.

boardsurfr
WA, 2312 posts
4 Apr 2018 9:15AM
Thumbs Up

Select to expand quote
tbwonder said..
My understanding is the problem with off the shelf solutions (Garmin/Suunto watches etc) is that they do not provide Doppler speed data or satellite position data. I assume that this data is available from these uBlox devices. Do these ublox devices simply output everything in a data block or do they need to be configured to output Doppler speed and Satellite Position data?


That was correct many years ago, at least with respect to Doppler speed. Nowadays, it is somewhere between possible and very likely that various GPS thingies use Doppler speeds. The problem is that almost none of them provide accuracy estimates. Without accuracy estimates, artifacts in speed data often cannot be detected. I have seen many examples of such artifacts, and most of them were detected using accuracy estimates. The Locosys units have always provided accuracy estimates, from the GT-11 to the GW-60. Devices that use ublox GPS chips can also provide them, as long as it is possible to get data in the ublox-"native" .ubx format.

Select to expand quote
tbwonder said..
I would have thought that devices like this racing.qstarz.com/Products/BT-Q1000eX.html used for car racing would require good speed accuracy, but I don't see any mention of Doppler speed.


Getting good accuracy in car racing is much easier than getting good accuracy in windsurfing. There are many reasons for this, including that it is easy to fix the GPS so that it always has a good view of the sky, and that is is possible to use relatively large antennas. The biggest causes of accuracy problems in GPS speedsurfing are related to some or all GPS satellites being blocked by body parts or (after crashes) by water, and (especially for "max speed") to crashes. For example, my wife saw 40 knots on a doppler GPS the first time she used a speed board - it was from a fantastic catapult.
There are some filters that can be used to find some of these artifact even without accuracy estimates, for example acceleration filters. However, these are nowhere near as good as accuracy-estimate based filters.

For just getting an idea about how fast you're going, many GPS thingies will do a decent job most of the time - maybe even 19 out of 20 sessions. But if you only look at the screen numbers, chances are sooner or later you'll believe that you were much faster than a more careful analysis supports. Maybe that's not even bad, it may make you happy (until someone else explains to you in detail why your 30 or 40 or 50 knots were not real). But in the GPS Team Challenge, there are 15-20+ teams posting sessions every day, with 6 categories - with multiple sailors posting per team, that's already a few hundred data points. Over each month, that's a several thousand data points! The monthly rankings are composed out of the top 500-600 results (6 categories x 40-50 teams x 2 sailors). Even if just a small percentage of these was a few knots too high, it would affect the rankings of just about every single team. That's why the rules regarding which GPS to use are strict on the GPS Team Challenge.

fangman
WA, 1528 posts
4 Apr 2018 10:52AM
Thumbs Up

As Boardsurfr mentions in his instructions; Mac users will need a Apple Filing Protocol (AFP) fileserver. The suggested solution is an Open Source project called Netatalk. The tarballed file is available here:

sourceforge.net/projects/netatalk/?source=navbar

decrepit
WA, 12093 posts
4 Apr 2018 1:20PM
Thumbs Up

boardsurfr said..
Brief instructions and the code needed to get started are now available at www.ecwindfest.org/GPS/

If anyone fluent in Java wants access to the sources, send me a PM. Anyone not fluent in Java who plays around with it and would like to have something changed, also send me a PM. It may take me a few days to respond since I'll be traveling.


Thanks Peter. That sounds reasonably easy.
No doubt I'll have more to say once all the bits arrive.



Subscribe
Reply

Forums > Windsurfing   Gps and Speed talk


"Hope for a GPS alternative" started by boardsurfr