Habéis usado alǵun receptor GPS de los siguientes

#1
Hello everyone.
I am planning a new project for next year, and I would like to include GPS. I work with 28X2 processors, and with Blockly software, which is easier for Baccalaureate students. As you see?
Greetings and thanks
 
#2
I have recently completed a project for a GPS signal synchronised clock. The project used a GPS receiver module outputting data at 9600 baud into a 28X2. Data is received by the PICAXE into the scratchpad via the 'background' serial port (hSerial). The PICAXE's foreground task searches the scratchpad for the required data packet (or "data sentence") header and then confirms the packet's checksum. If the data and checksum are valid, the current time is then extracted and used for an outdoor 'clock' in a public recreation park.

Adapting the code to extract GPS positioning data should be a relatively simple task. Once you have the positioning data, you may find that the integer mathematics of the PICAXE makes it difficult to manipulate the data.

I hope to document my project in the Completed Projects section of the forum in the coming weeks.

Peter

From Google Translate:
Recientemente he completado un proyecto para un reloj sincronizado de señal de GPS. El proyecto utilizó un módulo de receptor GPS que genera datos a 9600 baudios en un 28X2. Los datos son recibidos por el PICAXE en el scratchpad a través del puerto serie 'de fondo' (hSerial). La tarea de primer plano de PICAXE busca en el bloc de notas el encabezado del paquete de datos requerido (o "oración de datos") y luego confirma la suma de comprobación del paquete. Si los datos y la suma de comprobación son válidos, la hora actual se extrae y se utiliza para un "reloj" al aire libre en un parque recreativo público.

Adaptar el código para extraer datos de posicionamiento GPS debería ser una tarea relativamente simple. Una vez que tenga los datos de posicionamiento, puede encontrar que las matemáticas enteras del PICAXE dificultan la manipulación de los datos.

Espero documentar mi proyecto en la sección Proyectos Completos del foro en las próximas semanas.
 

Aries

New Member
#3
There was an article in AllAboutCircuits a few years ago about building a GPS clock with Picaxe. This is the link to the article https://www.allaboutcircuits.com/projects/make-a-gps-clock-with-picaxe/

I've had a version linked into my control systems for a couple of years, using the GP20U7 (mine came from Hobbytronics in the UK). I think the original code from the article has disappeared - this was my original test version to see if it worked (it did)

Code:
#picaxe 20m2
symbol GpsTX = B.1

symbol GMTHours = $20
symbol GMTMinutes = GMTHours + 1
symbol GMTSeconds = GMTMinutes + 1
symbol GMTDay     = GMTSeconds + 1
symbol GMTMonth   = GMTDay + 1
symbol GMTYear = GMTMonth + 1
symbol GpsRecord = GMTYear + 1
symbol GpsRecordEnd = GpsRecord + 60

setfreq m16

	for b0 = 1 to 30
		pause 1000	' wait for GPS to initialise
		sertxd(" ",#b0)
	next b0

' Wait for a GPRMC record - include comma for convenience
ReadGPS:
	bptr = GpsRecord
	serin GPSTX,T9600_16,("$GPRMC,"),_
		@bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc,_
		@bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc,_
		@bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc,_
		@bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc,_
		@bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc,_
		@bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc,_
		@bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc,_
		@bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc, @bptrinc,_
		@bptr


#rem	
	sertxd(13,10,">",13,10)
	for bptr = GpsRecord to GpsRecordEnd
		if @bptr = 0 then
			sertxd("<NULL>")
		else
			sertxd(@bptr)
		endif
	next bptr
#endrem
	
' process record
' field 1 is hhmmss.sss	if valid
	bptr = GpsRecord
	for b2 = GMTHours to GMTSeconds
		gosub ConvertTwoBytes
 		if b1 <> 0 then ReadGPS	' error
 		poke b2,b0
 	next b2
 	
 	gosub GetNextField
 	if @bptrinc <> "A" then ReadGPS	' not valid data

 	for b0 = 0 to 6	' skip 6 fields
	 	gosub GetNextField
	next b0
	
	for b2 = GMTDay to GMTYear
		gosub ConvertTwoBytes
 		if b1 <> 0 then ReadGPS	' error
 		poke b2,b0
 	next b2
 	
 	bptr = GMTHours
 	sertxd(13,10,#@bptrinc,":",#@bptrinc,":",#@bptrinc," ",#@bptrinc,"/",#@bptrinc,"/",#@bptrinc)
 	
	goto ReadGPS
	
	
' convert two decimal character bytes into a number
ConvertTwoBytes:
	b0 = 0
	b1 = 1
	if @bptr < "0" or @bptr > "9" then goReturn	' error
	b0 = @bptrinc - "0"
	if @bptr < "0" or @bptr > "9" then goReturn	' error
	b0 = b0 * 10 + @bptrinc - "0"
	b1 = 0
goReturn:
	return

' find beginning of next field (after comma)
GetNextField:
	do
		if @bptrinc = "," then exit
	loop until bptr > GpsRecordEnd
	return
 
#4
Thank you very much for your answers.
I look forward to seeing and working on your projects.
As soon as I can get on with it I'll be commenting
Regards
 
Top