Issue #1 resolved

Geolocation passes on too many comma's in RMC string

Anonymous created an issue

Thanks a lot for your code, which is sexactly what I need to run openCPN on a Delll Latitude 10 with windos 8.1.

However Geolocation passes on too many comma's in RMC string. The comma in the coordinates makes openGPS malinterprete the string. The following string $GPRMC,085344,A,1748,62,S,17843,34,E,,,261213,,*0B is transferred to opencpn as 1748.0000 N 000 0000.000 S SOG 34 kts COG --- etc

Is there a way to change the comma for probably a dot or nothing at all (whatever opencpn needs) ?


Comments (9)

  1. cltt77

    thanks for your work to make available this useful program.

    I found position's inconsitances on my Asus ME400 when running Opencpn ver 3.2 and 3.3 beta and your program's rel 4 and 5. The results are the same Both the latitude and longitude values provided by a GPS program I downloaded from the Windows Store are different from those of your program's UI. The Opencpn's nmea log screen looks receiving the same string your program outputs but, on both the Opencpn dashboard and on the map the longitude is zero (the Greenwich one).

    By the way the values provided by the other GPS program matches my physical and true location.

    I took a picture of my screen with all programs window visible but can't find how to attach to this comment. Help is welcome.

    A different subject: I noticed that there is no way, from your user interface, to quit your program and that, if it is run multiple time by mistake, it is installed in multiple active instantiation that can only be stopped by killing manually the processes or by a reboot.

    best regards Ettore

  2. petrsimon repo owner

    Thanks Ettore for you input, will have a look a it soon, as I am now busy with another project. You can quit the program by using the status bar icon. Right click on the icon and you'll see ;)

  3. Rick Sonntag

    FWIW, the GPS coordinates on my system (Lenovo Miix2) are showing correctly in both G-TCP and OpenCPN. I do have some problems when out of WiFi range, which I've described in issue #2.

  4. petrsimon repo owner

    I'll try to fix it soon, but now my tablet BT keyboard is busted and I can't get replacement here in Borneo where we are cruising how. Stay tuned.

  5. Kris De Decker

    The comma is indeed an issue in R5 I introduced the CultureInfo.InvariantCulture option as per Gabriel's advice The code is changed to nmea += latd.ToString("00") + latm.ToString("00.00", CultureInfo.InvariantCulture) + "," + lath + ","; nmea += lngd.ToString("000") + lngm.ToString("00.00", CultureInfo.InvariantCulture) + "," + lngh;

    This code outputs the decimal separator as a period - and solves the problem of the geolocation sending a wrongly formatted NMEA string to OpenCPN. Thanks for the program - for people that need the exe without warning dialog and with point decimal separator please drop a line a

  6. Log in to comment