Skip to content

1nv1/luaGPS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#luaGPS

Module for decoding NMEA sentences of GPS devices with Lua. Also works with LuaJIT. The "decode" method allows extract information from NMEA sentences (line is a group of them) and returns a table with relevant information. Based on Julien Vermillard work: lua-nmea

Example of use

Content of test.lua

local GPS = require "gps_nmea"

local line = [[
$GPGGA,092751.000,5321.6802,N,00630.3371,W,1,8,1.03,61.7,M,55.3,M,,*75,
$GPGSA,A,3,10,07,05,02,29,04,08,13,,,,,1.72,1.03,1.38*0A,
$GPGSV,3,1,11,10,63,137,17,07,61,098,15,05,59,290,20,08,54,157,30*70,
$GPRMC,092751.000,A,5321.6802,N,00630.3371,W,0.06,31.66,280511,,,A*45
]]

local t = GPS.Decode(line)

for k,v in pairs(t) do
  print(k, v)
end

Output

mode1   A
course  31.66
speed   0.11112
hour    9
second  51
longitude   -6.5056183333333
latitude    53.361336666667
day 28
month   5
status  A
mode2   3
year    11
minute  27

About

Module for decoding NMEA sentences of GPS devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages