{"id":2357,"date":"2024-07-16T17:04:48","date_gmt":"2024-07-16T17:04:48","guid":{"rendered":"https:\/\/iotthinghub.com\/?p=2357"},"modified":"2024-08-12T12:52:52","modified_gmt":"2024-08-12T12:52:52","slug":"gps-system-neo-6m-0-001","status":"publish","type":"post","link":"https:\/\/iotthinghub.com\/?p=2357","title":{"rendered":"GPS System NEO-6M-0-001"},"content":{"rendered":"\n<p class=\"has-text-color has-link-color wp-elements-1ed548064c41c259a8bc101a47f511a4 wp-block-paragraph\" style=\"color:#5c5c5c\">GPS stands for Global Positioning System and used to detect the Latitude and Longitude of any location on the earth, with exact UTC (Universe Time Coordinated) time. It is one of the global navigation satellite system (GSS) that provide geo-location and time information to a GPS receiver anywhere on or near the earth where is an unobstructed line of sight to four or more GPS satellites. The GPS module sends both fixed data and variable data. Our main function here to find the Latitude and Longitude; let\u2019s look at the data that we received from the module-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"35\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/image-3-1024x35.png\" alt=\"\" class=\"wp-image-2359\" style=\"width:585px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/image-3-1024x35.png 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/image-3-300x10.png 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/image-3-768x26.png 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/image-3.png 1253w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-77d9d49a6d2681450b2713a879547b62 wp-block-paragraph\" style=\"color:#5c5c5c\">Example: $GPGGA, 161229.487, 3723.2475N, 12158.3416W, 1, 07, 1.0, 9.0,M,-34.2,M,0000*18<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"542\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-12-1024x542.jpg\" alt=\"\" class=\"wp-image-2361\" style=\"width:777px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-12-1024x542.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-12-300x159.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-12-768x406.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-12.jpg 1349w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"385\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-13-1-1024x385.jpg\" alt=\"\" class=\"wp-image-2362\" style=\"width:763px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-13-1-1024x385.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-13-1-300x113.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-13-1-768x289.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-13-1.jpg 1306w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-9265219dd0fe1b67c72d798e9f202ce2 wp-block-paragraph\" style=\"color:#5c5c5c\">Since we want to know the Latitude and Longitude, we only need $GPGGA \u2013 data. UART functions are available on UART library. We use ATmega8<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"73\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-7-1-1024x73.jpg\" alt=\"\" class=\"wp-image-2365\" style=\"width:645px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-7-1-1024x73.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-7-1-300x21.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-7-1-768x55.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-7-1.jpg 1242w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-3385b16246b83cacc32c521fc8501b0a wp-block-paragraph\" style=\"color:#5c5c5c\">Let\u2019s first store only $GPGGA data-<\/p>\n\n\n\n<p class=\"has-text-color has-link-color has-upper-heading-font-size wp-elements-f35d3ce3b76ecfc07d121988d1cb8c04 wp-block-paragraph\" style=\"color:#6c8a97\">void gps_system(void) -&gt; store $GPGGA<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid gps_system(void)\n{\nvalue=usart_getc();\nif(value==&#039;$&#039;)\n\t{\n\tvalue=usart_getc();\n\t if(value==&#039;G&#039;)\n\t\t{\n\t\tvalue=usart_getc();\n\t\t if(value==&#039;P&#039;)\n\t\t\t{\n\t\t\tvalue=usart_getc();\n\t\t\t if(value==&#039;G&#039;)\n\t\t\t \t{\n\t\t\t\t value=usart_getc();\n\t\t\t\t  if(value==&#039;G&#039;)\n\t\t\t\t\t{\n\t\t\t\t\t value=usart_getc();\n\t\t\t\t\t if(value==&#039;A&#039;)\n\t\t\t\t\t  {\n\t\t\t\t\t  value=usart_getc();\n\t\t\t\t\t   if(value==&#039;,&#039;)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlat_long(); \/\/filter setion\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n<\/pre><\/div>\n\n\n<p class=\"has-text-color has-link-color wp-elements-e2190f69f9f75d26e4c40047a59a6648 wp-block-paragraph\" style=\"color:#5c5c5c\">In the above function we enter into the $GPGGA fixed data. Now filter in and display it in the LCD display.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid lat_long(void)\n{\n filter=usart_getc();\n GMT&#x5B;0]=filter;\n for(str_count=1;filter!=&#039;,&#039;;str_count++)\n\t{\n\tGMT&#x5B;str_count]=usart_getc();\n\tfilter=GMT&#x5B;str_count];\n\t}\n filter=usart_getc();\n latitude&#x5B;0]=filter;\n for(str_count=1;filter!=&#039;,&#039;;str_count++)\n\t{\n\tlatitude&#x5B;str_count]=usart_getc();\n\tfilter=latitude&#x5B;str_count];\n\t}\n filter=usart_getc();\n latitude&#x5B;str_count]=filter;\n filter=usart_getc(); \/\/nul char to remove char ,(0x2e)\n filter=usart_getc(); \/\/nul char to remove char ,(0x2e)\n for(str_count=0;filter!=&#039;,&#039;;str_count++)\n\t{\n\tlongitude&#x5B;str_count]=usart_getc();\n\tfilter=longitude&#x5B;str_count];\n\t}\n filter=usart_getc();\n longitude&#x5B;str_count]=filter;\n LCD_write_string(1,1,latitude);\n LCD_write_string(1,2,longitude);\n}\n<\/pre><\/div>\n\n\n<p class=\"has-text-color has-link-color wp-elements-1888af16dc851338e730199dd97be8c3 wp-block-paragraph\" style=\"color:#5c5c5c\">The main program as follow-<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\n  \/***********************************************************\n  ************************************************************\n  ** GPS System :$GPGGA-Global Positioning System Fixed data *\n  ** GMT Time: Latitude: Longitude: ---: Altitude            *\n  **                                                         *\n  ***********************************************************\/\n  #include&lt;avr\/io.h&gt;\n  #include&lt;util\/delay.h&gt;\n  #include&lt;stdio.h&gt;\n  #include&quot;gsm.h&quot;\n  #include&quot;lcd.h&quot;\n int main(void)\n  {\n    gsm_init(); \/\/USART initilize with timer\n    LCD_INIT();\n    DDRD|=(1&lt;&lt;4);\n    LCD_write_string(1,1,&quot;Welcome&quot;);\n    _delay_ms(5000);\n    while(1)\n      {\n\t     if(min)\n\t     gps_system(); \/\/data update every 5s\n\t     min?(PORTD|=(1&lt;&lt;4)):(PORTD&amp;=~(1&lt;&lt;4));\n       }\n    return 0;\n}\n<\/pre><\/div>\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-3e41869c wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/GPS-System.rar\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--40)\">download<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p class=\"has-text-color has-link-color has-upper-heading-font-size wp-elements-33878f69d88d33d6c77a9ed4dcbcc84e wp-block-paragraph\" style=\"color:#252525\"><a href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/GPS-System.rar\">GPS System.rar<\/a><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>GPS stands for Global Positioning System and used to detect the Latitude and Longitude of any location on the earth, with exact UTC (Universe Time Coordinated) time. It is one of the global navigation satellite system (GSS) that provide geo-location and time information to a GPS receiver anywhere on or near the earth where is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-2357","post","type-post","status-publish","format-standard","hentry","category-uart"],"_links":{"self":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2357"}],"version-history":[{"count":7,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2357\/revisions"}],"predecessor-version":[{"id":2661,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2357\/revisions\/2661"}],"wp:attachment":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}