hi
just a Q: with the GPS library (gps.dll) we have the option to use Sats in View.
there is no way to get sats Used, with this dll.
The GPSDriver.dll has both options. So, is it possible to get a Sats Used with the Gps.dll?
1 = Mode:
M=Manual, forced to operate in 2D or 3D
A=Automatic, 3D/2D
2 = Mode:
1=Fix not available
2=2D
3=3D
3-14 = IDs of SVs used in position fix (null for unused fields)
15 = PDOP
16 = HDOP
17 = VDOP
i tried to implement
Sub GPS_GPSDecoded '''This is the variable that holds the GPS direction!!!
imgSatelliteoff.Visible=False
imgSatelliteon.Visible=True
lblService.Text = "Fix:3D"
lblAlti.Text = GPS.Altitude '''Shows the Altitude in Meters'''
lblTM.Text = GPS.UTCTime
lblSatsUsed.Text = gps.SatelliteUsedCount <<< does not show used sats >>>
lblSatellites.Text = GPS.NumberOfSatellites '''Shows theNumberOfSatellites'''
It looks like you are using the GPS library so it won't as there is no such property - have you tried optimising compiling it? It will probably show an error. As Wolfgang says, you should try the http://www.b4x.com/forum/additional-libraries/3327-gpsserial-library.html#post18685 which has both SatellitesInViewCount and SatellitesUsedCount properties. It also gives you easy access to the NMEA sentences should you need it.
Hi,
here is a little app which shows how to use the GPSSerial.dll and how to pars the GGA sentence. I wrote this for testing the better accuracy since EGNOS is on. Modify the UTM coordinates for your own purpos. If you don't have any known coordinates you can take the average of about 100 counts.
danke dir wolfgang
ich verwende das kleine programm GPS4PPC und moechte nur ein was mit einbinden. Und zwar SatsUsed. Wie kann ich das implementieren bitte?
Gibt es eine moeglichkeit?
eine frage bitte. Ich benoetige nur ein paar zeilen von diesen Open Source.
aber leider klapt dies noch nich ganz.Verwende GPS library in meiner GPS App.
Moechte auch diesen beibehalten. Kann ich GPSSerial.dll mit hinzufuegen, ohne den Source Code zu aendern?
Wenn ja, welchen teil des Source Code wird hierfuer verwendet?
eine frage bitte. Ich benoetige nur ein paar zeilen von diesen Open Source.
aber leider klapt dies noch nich ganz.Verwende GPS library in meiner GPS App.
Moechte auch diesen beibehalten. Kann ich GPSSerial.dll mit hinzufuegen, ohne den Source Code zu aendern?
Wenn ja, welchen teil des Source Code wird hierfuer verwendet?
Danke Dir im voraus
Best regards to all
Wmc
PS. the gps algos are not really my thing.[/Hello Klaus]
Hi,
gps.NumberOfSatellites = sats used and not sats in view. I've tested this with the following code which makes no sence and I'm really surprised that it works:
B4X:
Sub Globals
'Declare the global variables here.
End Sub
Sub App_Start
Form1.Show
gps.New1 'GPS DLL
gpsserial.New1 'GPSSerial DLL
gpsserial.Open("Com15",38400) 'please modify
gpsserial.NMEAOpen
Timer1.Interval = 1000
Timer1.Enabled = True
TimeFormat("HH:mm:ss")
End Sub
Sub Timer1_Tick
If gpsserial.GetGpsData(2000) = True Then
gps.GPSStream(gpsserial.NMEAReadString) '!!!!!?????
Show
End If
End Sub
Sub Show
ListBox1.Clear
ListBox1.Add("Number of satellites in view: " & gpsserial.SatellitesInViewCount) 'from GPSSerial DLL
ListBox1.Add("Number of satellites used: " & gpsserial.SatelliteUsedCount) 'from GPSSerial DLL
ListBox1.Add("Number of satellites used: " & gps.NumberOfSatellites) 'from GPS DLL
ListBox1.Add("Time: " & Time(gpsserial.Time)) 'from GPSSerial DLL
End Sub
Sub Form1_Close
gpsserial.Close
gpsserial.NMEAClose
Timer1.Enabled = False
End Sub
I would expect that to work. GPSStream takes a string and adds it to an internal buffer then tries to parse it into NMEA sentences. Normally the string would come fromSerial.InputString but as it is a string it can come from anywhere and GPSSerial.NMEAReadString is in fact doing exactly what Serial.InputString does in returning successive reads of the data stream from the GPS.
The >>>GPS4PPC<<< application uses SerialDevice.dll and SerialDesktop.dll libraries.
Ok i tried the open source that Wolfgang had posted, and see there i did not have problems at all with that. only the first
1-3 seconds of SatsInView = .9999??? After 3 sec. i had positive SatsInView.
When i added the GPSSerial.dll to the GPS4PPC application it dit not work. So, do i need to replace the SerialDevice.dll /
SerialDesktop.dll libraries with the GPSSerial.dll in the GPS4PPC application? Or can i keep, and add GPSSerial.dll???
Now i am a little Confused. What am i doing wrong here?
GPSSerial is not a drop in replacement for the GPS/Serial combination but it is a totally compatible superset of GPSDriver. It has different properties and methods to GPS so the code will need modifying to use it. You do not need the GPS and Serial libraries in a GPSSerial based project.
Hi Mr. Agraham
I hope all is well with you.
Thx for your responce, and I sincerely appreciate the time and effort of everyone who responded to my questions.