Try using GPS receiver kit with RaspberryPi3 (Ruby)


--Location information can be obtained by GPS

What I used

--GPS receiver kit with 1PPS output "MICHIBIKI" 3 receivers supported


Since I had all the parts at hand, I assembled it with the circuit diagram of the manual posted on the Akizuki-sama site. It seems that the switching diode is actually unnecessary, but I connected it because it also provides insurance so as not to break it.


The breadboard is vertical because the GPS antenna had to point straight up by default. By the way, it took about 30 minutes for the LED to blink in the initial operation test. I put it by the window, but maybe the place I put it was bad.



To execute the following sources, it is necessary to make UART connection related settings on Raspberry Pi. Please google there: pray: Once that's done, I haven't done much.

I used nmea_plus for NMEA format analysis. SourceDecoder Maji convenience: point_up:

require 'serialport'
require 'nmea_plus'
sp ='/dev/serial0', 9600, 8, 1, 0) # see:

trap 'SIGINT' do
  sp.close if sp

source_decorder =
source_decorder.each_complete_message do |message|
  # see:
  if 'GPRMC' == message.data_type
    puts message.utc_time
    puts # false:Data invalid
    puts message.latitude
    puts message.longitude
    #puts message.speed_over_ground_knots
    #puts message.track_made_good_degrees_true
    #puts message.magnetic_variation_degrees
    puts message.faa_mode # A:Independent positioning(Accuracy about 3m), D:Relative positioning(Accuracy 0.About 4m) 
# sp.close <=You won't get here ...


Below is the execution result.

2020-07-15 12:35:37 +0000
2020-07-15 12:35:38 +0000

By the way, with Google, if you enter latitude and longitude in the search keyword, Goole Map will be displayed at that point. Himeshima Village Office: grinning:



――The pins of the GPS receiver kit are aligned with the pins of the Raspberry Pi (it seems), so I didn't get lost when connecting. ――You can usually find a useful Gem by searching. Let's use Ruby even if we don't mind. ――Ah, I forgot to play even though I connected the 1PPS terminal.

Recommended Posts

Try using GPS receiver kit with RaspberryPi3 (Ruby)
Try using GloVe with Deeplearning4j
[Programming Encyclopedia] §2 Try using Ruby
Try using Redis with Java (jar)
Try using Spring Boot with VS Code
Notes on using FCM with Ruby on Rails
Try using the Wii remote with Java
Try to link Ruby and Java with Dapr
Try to get redmine API key with ruby
Easily edit performance videos with ffmpeg using Ruby
Try using S3Proxy with Microsoft Azure Blob Storage
Try using another Servlet container Jetty with Docker
Try using Maven
Try using powermock-mockito2-2.0.2
Try using GraalVM
Try using jmockit 1.48
Try using SwiftLint
Try using Log4j 2.0
Try Ruby Minitest
Try using DI container with Laravel and Spring Boot
Try using OpenID Connect with Keycloak (Spring Boot application)
Try to work with Keycloak using Spring Security SAML (Spring 5)
Try using the query attribute of Ruby on Rails