• warning: file_get_contents(https://raw.githubusercontent.com/MyRobotLab/pyrobotlab/master/service/Gps.py) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway in /var/www/html/myrobotlab/themes/superclean/repoFile.php on line 25.
  • warning: file_get_contents(https://raw.githubusercontent.com/MyRobotLab/pyrobotlab/master/service/Gps.py) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway in /var/www/html/myrobotlab/themes/superclean/repoFile.php on line 30.

Gps

javadoc

 

Global Positioning System for MyRobotLab. 
It will read data from a GPS sensor through a serial connection and parse it into its appropriate fields

The service is able to parse NMEA sentences coming in over Serial (including Bluetooth Serial). There is a rudimentary GUI for the service that shows the current sentence being parsed and some of the relevant values parsed from it. One important note is that the Lat and Lon in NMEA are in the format ddmm.mmmm which means that they have to be converted to Degrees (d) from Degrees(d) Minutes(m) to be used with some of the other functions in the service.  The service automatically does the conversion when it parses the sentences into GPSData objects. If you capture the raw GPS data coming out of the device to a file, it won't be the converted version. It will be the raw NMEA value.

Starting in MRL versions after 1.0.86, some Geo Fence capabilities have been added.  The most basic of these is the Point based radius.  You define a Lat/Lon point and a radius around it in meters and then you can test to see if other points are inside or outside the fence.  A more complicated/flexible version is created by sending an array of GPS points to form a polygon. The last point will be connected back to the first point automatically to close the fence.  So if your robot is sending you it's current GPS coordinates, you can see if has wandered into our out of a fenced area.

Examples:


#file : service/Gps.py edit raw