"NMEAOpen: Opens the NMEA data port. The GPSSerial port does not have to be open to use this port."
Your analysis is correct. In the early pre-release versions, if I remember correctly, they were logically separate. I think I did a simplification of the physical Serial Port handling at some time so only GSPSerial touched it and didn't get it quite rightNMEA was in some way seperate to the GPS Serial COM port
So here is a compatible solution, the GPSSerial library. It looks like GPSDriver to the code but hiding underneath is a SerialPort like in the Serial2 library. Porting code between the two should be a matter of changing your objects to use the correct library and altering the Open method which is the only one that differs between the two libraries.
... I'm happy to post the code if needed.
My guess is that you have got both GPSDriver and GPSSerial added as components on the desktop side? If so then I am afraid that it won't work because GPSSerial, intentionally, looks like GPSDriver and you will get a namespace clash.
You will need two projects, one for the device with GPSDriver added as a component to both desktop and device, without GPSSerial, and one for the desktop with GPSSerial as a desktop component.
Not that I can think of. Objects belong to the module they are defined in but the libraries are global and are referenced by the contents of the main sbp file so I can see no way of using "similar but different" libraries in one project.Am I right in thinking that it is not possible to have a "project" separate from the main *.sbp module?
Objects belong to the module they are defined in but the libraries are global and are referenced by the contents of the main sbp file so I can see no way of using "similar but different" libraries in one project.
I assume that you are using GPSSerial with an external GPS. The speed is provided by the GPS not by the library. You can see what the GPS thinks the speed is by looking at GPSSerial.GPRMC, speed is item 7.
$GPRMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,ddmmyy,x.x,a*hh
1 = UTC of position fix
2 = Data status (V= fix inValid, A = fix Active)
3 = Latitude - ddmm.mm
4 = N or S
5 = Longitude - ddmm.mm
6 = E or W
7 = Speed over ground in knots
8 = Track made good in degrees True
9 = UT date
10 = Magnetic variation degrees (Easterly var. subtracts from true course)
11 = E or W
12 = Checksum
<-$GPRMC,085451,A,5131.055,N,00044.574,W,000.0,259.0,290810,004.2,W*71
It's not me saying it. It an extract from some documentation that I found on the Web. Looking at some other documentation I don't think that the magnetic variation value in the RMC sentence is ever signed. The example of your "old GPS" doesn't give a sign. I think the sign needs to be inferred from the E or W value at position 11 in the sentence.Although you say, Andrew, that "(Easterly var. subtracts from true course)"
It's not me saying it. It an extract from some documentation that I found on the Web. Looking at some other documentation I don't think that the magnetic variation value in the RMC sentence is ever signed. The example of your "old GPS" doesn't give a sign. I think the sign needs to be inferred from the E or W value at position 11 in the sentence.
GPSSerial, and GPSDriver, just pass on the values they receive but in the case of GPSDriver perhaps the sign is being adjusted by the Windows Intermediate Driver as it does not seem to pass on the E/W value. GPSSerial does nothing to it because I just mirror what GPSDriver does and pass the received value on unchanged.
I think the sign needs to be inferred from the E or W value at position 11 in the sentence.
... and is documented by Microsoft as "Magnetic variation, which is the difference between the bearing to true north and the bearing shown on a magnetic compass. Positive numbers indicate east.". If GPSDriver is not returning a negative value it looks like a WIA bug. Maybe they've got it the wrong way round.
GPSSerial does check the E/W value and returns a negative variation value if the position 11 contains "E" so it looks like either I made a mistake and got it the wrong way round or I did it deliberately to match GPSDriver. I'm afraid that I can't remember!
GPSSerial does nothing to the heading value and just passes it on as extracted from the RMC sentence. Presumably changing your GPS to magnetic changes the value being inserted in the RMC sentence.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?