Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:26 21 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite and Pico-GPS-L76B and MMBasic 5.09.00RC3

Author Message
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 470
Posted: 11:08am 01 Jun 2024
Copy link to clipboard 
Print this post

Referring to this thread https://www.thebackshed.com/forum/ViewTopic.php?TID=16915
and the question about a GPS module and the answer from Peter, I have purchased this recommended module.
A few questions directly.

I only use the “PiPico” and version 5.09.00RC3.

> option list
PicoMite MMBasic Version 5.09.00RC3
OPTION COLORCODE ON
>


Here is my test program:

'GPS - Test v0.1
'
'OPEN comspec$ AS GPS [,timezone_offset] [,monitor]
''The sentences interpreted are GPRMC, GNRMC, GPGGA and GNGGA.
'The timezone_offset parameter is used to convert UTC as received from the
'GPS to the local timezone. If omitted the timezone will default to UTC. The
'timezone_offset can be a any number between -12 and 14 allowing the time to
'be set correctly even for the Chatham Islands in New Zealand (UTC +12:45).
'If the monitor parameter is set to 1 then all GPS input is directed to the
'console. This can be stopped by closing the GPS channel.
'
'PRINT #GPS, expre etcssion [[,; ]expression]
'Outputs a NMEA string to an opened GPS device. The string must start with a
'$ character and end with a * character. The checksum is automatically
'calculated and appended to the string together with the CR/LF characters.
'
'GPS()
'
'https://www.waveshare.com/wiki/Pico-GPS-L76B
'Modul: waveshare - Pico-GPS-L76B, GP0 Tx pin, GP1 Rx pin
'
Dim lat, long As float
Dim latg, latm, longg, longm As integer
Dim lats, longs As float
Dim latd$, longd$ As string
SetPin GP1, GP0, COM1
'Open "COM1:9600" As GPS,+2,1
Open "COM1:9600" As GPS,+2,0
Do While (GPS(valid)<>1) And (GPS(fix)<>1)
 If Inkey$="x" Then Exit Do
Loop
'Close GPS
Pause 500
'SetPin GP1, GP0, COM1
'Open "COM1:9600" As GPS,+1,0
Do
  Print "GPS Valid:", GPS(valid)
  Print "GPS FIX:", GPS(FIX)
  Print GPS(DATE), GPS(TIME)
  Print "Satellites: ", GPS(SATELLITES)
  'https://de.wikipedia.org/wiki/Dilution_of_Precision
  Print "DOP (top 1.0 - bad 10.0):", GPS(DOP)
  'https://gibs.bkg.bund.de/geoid/gserlaeuter_g.php
  'https://de.wikipedia.org/wiki/Geoid
  Print "Altitude: ", GPS(ALTITUDE), "GEOID:", GPS(GEOID)
  Print "Speed:", GPS(SPEED)
  Print "Track:", GPS(TRACK)
  lat =GPS(LATITUDE)
  long=GPS(LONGITUDE)
  Print "Latitude: ", lat, "Longitude:", long
  If lat<0 Then
     lat=lat*-1
     latd$="S"
  Else
     latd$="N"
  EndIf
  If long<0 Then
     long=long*-1
     longd$="W"
  Else
     longd$="E"
  EndIf
  latg=Fix(lat)
  latm=Fix((lat-latg)*60)
  lats=(((lat-latg)*60)-latm)*60
  longg=Fix(long)
  longm=Fix((long-longg)*60)
  longs=(((long-longg)*60)-longm)*60
  Print ,,Str$(latg)+Chr$(176);
  Print ""+Str$(latm)+Chr$(39);
  Print ""+Str$(lats,2,2,"0")+Chr$(34)+latd$;
  Print ,,,Str$(longg)+Chr$(176);
  Print ""+Str$(longm)+Chr$(39);
  Print ""+Str$(longs,2,2,"0")+Chr$(34)+longd$
  Pause 1000
Loop                                                                  


1) Unfortunately I can't close and reopen the interface to disable the monitor function.


[34] Open "COM1:9600" As GPS,+1,0
Error : Pins not set for COM1


@Peter: Is this a bug in 5.09.00RC3 or am I using it wrong?

2) What does the altitude refer to? At my location, the value should actually be different. Do I have to calculate the GEOID here?

3) Track: how is this information to be understood? A rotation of the antenna is recognized with a delay, but the value generally jumps back and forth wildly.

4) Can functions in the module, such as GPS mode, multi-satellite, refresh rate, etc. be read out or activated specifically? How do you use the command for this?  


PRINT #GPS, expression[[,; ]expression] ... etc
Outputs a NMEA string to an opened GPS device. The string must start with a
$ character and end with a * character. The checksum is automatically
calculated and appended to the string together with the CR/LF characters.


Who has experience with this module? I am not yet so enthusiastic about the accuracy.

Matthias
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025