{
    "ok": true,
    "data": {
        "title": "EZ-0048",
        "rev_id": 10911,
        "updated_at": "2021-08-27T10:59:18+00:00",
        "chunk_count": 22,
        "chunks": [
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "",
                "chunk_index": 0,
                "content": "# EZ-0048\n\n1. USB-Port-GPS Module",
                "char_count": 33,
                "token_estimate": 9
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Description",
                "chunk_index": 1,
                "content": "[right|320px](\/docs\/File:Gps4.jpg)\n*Support  Raspberry Pi model A, B, A+, B+, Zero, 2, 3 with its' L80-R GPS chip inside.\n*Communicates satellite with UART or USB.\n*CP2102 as USB to UART Bridge chip, stable and faster.\n*The L80-R with 66 search channels and 22 simultaneous tracking channels,it acquires and tracks satellites in the shortest time  at Outdoor.\n\n----\n**Attention**\nThis module is fit for outdoor operation. please put the Antana  in the open air.\n----",
                "char_count": 466,
                "token_estimate": 117
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Compatibility List",
                "chunk_index": 2,
                "content": "- Compatibility\n{| class=\"wikitable\" style=\"text-align: center;\"\n|-\n!Platform !!USB-Port-GPS Module !! Notes\n|-\n|Raspberry Pi 4 Model B || √||\n|-\n|Raspberry Pi 3 Model B Plus|| √||\n|-\n|Raspberry Pi zero || √||\n|-\n| Raspberry Pi zero W  || √||\n|-\n|Raspberry Pi 3 Model B|| √||\n|-\n|Raspberry Pi 2 Model B|| √||\n|-\n|Raspberry Pi Model B+|| √||\n|-\n|}",
                "char_count": 346,
                "token_estimate": 87
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Feature",
                "chunk_index": 3,
                "content": "*-165 dBm sensitivity, 1Hz (Default), up to 5Hz, 66 channels\n*At least 100mA current draw to startup.\n*PPS output can be used to coordinate time with satellite.\n*Internal patch antenna which works quite well when used outdoors SMA connector for external active antenna for when used indoors\n*Fix status LED blinks to let you know when the GPS has determined the current coordinates\n*EASY™, advanced AGPS technology without external memory\n*Support time service application which can be achieved by PPS sync NMEA feature\n*Built-in LNA for better sensitivity\n*RTC battery-compatible\n*1x8 male headers, USB micro Interface\n*includes CP2102 Module Serial Converter USB 2.0 To TTL UART\n----",
                "char_count": 685,
                "token_estimate": 172
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Documentations > Hardware Design For Quectel L80-R",
                "chunk_index": 4,
                "content": "- Latest Version(Updated at 2020\/4\/1): Donwload v1.2: [File:Quectel L80-R Hardware Design V1.2.pdf ](\/docs\/File:Quectel L80-R Hardware Design V1.2.pdf )\n- Specification Document Download v1.0: [File:Quectel_L80-R_GPS_Specification_V1.0.pdf](\/docs\/File:Quectel_L80-R_GPS_Specification_V1.0.pdf)\n----",
                "char_count": 298,
                "token_estimate": 75
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Parameters",
                "chunk_index": 5,
                "content": "{| class=\"wikitable\"\n|-\n!Type!!value\n|-\n|Satellites||66 acquisition channels,\n22 tracking channels\n|-\n|Work Voltage||4.5-5.5V\n|-\n|Weight ||4.35g\n|-\n|Maximum Current||100mA MAX\n|-\n|Work Temperature||-40～+85℃\n|-\n|scale||16.6x26x18.6(mm)\n|-\n|GPS||L80-R\n|-\n|Patch Antenna Size||15.0 x 15.0 x 4.0mm\n|-\n|Position Accuracy||<2.5M CEP\n|-\n|Velocity Accuracy||<1.0m\/s\n|-\n|Warm\/cold start without ESEY||<35s\n|-\n|Warm\/cold start with ESEY||<15s\n|-\n|Acquisition sensitivity||-148dBm\n|-\n|Tracking sensitivity||-165dBm\n|-\n|Update rate||1Hz (Default)\nup to 5Hz\n|-\n|Baud Rate|| 4800~115200 bps\n9600bps default\n|-\n|Protocols|| NMEA 0183\n|-\n|Mount Cable||1*8 Stacking Header\nUSB micro data cable\n|-\n|}\n[left|500px](\/docs\/File:Gps-schama.png)\n<br style=\"clear:both;\" >\n----",
                "char_count": 753,
                "token_estimate": 189
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Presentation",
                "chunk_index": 6,
                "content": "{|-\n|[left|320px](\/docs\/File:Gps2.jpg)\n|[none|320px](\/docs\/File:Gps3.jpg)\n|[none|320px](\/docs\/File:Gps4.jpg)\n|}\n----",
                "char_count": 116,
                "token_estimate": 29
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Package includes:",
                "chunk_index": 7,
                "content": "- 1x USB-Port-GPS(L80-R)  module\n- 1x USB data wire\n----",
                "char_count": 56,
                "token_estimate": 14
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "How to wire it up > Uart Style:",
                "chunk_index": 8,
                "content": "Because of the Serial port issue of  Raspberry Pi 3, Model B, it may cause unexpected problem, we suggest that you do not  connect GPS module with Raspberry Pi directly with GPIO Pins.\n*1.You need a **USB-to-TTL cable** to connect GPS module and Raspberry Pi ,and you can wire it up like this chart:\n{| class=\"wikitable\"\n!GPS module!!Wire color\n|-\n|VCC || Red wire\n|-\n|GND|| Black wire\n|-\n|TXD|| Green wire\n|-\n|RXD|| White wire\n|-\n|}\n{|-\n|[left|320px](\/docs\/File:Gpsrpi.jpg)\n|[none|320px](\/docs\/File:Gpsside.jpg)\n|[none|320px](\/docs\/File:GPSconnect.jpg)\n|}\n<br style=\"clear:both;\">\n*2.Power on Raspberry Pi and login, open a terminal and type following commands if you use raspberry Pi in desktop environment.\n----",
                "char_count": 714,
                "token_estimate": 179
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "How to wire it up > USB Style:",
                "chunk_index": 9,
                "content": "*Just use a microUSB cable connect  Raspberry Pi USB port with GPS module and power on Raspberry Pi.\n[|left|500px](\/docs\/File:Gps1.jpg)\n<br style=\"clear:both;\">\n----",
                "char_count": 165,
                "token_estimate": 42
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "How to use it",
                "chunk_index": 10,
                "content": "1. After power on and login to system. you can open a terminal and typing following command to install packages for GPS module.\n\n<code>\nsudo apt-get update && sudo apt-get -y install gpsd gpsd-clients python-gps\n<\/code>\n\n2.Start the gpsd service and control it.\n\nEnable it:\n<code>sudo systemctl enable gpsd.socket <\/code>\n\nStart it:\n<code>sudo systemctl start gpsd.socket <\/code>\n\nRestart it:\n<code>sudo systemctl restart gpsd.socket <\/code>\n\nCheck status:\n<code>sudo systemctl status gpsd.socket <\/code>\n\n4.Modify the configuration file of gpsd in \/etc\/default\/gpsd\n\nModify the \"DEVICE\" parameter according to the name of serial port in \/dev folder.\n\nIt is usually named \"\/dev\/ttyUSB0\" if you connect it to Raspberry Pi via USB cable.\n\nYou can use \"nano\" or \"vim.tiny\" editor to finish it.\n\n[left|600px](\/docs\/File:Gpsconfig4.jpg)\n<br style=\"clear:both;\" >\nRestart service:\n\n<code>sudo systemctl  restart  gpsd.socket <\/code>\n\nFinally, use this command to get information from GPS module.\n\n<code>sudo  cgps -s<\/code>\n\n5. The GPS status will be like this:\n[left|600px](\/docs\/File:gpsresult.png)\n<br style=\"clear:both;\" >\n----",
                "char_count": 1125,
                "token_estimate": 282
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Example Code in C for Client",
                "chunk_index": 11,
                "content": "- Using following code can be get GPS infomation from gpsd progress from local port 2947 via [libgps](http:\/\/www.catb.org\/gpsd\/libgps.html) library.\n\n- GPS client [HOWTO](http:\/\/www.catb.org\/gpsd\/client-howto.html)\n\n- CODE name gps.c:\n<pre>\n#include <gps.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <math.h>\n\nint main() {\nint rc;\nstruct timeval tv;\n\nstruct gps_data_t gps_data;\nif ((rc = gps_open(\"localhost\", \"2947\", &gps_data)) == -1) {\n    printf(\"code: %d, reason: %s\\n\", rc, gps_errstr(rc));\n    return EXIT_FAILURE;\n}\ngps_stream(&gps_data, WATCH_ENABLE | WATCH_JSON, NULL);",
                "char_count": 606,
                "token_estimate": 152
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Example Code in C for Client",
                "chunk_index": 12,
                "content": "while (1) {\n    \/* wait for 2 seconds to receive data *\/\n    if (gps_waiting (&gps_data, 2000000)) {\n        \/* read data *\/\n        if ((rc = gps_read(&gps_data)) == -1) {\n            printf(\"error occured reading gps data. code: %d, reason: %s\\n\", rc, gps_errstr(rc));\n        } else {\n            \/* Display data from the GPS receiver. *\/\n            if ((gps_data.status == STATUS_FIX) &&\n                (gps_data.fix.mode == MODE_2D || gps_data.fix.mode == MODE_3D) &&\n                !isnan(gps_data.fix.latitude) &&\n                !isnan(gps_data.fix.longitude)) {\n                    \/\/gettimeofday(&tv, NULL); EDIT: tv.tv_sec isn't actually the timestamp!\n                    printf(\"latitude: %f, longitude: %f, speed: %f, timestamp: %lf\\n\", gps_data.fix.latitude, gps_data.fix.longitude, gps_data.fix.speed, gps_data.fix.time); \/\/EDIT: Replaced tv.tv_sec with gps_data.fix.time\n            } else {\n                printf(\"no GPS data available\\n\");\n            }\n        }\n    }\n\nsleep(3);\n}\n\n\/* When you are done... *\/\ngps_stream(&gps_data, WATCH_DISABLE, NULL);\ngps_close (&gps_data);",
                "char_count": 1100,
                "token_estimate": 275
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Example Code in C for Client",
                "chunk_index": 13,
                "content": "return EXIT_SUCCESS;\n}\n<\/pre>\n- Complie and run it.\n<pre>\ngcc -o gps gps.c -lm -lgps\nsudo .\/gps\n<\/pre>",
                "char_count": 102,
                "token_estimate": 26
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Addictional solution for GPS client",
                "chunk_index": 14,
                "content": "- Using python with a GPS receiver on a Raspberry Pi\n- Comment\nHere are three examples of how to  use python to get GPS data from a GPS receiver attached to a Raspberry Pi.\n\n<pre>\nUsing GPSD client libraries\nManually parsing NMEA sentences\nUsing  pynmea2 to parse NMEA sentences\nGPSD client libraries\n<\/pre>\nThe gpsd client libraries are based on JSON. The JSON objects have a \"class\" attribute (E.g. TPV,  SKY, DEVICE.etc...)  which can be used to filter on different information.\n\nRefer to: [ http:\/\/www.catb.org\/gpsd\/gpsd_json.html | gpsd_json ]\n\n- This guide shows how to get gpsd up an running on a Raspberry Pi.\n- The example python  script below filters on the TPV class, which is the Time Position Velocity report and then prints out the relevant information.\n<pre>\n#! \/usr\/bin\/python\nfrom gps import *\nimport time\n\ngpsd = gps(mode=WATCH_ENABLE|WATCH_NEWSTYLE)\nprint 'latitude\\tlongitude\\ttime utc\\t\\t\\taltitude\\tepv\\tept\\tspeed\\tclimb' # '\\t' = TAB to try and output the data in columns.",
                "char_count": 996,
                "token_estimate": 249
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Addictional solution for GPS client",
                "chunk_index": 15,
                "content": "try:\n    while True:\n        report = gpsd.next() #\n\t    if report['class'] == 'TPV':\n                print  getattr(report,'lat',0.0),\"\\t\",\n                print  getattr(report,'lon',0.0),\"\\t\",\n                print getattr(report,'time',''),\"\\t\",\n                print  getattr(report,'alt','nan'),\"\\t\\t\",\n                print  getattr(report,'epv','nan'),\"\\t\",\n                print  getattr(report,'ept','nan'),\"\\t\",\n                print  getattr(report,'speed','nan'),\"\\t\",\n                print getattr(report,'climb','nan'),\"\\t\"\n                time.sleep(1)\nexcept (KeyboardInterrupt, SystemExit):      #when you press ctrl+c\n    print \"Done.\\nExiting.\"\n<\/pre>\n- This python script filters on the SKY class and prints out satellite information.\n<pre>\n#! \/usr\/bin\/python\n\nfrom gps import *\nimport time\nimport os\n\ngpsd = gps(mode=WATCH_ENABLE|WATCH_NEWSTYLE)\n\ntry:\n    while True:\n        report = gpsd.next() #\n            if report['class'] == 'SKY':\n                os.system('clear')\n                print ' Satellites (total of', len(gpsd.satellites) , ' in view)'\n\t\tfor i in gpsd.satellites:\n                    print 't', i",
                "char_count": 1139,
                "token_estimate": 285
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Addictional solution for GPS client",
                "chunk_index": 16,
                "content": "print '\\n\\n'\n\t\tprint 'PRN = PRN ID of the satellite. 1-63 are GNSS satellites, 64-96 are GLONASS satellites, 100-164 are SBAS satellites'\n\t\tprint 'E = Elevation in degrees'\n\t\tprint 'As = Azimuth, degrees from true north'\n\t\tprint 'ss = Signal stength in dB'\n\t\tprint 'used = Used in current solution?'\n\ntime.sleep(1)\nexcept (KeyboardInterrupt, SystemExit):         #when you press ctrl+c\n    print \"Done.\\nExiting.\"\n<\/pre>\n- BerryGPS Raspberry Pi GPS\n- Manually parsing NMEA sentences\nThe python script below shows how to access GPS data by connecting directly to the serial interface.\n\nIt filters on $GPRMC NMEA sentences and then splits the well know attributes into different variables.\n\n<pre>\nimport serial\nport = \"\/dev\/serial0\"",
                "char_count": 730,
                "token_estimate": 183
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Addictional solution for GPS client",
                "chunk_index": 17,
                "content": "def parseGPS(data):\n    #print \"raw:\", data #prints raw data\n    if data[0:6] == \"$GPRMC\":\n        sdata = data.split(\",\")\n        if sdata[2] == 'V':\n            print \"no satellite data available\"\n            return\n        print \"---Parsing GPRMC---\",\n        time = sdata[1][0:2] + \":\" + sdata[1][2:4] + \":\" + sdata[1][4:6]\n        lat = decode(sdata[3]) #latitude\n        dirLat = sdata[4]      #latitude direction N\/S\n        lon = decode(sdata[5]) #longitute\n        dirLon = sdata[6]      #longitude direction E\/W\n        speed = sdata[7]       #Speed in knots\n        trCourse = sdata[8]    #True course\n        date = sdata[9][0:2] + \"\/\" + sdata[9][2:4] + \"\/\" + sdata[9][4:6]#date\n\nprint \"time : %s, latitude : %s(%s), longitude : %s(%s), speed : %s, True Course : %s, Date : %s\" %  (time,lat,dirLat,lon,dirLon,speed,trCourse,date)\n\ndef decode(coord):\n    #Converts DDDMM.MMMMM > DD deg MM.MMMMM min\n    x = coord.split(\".\")\n    head = x[0]\n    tail = x[1]\n    deg = head[0:-2]\n    min = head[-2:]\n    return deg + \" deg \" + min + \".\" + tail + \" min\"",
                "char_count": 1060,
                "token_estimate": 265
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Addictional solution for GPS client",
                "chunk_index": 18,
                "content": "print \"Receiving GPS data\"\nser = serial.Serial(port, baudrate = 9600, timeout = 0.5)\nwhile True:\n   data = ser.readline()\n   parseGPS(data)\n<\/pre>\n\n- Using  pynmea2 to parse NMEA sentences\nThe python script below shows how to access GPS data by connecting directly to the serial interface.\n\nIt filters on $GPGGA NMEA sentences and then uses pynmea2 to parse the data.\n\nPynmea2 can be installed with:\n\n<code> pi@raspberrypi ~ $ pip install pynmea2  <\/code><\/pre>\n<pre>\nimport serial\nimport pynmea2\n\nport = \"\/dev\/serial0\"\n\ndef parseGPS(str):\n    if str.find('GGA') > 0:\n        msg = pynmea2.parse(str)\n        print \"Timestamp: %s -- Lat: %s %s -- Lon: %s %s -- Altitude: %s %s -- Satellites: %s\" % (msg.timestamp,msg.lat,msg.lat_dir,msg.lon,msg.lon_dir,msg.altitude,msg.altitude_units,msg.num_sats)\n\nserialPort = serial.Serial(port, baudrate = 9600, timeout = 0.5)\nwhile True:\n    str = serialPort.readline()\n    parseGPS(str)\n<\/pre>",
                "char_count": 933,
                "token_estimate": 234
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "Trouble Shooting",
                "chunk_index": 19,
                "content": "If you can not get the information mentioned before.\nYou can use this command to check if serial is working properly.\n<code>\ncat \/dev\/ttyUSB0\n<\/code>\nit works fine if you see this picture:\n[left|600px](\/docs\/File:Usboutput.png)\n<br style=\"clear:both;\">\n----",
                "char_count": 257,
                "token_estimate": 65
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "FAQ",
                "chunk_index": 20,
                "content": "*Question:  I use L80-R GPS module. I choose to connect the GPS to the raspberry using a USB port. I followed these steps:\n\n<pre>pi@raspberrypi ~ $ sudo cat \/dev\/ttyUSB0\n$GPRMC,144034.00,V,,,,,,,090315,,,N*75\n$GPVTG,,,,,,,,,N*30\n$GPGGA,144034.00,,,,,0,00,99.99,,,,,,*60\n$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30\n$GPGSV,1,1,01,15,,,25*7B\n\nsudo apt-get update\nsudo apt-get install gpsd gpsd-clients\nsudo dpkg-reconfigure gpsd\nstart gpsd automatically: yes\nShould gpsd handle attached USB receivers automatically: yes\nDevice the GPS receiver is attached to: <leave blank>\nOptions to gpsd: -n \/dev\/ttyUSB0\ngpsd control socket path: <use default>",
                "char_count": 643,
                "token_estimate": 161
            },
            {
                "title": "EZ-0048",
                "rev_id": 10911,
                "heading_path": "FAQ",
                "chunk_index": 21,
                "content": "sudo gpsd \/dev\/ttyUSB0 -F \/var\/run\/gpsd.sock\ncgps -s\n<\/pre>\nWhat should I do for NO FIX problem?\n**Answer:  You can modify \/etc\/defalut\/gpsd  file and make sure you input the right arguments as following picture:\n**[left|600px](\/docs\/File:gpsconfig.png)\n<br style=\"clear:both;\" >\n*Question： Can I use it in my car as a GPS receiver ?\n**Answer: please see this manual and try lcdgps command.\n<pre>\nlcdgps\n       A client that passes gpsd data to lcdproc, turning your car computer into a very expensive and\n       nearly feature-free GPS receiver. Currently assumes a 4x40 LCD and writes data formatted to fit\n       that size screen. Also displays 4- or 6-character Maidenhead grid square output.\n<\/pre>\n----\n- Question: What is the difference between L80 and L80-R?\n  Answer: L80-R does not support automatic antenna detection.",
                "char_count": 828,
                "token_estimate": 207
            }
        ]
    }
}