This is the description of the Modbus protocol for the GPS Bricklet. General information and technical specifications for the GPS Bricklet are summarized in its hardware description.
A general description of the Modbus protocol structure can be found here.
BrickletGPS.
get_coordinates
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the GPS coordinates. Latitude and longitude are given in the
DD.dddddd°
format, the value 57123468 means 57.123468°.
The parameter ns
and ew
are the cardinal directions for
latitude and longitude. Possible values for ns
and ew
are 'N', 'S', 'E'
and 'W' (north, south, east and west).
PDOP, HDOP and VDOP are the dilution of precision (DOP) values. They specify the additional multiplicative effect of GPS satellite geometry on GPS precision. See here for more information.
EPE is the "Estimated Position Error". This is not the absolute maximum error, it is the error with a specific confidence. See here for more information.
This data is only valid if there is currently a fix as indicated by
get_status
.
BrickletGPS.
get_status
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the current fix status, the number of satellites that are in view and the number of satellites that are currently used.
Possible fix status values can be:
Value | Description |
---|---|
1 | No Fix, get_coordinates , get_altitude and get_motion return invalid data |
2 | 2D Fix, only get_coordinates and get_motion return valid data |
3 | 3D Fix, get_coordinates , get_altitude and get_motion return valid data |
There is also a blue LED on the Bricklet that indicates the fix status.
The following meanings are defined for the elements of this function:
For fix:
BrickletGPS.
get_altitude
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the current altitude and corresponding geoidal separation.
This data is only valid if there is currently a fix as indicated by
get_status
.
BrickletGPS.
get_motion
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the current course and speed. A course of 0° means the Bricklet is traveling north bound and 90° means it is traveling east bound.
Please note that this only returns useful values if an actual movement is present.
This data is only valid if there is currently a fix as indicated by
get_status
.
BrickletGPS.
get_date_time
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the current date and time. The date is
given in the format ddmmyy
and the time is given
in the format hhmmss.sss
. For example, 140713 means
14.07.13 as date and 195923568 means 19:59:23.568 as time.
BrickletGPS.
restart
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Restarts the GPS Bricklet, the following restart types are available:
Value | Description |
---|---|
0 | Hot start (use all available data in the NV store) |
1 | Warm start (don't use ephemeris at restart) |
2 | Cold start (don't use time, position, almanacs and ephemeris at restart) |
3 | Factory reset (clear all system/user configurations at restart) |
The following meanings are defined for the elements of this function:
For restart_type:
BrickletGPS.
get_identity
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.
The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port). A Bricklet connected to an Isolator Bricklet is always at position 'z'.
The device identifier numbers can be found here.
BrickletGPS.
set_coordinates_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Sets the period with which the CALLBACK_COORDINATES
callback is triggered
periodically. A value of 0 turns the callback off.
The CALLBACK_COORDINATES
callback is only triggered if the coordinates changed
since the last triggering.
BrickletGPS.
get_coordinates_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the period as set by set_coordinates_callback_period
.
BrickletGPS.
set_status_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Sets the period with which the CALLBACK_STATUS
callback is triggered
periodically. A value of 0 turns the callback off.
The CALLBACK_STATUS
callback is only triggered if the status changed since the
last triggering.
BrickletGPS.
get_status_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the period as set by set_status_callback_period
.
BrickletGPS.
set_altitude_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Sets the period with which the CALLBACK_ALTITUDE
callback is triggered
periodically. A value of 0 turns the callback off.
The CALLBACK_ALTITUDE
callback is only triggered if the altitude changed since
the last triggering.
BrickletGPS.
get_altitude_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the period as set by set_altitude_callback_period
.
BrickletGPS.
set_motion_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Sets the period with which the CALLBACK_MOTION
callback is triggered
periodically. A value of 0 turns the callback off.
The CALLBACK_MOTION
callback is only triggered if the motion changed since the
last triggering.
BrickletGPS.
get_motion_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the period as set by set_motion_callback_period
.
BrickletGPS.
set_date_time_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Sets the period with which the CALLBACK_DATE_TIME
callback is triggered
periodically. A value of 0 turns the callback off.
The CALLBACK_DATE_TIME
callback is only triggered if the date or time changed
since the last triggering.
BrickletGPS.
get_date_time_callback_period
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the period as set by set_date_time_callback_period
.
BrickletGPS.
CALLBACK_COORDINATES
¶Function ID: |
|
---|---|
Response: |
|
This callback is triggered periodically with the period that is set by
set_coordinates_callback_period
. The parameters are the same
as for get_coordinates
.
The CALLBACK_COORDINATES
callback is only triggered if the coordinates changed
since the last triggering and if there is currently a fix as indicated by
get_status
.
BrickletGPS.
CALLBACK_STATUS
¶Function ID: |
|
---|---|
Response: |
|
This callback is triggered periodically with the period that is set by
set_status_callback_period
. The parameters are the same
as for get_status
.
The CALLBACK_STATUS
callback is only triggered if the status changed since the
last triggering.
The following meanings are defined for the elements of this function:
For fix:
BrickletGPS.
CALLBACK_ALTITUDE
¶Function ID: |
|
---|---|
Response: |
|
This callback is triggered periodically with the period that is set by
set_altitude_callback_period
. The parameters are the same
as for get_altitude
.
The CALLBACK_ALTITUDE
callback is only triggered if the altitude changed since
the last triggering and if there is currently a fix as indicated by
get_status
.
BrickletGPS.
CALLBACK_MOTION
¶Function ID: |
|
---|---|
Response: |
|
This callback is triggered periodically with the period that is set by
set_motion_callback_period
. The parameters are the same
as for get_motion
.
The CALLBACK_MOTION
callback is only triggered if the motion changed since the
last triggering and if there is currently a fix as indicated by
get_status
.
BrickletGPS.
CALLBACK_DATE_TIME
¶Function ID: |
|
---|---|
Response: |
|
This callback is triggered periodically with the period that is set by
set_date_time_callback_period
. The parameters are the same
as for get_date_time
.
The CALLBACK_DATE_TIME
callback is only triggered if the date or time changed
since the last triggering.