[{"id":"7468ffc1.260148","type":"mqtt out","z":"9a1eebd9.5fc8","name":"MQTT-gps","topic":"gps","qos":"2","retain":"","broker":"867260d8.6e4528","x":616.8333435058594,"y":322.0833435058594,"wires":[]},{"id":"58274f29.361b4","type":"debug","z":"9a1eebd9.5fc8","name":"","active":false,"console":"false","complete":"false","x":338.16668701171875,"y":364.5833740234375,"wires":[]},{"id":"7c8c1ee9.65a1","type":"serial in","z":"9a1eebd9.5fc8","name":"","serial":"ebdf036.1803a","x":149.5,"y":321,"wires":[["58274f29.361b4","331f65be.75418a"]]},{"id":"814eff5.7b087","type":"debug","z":"9a1eebd9.5fc8","name":"","active":false,"complete":"payload","x":616.2499694824219,"y":372.5833282470703,"wires":[]},{"id":"331f65be.75418a","type":"function","z":"9a1eebd9.5fc8","name":"Retrieving raw GPS Data","func":"// The received message is stored in 'msg'\n// It will have at least a 'payload' property:\n// console.log(msg.payload);\n// The 'context' object is available to store state\n// between invocations of the function\n// context = {};\n\nvar RMC = msg.payload.split(',');\n\nmsg.payload = {d:{\n\t\"latitude\":parseFloat((RMC[3]^null)/100),\n\t//\"N-S\":RMC[4],\n\t\"longitude\":parseFloat((RMC[5]^null)/100)\n\t//\"E-O\":RMC[6],\n}};\n\nreturn msg;\n\n//msg.payload = parseFloat(msg.payload.replace(\"temp=\",\"\").replace(\"'C\\n\",\"\"));","outputs":1,"noerr":0,"x":386.75,"y":321.5,"wires":[["814eff5.7b087"]]},{"id":"4f0a16d.5591fe8","type":"comment","z":"9a1eebd9.5fc8","name":"From Robot to IBM Cloud","info":"","x":633.0000152587891,"y":284.75000190734863,"wires":[]},{"id":"bc6ad850.5a75c8","type":"inject","z":"9a1eebd9.5fc8","name":"STANDBY","topic":"","payload":"$PMTK161,0*28","payloadType":"str","repeat":"","crontab":"","once":false,"x":572.5,"y":96.57141876220703,"wires":[["2e1f45c2.17a8ba"]]},{"id":"a19dc4b2.184878","type":"inject","z":"9a1eebd9.5fc8","name":"AWAKE","topic":"","payload":"$PMTK010,002*2D","payloadType":"str","repeat":"","crontab":"","once":false,"x":567.5,"y":138.57141780853271,"wires":[["2e1f45c2.17a8ba"]]},{"id":"59a974fd.591bfc","type":"inject","z":"9a1eebd9.5fc8","name":"FIRMWARE","topic":"","payload":"$PMTK605*31","payloadType":"str","repeat":"","crontab":"","once":false,"x":586.5,"y":182.57141780853271,"wires":[["2e1f45c2.17a8ba"]]},{"id":"faaaa8a7.8627e8","type":"inject","z":"9a1eebd9.5fc8","name":"RMC Only","topic":"","payload":"$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29","payloadType":"str","repeat":"","crontab":"","once":false,"x":580.5,"y":225.57141780853271,"wires":[["2e1f45c2.17a8ba"]]},{"id":"d1d9cf9a.73b5","type":"comment","z":"9a1eebd9.5fc8","name":"Commande MTK2339","info":"Les différentes commandes du global star MTK3339","x":517.5,"y":53.571417808532715,"wires":[]},{"id":"2e1f45c2.17a8ba","type":"serial out","z":"9a1eebd9.5fc8","name":"","serial":"a6e69c57.151e3","x":859.7857055664062,"y":135.28571224212646,"wires":[]},{"id":"ac41119.0053ff","type":"comment","z":"9a1eebd9.5fc8","name":"GPS Sensor Part","info":"","x":126.625,"y":52.250000953674316,"wires":[]},{"id":"20a47087.553f7","type":"comment","z":"9a1eebd9.5fc8","name":"From GPS to Serial","info":"","x":178.875,"y":286,"wires":[]},{"id":"cd97c50c.100b18","type":"http in","z":"9a1eebd9.5fc8","name":"/gps","url":"/gps","method":"get","swaggerDoc":"","x":85.25000762939453,"y":668.9643225669861,"wires":[["ac7200ae.33716"]]},{"id":"8345696f.870d08","type":"function","z":"9a1eebd9.5fc8","name":"setHTTPheader","func":"// If sending JSON data the content type is:\n//msg.headers={\"Content-Type\":\"application/json\"};\n\n// For HTML use the content type line below:\nmsg.headers={\"Content-Type\":\"text/html\"};\nreturn msg;","outputs":1,"noerr":0,"x":537.3929061889648,"y":851.2499384880066,"wires":[["b995c6af.d07258"]]},{"id":"976ff5b9.0a0f68","type":"debug","z":"9a1eebd9.5fc8","name":"","active":false,"console":"false","complete":"false","x":564.8214721679688,"y":792.5357060432434,"wires":[]},{"id":"edfe01ac.0d268","type":"debug","z":"9a1eebd9.5fc8","name":"","active":false,"console":"false","complete":"false","x":649.5000686645508,"y":591.0000076293945,"wires":[]},{"id":"ac7200ae.33716","type":"function","z":"9a1eebd9.5fc8","name":"Retrieving Gps Data","func":"var latitude = {payload: JSON.stringify(context.global.d.latitude)};\nvar longitude = {payload: JSON.stringify(context.global.d.longitude)};\n\nmsg.payload = {'d':\n {\n 'latitude':latitude.payload,\n 'longitude':longitude.payload\n }\n \n };\n\nreturn msg;","outputs":1,"noerr":0,"x":246.8214111328125,"y":728.9642786979675,"wires":[["47feab07.a2cd34","44adb13a.18e18"]]},{"id":"47feab07.a2cd34","type":"debug","z":"9a1eebd9.5fc8","name":"","active":false,"console":"false","complete":"false","x":461.5357360839844,"y":730.1071362495422,"wires":[]},{"id":"b995c6af.d07258","type":"http response","z":"9a1eebd9.5fc8","name":"","x":706.9643402099609,"y":851.250235080719,"wires":[]},{"id":"b4cc7a86.109f98","type":"function","z":"9a1eebd9.5fc8","name":"Gathering GPS Data","func":"var d = msg.payload.d;\n//context.flow.d = d; \ncontext.global.d = d;\nreturn msg;\n","outputs":1,"noerr":0,"x":442.00000762939453,"y":546.0000114440918,"wires":[["edfe01ac.0d268","9c310ae.ef17df8","59f3d356.b4a6ac","5113f431.7de2ac"]]},{"id":"400400ae.099c1","type":"comment","z":"9a1eebd9.5fc8","name":"From GPS Sensor to IBM Cloud","info":"","x":176.25000762939453,"y":498.5000138282776,"wires":[]},{"id":"bccf0ca0.6709","type":"comment","z":"9a1eebd9.5fc8","name":"My IoT Device Location On Google Map","info":"","x":196.25000762939453,"y":628.9643225669861,"wires":[]},{"id":"d471a852.c30128","type":"mqtt in","z":"9a1eebd9.5fc8","name":"MQTT-gps","topic":"gps","qos":"2","broker":"6ca3a41a.f123ec","x":110.16669464111328,"y":546.8899574279785,"wires":[["37a43638.7120ea"]]},{"id":"37a43638.7120ea","type":"json","z":"9a1eebd9.5fc8","name":"","x":254.8333511352539,"y":546.889949798584,"wires":[["b4cc7a86.109f98"]]},{"id":"44adb13a.18e18","type":"template","z":"9a1eebd9.5fc8","name":"My robot here","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n\n \n My Robot Location\n \n \n \n \n \n

Where is my IBM Cloud Robot?

\n

GPS Location: (Latitude: {{payload.d.latitude}}, Longitude: {{payload.d.longitude}})

\n \n
\n \n \n \n","x":363.20835876464844,"y":793.1399540901184,"wires":[["8345696f.870d08","976ff5b9.0a0f68"]]},{"id":"a405ecd3.c96fd","type":"inject","z":"9a1eebd9.5fc8","name":"Test","topic":"","payload":"{ \"d\": { \"latitude\": -33.874647, \"longitude\": 151.233802 } }","payloadType":"str","repeat":"4","crontab":"","once":false,"x":143,"y":170,"wires":[["279fc46f.7f36ec","699360c4.9135f"]]},{"id":"279fc46f.7f36ec","type":"mqtt out","z":"9a1eebd9.5fc8","name":"MQTT-gps","topic":"gps","qos":"2","retain":"","broker":"867260d8.6e4528","x":306,"y":169,"wires":[]},{"id":"699360c4.9135f","type":"debug","z":"9a1eebd9.5fc8","name":"","active":false,"console":"false","complete":"false","x":311,"y":226,"wires":[]},{"id":"bdf6973b.0561e8","type":"comment","z":"9a1eebd9.5fc8","name":"GPS Test For inside","info":"","x":162.99999999999997,"y":117.99999999999997,"wires":[]},{"id":"9c310ae.ef17df8","type":"ui_text","z":"9a1eebd9.5fc8","group":"c96d28f5.fb7e08","order":"12","width":"","height":"","name":"GPS - Latitude:","label":"GPS - Latitude:","format":"{{msg.payload.d.latitude}}","layout":"","x":662.5000228881836,"y":507.08334159851074,"wires":[]},{"id":"59f3d356.b4a6ac","type":"ui_text","z":"9a1eebd9.5fc8","group":"c96d28f5.fb7e08","order":"13","width":"","height":"","name":"GPS - Longitude:","label":"GPS - Longitude:","format":"{{msg.payload.d.longitude}}","layout":"","x":670.1667098999023,"y":544.8610515594482,"wires":[]},{"id":"5113f431.7de2ac","type":"ui_template","z":"9a1eebd9.5fc8","group":"c96d28f5.fb7e08","name":"","order":0,"width":0,"height":0,"format":"

IBM Cloud Robot Location

\n\n
\n
Go to robot GPS map: Click on (30 ~ 60 sec)
\n
","storeOutMessages":true,"fwdInMessages":true,"x":637.4999656677246,"y":635.0000257492065,"wires":[[]]},{"id":"867260d8.6e4528","type":"mqtt-broker","z":"","broker":"iot.eclipse.org","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"ebdf036.1803a","type":"serial-port","z":"","serialport":"/dev/ttyAMA0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":true},{"id":"a6e69c57.151e3","type":"serial-port","z":"","serialport":"/dev/ttyAMA0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":true},{"id":"6ca3a41a.f123ec","type":"mqtt-broker","z":"","broker":"iot.eclipse.org","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"c96d28f5.fb7e08","type":"ui_group","z":"","name":"GPS","tab":"22f53165.4c6b7e","disp":true,"width":"6"},{"id":"22f53165.4c6b7e","type":"ui_tab","z":"","name":"GPS","icon":"dashboard"}]