View Source pmod_gps (grisp v2.8.0)

PmodGPS module.

The PmodGPS sends the GPS data over UART.

Start the driver with

1> grisp:add_device(uart, pmod_gps).

Summary

Functions

Get the GPS data.

Functions

get(MessageId)

-spec get(grisp_nmea:message_id()) ->
             {grisp_nmea:talker_id(), grisp_nmea:message_id(), map() | binary()} | undefined.

Get the GPS data.

The input parameter specifies which type of sentence to get. For a description of the sentences see the PmodGPS Reference Manual.

The sentence CRC is checked for all the sentence types, but for now only the GGA values are parsed. If other sentences are needed, grisp_nmea needs to be extended to support more types.

Example

 2> pmod_gps:get(gga).
 {gps,gga,#{alt => 61.9,fixed => true,lat => 52.122661666666666,long => 11.594928333333334,time => 53912000}}}
 3> pmod_gps:get(gsa).
 {gps,gsa,<<\"A,3,17,06,19,02,24,,,,,,,,2.69,2.51,0.97\">>}
 4> pmod_gps:get(gsv).
 {gps,gsv,<<\"3,3,12,14,22,317,17,17,10,040,35,29,09,203,,22,02,351\">>}
 5> pmod_gps:get(rmc).
 {gps,rmc,<<\"150007.000,A,5207.3592,N,01135.6895,E,0.46,255.74,120220,,,A\">>}
 6> pmod_gps:get(vtg).
 {gps,vtg,<<\"297.56,T,,M,0.65,N,1.21,K,A\">>}