Sunday, September 2, 2018

gps module and arduino


GPS



GPS stands for Global Positioning System and can be used to determine position, time, and speed

Wire the NEO-6M GPS module to your Arduino by following the schematic below.

      The module GND pin is connected to Arduino GND pin



·         The module RX pin is connected to Arduino pin 3

·         The module TX pin is connected to Arduino pin 4

·         The module VCC pin is connected to Arduino 5V pin





#include<SoftwareSerial.h>

// The serial connection to the GPS module
SoftwareSerialss(4,3);

void setup(){
  Serial.begin(9600);
  ss.begin(9600);
}

void loop(){
  while(ss.available()>0){
    // get the byte data from the GPS
    bytegpsData=ss.read();
    Serial.write(gpsData);
  }
}












$GPGGA,110617.00,41XX.XXXXX,N,00831.54761,W,1,05,2.68,129.0,M,50.1,M,,*42
$GPGSA,A,3,06,09,30,07,23,,,,,,,,4.43,2.68,3.53*02
$GPGSV,3,1,11,02,48,298,24,03,05,101,24,05,17,292,20,06,71,227,30*7C
$GPGSV,3,2,11,07,47,138,33,09,64,044,28,17,01,199,,19,13,214,*7C
$GPGSV,3,3,11,23,29,054,29,29,01,335,,30,29,167,33*4E
$GPGLL,41XX.XXXXX,N,00831.54761,W,110617.00,A,A*70
$GPRMC,110618.00,A,41XX.XXXXX,N,00831.54753,W,0.078,,030118,,,A*6A
$GPVTG,,T,,M,0.043,N,0.080,K,A*2C






1.)$GPGGA,110617.00,41XX.XXXXX,N,00831.54761,W,1,05,2.68,129.0,M,50.1,M,,*42

GP after the $ indicates it is a GPS position.

·         110617 – represents the time at which the fix location was taken, 11:06:17 UTC

·         41XX.XXXXX,N – latitude 41 deg XX.XXXXX’ N

·         00831.54761,W – Longitude 008 deg 31.54761′ W

·         1 – fix quality (0 = invalid; 1= GPS fix; 2 = DGPS fix; 3 = PPS fix; 4 = Real Time Kinematic; 5 = Float RTK; 6 = estimated (dead reckoning); 7 = Manual input mode; 8 = Simulation mode)

·         05 – number of satellites being tracked



·         $GPGSA – GPS active satellites

·         $GPGSV – Detailed GPS satellite information

·         $GPGLL – Geographic Latitude and Longitude

·         $GPRMC – Essential GPS pvt (position, velocity, time) data






Tech IOT Web Developer

No comments:

Post a Comment