Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Sunrisesunsetlib Java | 252 | 52 | 1 | 6 years ago | 2 | December 17, 2014 | 25 | apache-2.0 | Java | |
Library for computing the sunrise/sunset from GPS coordinates and a date, in Java. | ||||||||||
Androideasyutils | 23 | 5 years ago | mit | Java | ||||||
AndroidEasyUtils is a simple android library that contains some utils method which is much more needed when working in any android project. Categories are - Validators, Dialog, Progress Dialog, Connectivity, Date Time, Bitmaps, HashMap and Others. | ||||||||||
Ruby Serialgps | 14 | 6 years ago | 3 | Ruby | ||||||
Provides an easy API to get GPS data from your serial GPS module. | ||||||||||
Kgeotag | 7 | 14 days ago | gpl-3.0 | C++ | ||||||
Photo geotagging program | ||||||||||
Gmaxfeed | 7 | 2 days ago | gpl-3.0 | Python | ||||||
python3 module for downloading and maintaining files from gmax server on local machine. | ||||||||||
Rxdatetimepicker | 5 | 2 years ago | Java | |||||||
Earthquakewatchdog | 4 | 3 days ago | 41 | Kotlin | ||||||
App showing the latest hearthquake event from USGS site. | ||||||||||
Pictureorganizer | 4 | 6 years ago | gpl-3.0 | Shell | ||||||
Automatically organizes pictures and videos based on taken dates and GPS coordinates. | ||||||||||
Appsmazdainfotainement | 3 | 3 years ago | mit | JavaScript | ||||||
Applications Mazda | ||||||||||
Fcsprojectairmap_ios | 3 | 7 years ago | C++ | |||||||
iOS for FCSProjectAirMap |
This library provides an easy way to get GPS data from your serial GPS unit.
Uses ruby-serialport to connect to a standard serial GPS unit and parses the NMEA sentences into an easy to use hash.
Currently it only parses the following NMEA sentences:
$GPGGA
$GPRMC
$GPGLL
$GPRMA
$GPGSA
$GPGSV
$GPHDT
$GPZDA
Calling read
or get_data
will return a hash with some or all of the keys listed below. Each time you call one of those methods, more NMEA sentences will be parsed and added to the hash. You may have to call read
multiple times in a loop until your data is available.
get_data
is a wrapper function that will call read
in a loop until at least the $GPGGA and $GPRMC sentences are read.
The last NMEA sentence name (without “$GP”) parsed with the read method.
quality:: 0 = invalid, 1 = GPS fix, 2 = DGPS fix validity:: A = ok, V = invalid latitude:: Latitude lat_ref:: North/South (N/S) longitude:: Longitude long_ref:: East/West (E/W) altitude:: Current altitude alt_unit:: Altitude height unit of measure (i.e. M = Meters) speed:: Speed over ground in knots heading:: Heading, in degrees course:: Course over ground in degrees time:: Current time formated as HHMMSS.SS – use date_time to get the parsed version date:: Current date formated as DDMMYY – use date_time to get the parsed version local_hour_offset:: Local zone description, 00 to +/- 13 hours local_minute_offset:: Local zone minutes description (same sign as hours) num_sat:: The number of satellites in view satellites:: An array with id, elevation, azimuth and SNR for each satellite height_geoid:: Height of geoid above WGS84 ellipsoid height_geoid_unit:: Unit of measure (i.e. M = Meters) last_dgps:: Time since last DGPS update dgps:: DGPS reference station id mode:: M = Manual (forced to operate in 2D or 3D) A = Automatic (3D/2D) mode_dimension:: 1 = Fix not available, 2 = 2D, 3 = 3D hdop:: Horizontal Dilution of Precision pdop:: Positional Dilution of Precision vdop:: Vertical Dilution of Precision msg_count:: Total number of messages of this type in this cycle msg_num:: Message number variation:: Magnetic variation var_direction:: Magnetic variation direction (i.e E = East)
GPS modules provide the current time and date (UTC) strings in the following format:
Time:
HHMMSS.SS
Date:
DDMMYY
Instead of parsing these yourself, the date_time
method will convert these strings into a DateTime object with the timezone set to UTC.
require "serialgps"
gps = SerialGPS.new("/dev/ttyUSB0") ... puts gps.date_time
You need RubyGems 1.2.0 to install it remotely from the GitHub repository.
gem sources -a http://gems.github.com gem install jgillick-ruby-serialgps
After downloading ruby-serialgps.gem
gem install ruby-serialgps.gem
Here's a simple example of
This uses the internal live_gps_dump method to show live GPS data in the console
require "rubygems" require "serialgps" device = "/dev/ttyUSB0" gps = SerialGPS.new(device) gps.live_gps_dump
A program that prints latitude and longitude data to the console as soon as it's available.
require "rubygems" require "serialgps" device = "/dev/ttyUSB0" gps = SerialGPS.new(device) puts "Your current position:" while true data = gps.read if data.key?(:latitude) puts "Latitude: #{data[:latitude]}#{data[:lat_ref]}\t" puts "Longitude: #{data[:longitude]}#{data[:long_ref]}\n" end end