Categories

GPS Neo-6m Satellite Positioning Module for Arduino STM32 C51

GPS Neo-6m Satellite Positioning Module for Arduino STM32 C51
GPS Neo-6m Satellite Positioning Module for Arduino STM32 C51 GPS Neo-6m Satellite Positioning Module for Arduino STM32 C51 GPS Neo-6m Satellite Positioning Module for Arduino STM32 C51 GPS Neo-6m Satellite Positioning Module for Arduino STM32 C51 GPS Neo-6m Satellite Positioning Module for Arduino STM32 C51
Brand: Giga
Product Code: GPSNEO6M
Availability: 7
Price: R210.00
Ex Tax: R210.00
Qty:     - OR -   Add to Wish List
Add to Compare

GPS Neo-6m Satellite Positioning Module for Arduino STM32 C51

Description:
1. Get 51 Arduino STM32 microcontroller routines
2. with a USB interface, you can watch the computer positioning effect directly phone line.
3. with the passive ceramic antenna and passive antenna amplifier, make better use of the individual effects.
4. with SMA interface can be directly connected to an active antenna SMA
5. Size:39*25.5mm

Link to Dokuments of U-Blox module  and here 

Video of module 

TinyGPS++ is a new Arduino library for parsing NMEA data streams provided by GPS modules.
Like its predecessor, TinyGPS, this library provides compact and easy-to-use methods for extracting position, date, time, altitude, speed, and course from consumer GPS devices. 
However, TinyGPS++’s programmer interface is considerably simpler to use than TinyGPS, and the new library can extract arbitrary data from any of the myriad NMEA sentences out there, even proprietary ones.
Download the Arduino source code from here 
To install this library, download here, unzip the archive into the Arduino “libraries” folder, and restart Arduino. You should rename the folder “TinyGPSPlus”.

 

Qt-based car GPS monitoring system (6) GPS information processing

GPS Module (NEO-6M UBLOX)

GPS module through tiny6410 development board with the serial port to connect to the development board to pass GPS positioning information (NMEA-0183 protocol).

 

Introduction to the NMEA-0183 protocol

NMEA 0183 is the National Marine Electronics Association (National Marine Electronics Association) for the marine electronic equipment to develop the standard format. Has now become a GPS navigation equipment unified RTCM (Radio Technical Commission for Maritime services) standard protocol.

NMEA-0183 protocol uses ASCII code to transfer GPS positioning information, we call the frame.

这里写图片描述

$ GPRMC (Recommended Minimum Specific GPS / Transit Data)

The basic format GPRMC statement is as follows: GPRMC, (1), ( 2), (3), (4), (5), (6), (7), (8), (9), (10), ( 11), (12) * hh (CR) (LF)

E.g: 
$ GPRMC, 033308.00, A, 3022.29739, N, 11454.04296, E, 0.044, 111116 ,,, A * 75

(1) UTC time, hhmmss (hours and seconds) 
(2) positioning state, A = effective positioning, V = invalid positioning 
(3) latitude ddmm.mmmmm (degrees) 
(4) latitude hemisphere N (northern hemisphere) or S (southern hemisphere) 
(5) longitude dddmm.mmmmm (degrees) 
(6) longitude hemisphere E (longitude) or W (west longitude) 
(7) The ground speed (000.0 to 999.9) 
(8) ground heading (000.0 ~ 359.9 degrees, with true north as the reference) 
(9) UTC date, ddmmyy (day month month) 
(10) magnetic declination (000.0 ~ 180.0 degrees, less than the leading digits complement 0) 
(11) Magnetic declination direction, E (east) or W (west) 
(12) Mode indication (A = autonomous positioning, D = differential, E = estimation, N = data invalid)

The serial port receives GPS complete data

  $ GPRMC, 033308.00, A, 3022.29739, N, 11454.04296, E, 0.044, 111116 ,,, A * 75                                 
 $ GPVTG ,, T ,, M, 0.044, N, 0.081, K, A * 2A                                                                  
 $ GPGGA, 033308.00, 3022.29739, N, 11454.04296, E, 1,08,0.96, 115.5, M, -9.0, M ,, * 4D                          
 $ GPGSA, A, 3,05,02,06,19,12,09,25,29 ,,,,, 1.75,0.96,1.46 * 02                                           
 $ GPGSV, 4,1,14,02,63,013,38,05,64,281,33,06,43,074,31,07,01,084, * 71                                 
 $ GPGSV, 4,2,14,09,18,043,27,12,24,249,32,13,24,179, 15,02,203, * 7F                                   
 $ GPGSV, 4,3,14,17,13,148, 19,30,147,20,20,14,249,18,25,16,288,27 * 7F                                 
 $ GPGSV, 4,4,14,29,12,321,25,30,01,113, * 72                                                           
 $ GPGLL, 3022.29739, N, 11454.04296, E, 033308.00, A, A * 6B 

GPS information analysis function

 // GPS information struct st_gps_info {
     Double latitude; // longitude double longitude; // latitude float speed; // velocity float direction; // heading unsigned char NS;
     Unsigned char EW;
 };


 Int GpsDialog :: getGPSinfo (QString & str)
 {
     St_gps_info gps;
     QString cHead = "$ GPRMC";
     QString tmp;
     Bool ok;
     Str = str.mid (str.indexOf (cHead, 1), 100);
     Str = str.section ('$', 1,1);
     QDebug () << str;
     Tmp = str.section (',', 2,2);
     If (tmp == "V") {
         Postion = tr ("Invalid Targeting");
         Return -1;
     }}
     Tmp = str.section (',', 3,3);
     QDebug () << tmp;
     Gps.longitude = tmp.toDouble (& ok) / 100;
     Tmp = str.section (',', 5,5);
     Gps.latitude = tmp.toDouble (& ok) / 100;
     Tmp = str.section (',', 4,4);
     If (tmp == "N")
         Gps.NS = 'N';
     Else
         Gps.NS = 'S';
     Tmp = str.section (',', 6,6);
     If (tmp == "E")
         Gps.EW = 'E';
     Else
         Gps.EW = 'W';
     Tmp = str.section (',', 7,7);
     Gps.speed = tmp.toFloat (& ok) * 1.85;
     Tmp = str.section (',', 8,8);
     Gps.direction = tmp.toFloat (& ok);
     If (gps.NS == 'N')
         Postion = tr ("latitude:");
     Else
         Postion = tr ("south latitude:");
     Postion + = QString :: number (gps.longitude, 'f', 2);
     Postion + = "";
     If (gps.EW == 'E')
         Postion + = tr ("longitude:");
     Else
         Postion + = tr ("W:");
     Postion + = QString :: number (gps.latitude, 'f', 2);

     Speed ​​= tr ("speed:");
     Speed ​​+ = QString :: number (gps.speed, 'f', 2);
     Speed ​​+ = "Km / H";
     Speed ​​+ = "";
     Speed ​​+ = tr ("direction (north):");
     Speed ​​+ = QString :: number (gps.direction, 'f', 2);
     Speed ​​+ = tr ("degrees");
     Return 0;
 }} 

GPS debugging information

  Com_info ===== 
 "$ GPRMC, 045424.00, A, 3022.29979, N, 11454.03987, E, 0.516, 111116 ,,, A * 79
 $ GPVTG ,, T ,, M, 0.516, N, 0.956, K, A * 2B
 $ GPGGA, 045424.00, 3022.29979, N, 11454.03987, E, 1,09,1.02, 124.6, M, -9.0, M ,, * 4F
 $ GPGSA, A, 3,05,02,06,07,20,29,13,30,15 ,,,, 1.82,1.02,1.50 * 04
 $ GPGSV, 3,1,12,02,57,095,29,04,71,104,31,05,59,009,27,06,22,112,17 * 7D
 $ GPGSV, 3,2,12,07,06,051,15,12,03,219,10,13,64,169,20,15,37,209,14 * 73
 $ GPGSV, 3,3,12,20,37,282,30,25,03,254, 29,41,302,32,30,14,081,28 * 7B
 $ GPGLL, 3022.29979, N, 11454.03987, E, 045424.00, A, A * 65
 " 
 Section ====== 
 "GPRMC, 045424.00, A, 3022.29979, N, 11454.03987, E, 0.516, 111116 ,,, A * 79
 " 
 Tmp ===== 
 "3022.29979" 

Qt program running interface

这里写图片描述

head File

  #ifndef GPSDIALOG_H
 #define GPSDIALOG_H
 #include <QtGui>
 #include "mapwidget.h"

 #define COM0 "/ dev / ttyUSB0"

 Class GpsDialog: public QDialog
 {
     Q_OBJECT
 Public:
     GpsDialog (QWidget * parent = 0);
     Int gpsInit (void);
     Int getGPSinfo (QString & str);
 Public slots:
     Void gpsRun (void);
 Private:
     Int fd_gps;
     Char * buff;
     QString postion;
     QString speed;
     MapWidget * mapGps;
     QGridLayout * layout;
     QLabel * labelBg;
     QLineEdit * lineGps;
     QLineEdit * lineSpeed;
     QToolButton * toolButton;
 };

 #endif // GPSDIALOG_H 

Implementation of the source

  #include "gpsdialog.h"
 #include "dht9000.h"


 GpsDialog :: GpsDialog (QWidget * parent)
     : QDialog (parent)
 {
     This-> setMinimumSize (800,480);
     This-> setMaximumSize (800,480);
     // Window title this-> setWindowIcon (QPixmap (": /images/1.png"));
     This-> setWindowTitle (tr ("GP9001 Car GPS Monitoring System"));
     // Window background labelBg = new QLabel (this);
     LabelBg-> setGeometry (QRect (0, 0, 800, 480));
     LabelBg-> setPixmap (QPixmap (": / images / 9001bg.jpg"));
     LabelBg-> setScaledContents (true);

     // timer object, 1 second to send a timeout () signal, call showState () function QTimer * timer = new QTimer (this);
     Timer-> start (1000);
     Connect (timer, SIGNAL (timeout ()), this, SLOT (gpsRun ()));

     Postion = "GPS no init.";
     Buff = (char *) malloc (1024);

     MapGps = new MapWidget (this);

     LineGps = new QLineEdit (this);
     LineGps-> setReadOnly (true);
     LineGps-> setAlignment (Qt :: AlignHCenter);
     LineGps-> setText (tr ("latitude: 123.44 latitude: 34.54"));

     LineSpeed ​​= new QLineEdit (this);
     LineSpeed-> setReadOnly (true);
     LineSpeed-> setAlignment (Qt :: AlignHCenter);
     LineSpeed-> setText (QString :: number (12.55, 'f', 2) + tr ("km / hour"));

     ToolButton = new QToolButton (this);
     ToolButton-> setText (tr ("return"));
     ToolButton-> setIcon (QPixmap (": /images/6.png"));
     ToolButton-> setIconSize (QPixmap (": /images/6.png"). Size ());
     ToolButton-> setAutoRaise (TRUE);
     ToolButton-> setToolButtonStyle (Qt :: ToolButtonTextUnderIcon);
     Connect (toolButton, SIGNAL (clicked ()), this, SLOT (accept ()));

     GpsInit ();

     Layout = new QGridLayout;
     Layout-> setSpacing (5);
     Layout-> addWidget (mapGps, 1,0,1,3);
     Layout-> addWidget (lineGps, 2,0);
     Layout-> addWidget (toolButton, 2,1);
     Layout-> addWidget (lineSpeed, 2,2);
     SetLayout (layout);
 }}

 Int GpsDialog :: getGPSinfo (QString & str)
 {
     St_gps_info gps;
     QString cHead = "$ GPRMC";
     QString tmp;
     Bool ok;
     Str = str.mid (str.indexOf (cHead, 1), 100);
     Str = str.section ('$', 1,1);
     QDebug () << "section ======" << endl << str;
     Tmp = str.section (',', 2,2);
     If (tmp == "V") {
         Postion = tr ("Invalid Targeting");
         Return -1;
     }}
     Tmp = str.section (',', 3,3);
     QDebug () << "tmp =====" << endl << tmp;
     Gps.longitude = tmp.toDouble (& ok) / 100;
     Tmp = str.section (',', 5,5);
     Gps.latitude = tmp.toDouble (& ok) / 100;
     Tmp = str.section (',', 4,4);
     If (tmp == "N")
         Gps.NS = 'N';
     Else
         Gps.NS = 's';
     Tmp = str.section (',', 6,6);
     If (tmp == "E")
         Gps.EW = 'E';
     Else
         Gps.EW = 'W';
     Tmp = str.section (',', 7,7);
     Gps.speed = tmp.toFloat (& ok) * 1.85;
     Tmp = str.section (',', 8,8);
     Gps.direction = tmp.toFloat (& ok);
     If (gps.NS == 'N')
         Postion = tr ("latitude:");
     Else
         Postion = tr ("south latitude:");
     Postion + = QString :: number (gps.longitude, 'f', 2);
     Postion + = "";
     If (gps.EW == 'E')
         Postion + = tr ("longitude:");
     Else
         Postion + = tr ("W:");
     Postion + = QString :: number (gps.latitude, 'f', 2);

     Speed ​​= tr ("speed:");
     Speed ​​+ = QString :: number (gps.speed, 'f', 2);
     Speed ​​+ = "Km / H";
     Speed ​​+ = "";
     Speed ​​+ = tr ("direction (north):");
     Speed ​​+ = QString :: number (gps.direction, 'f', 2);
     Speed ​​+ = tr ("degrees");
     Return 0;
 }}

 Void GpsDialog :: gpsRun () {
     Int nread;
     QString gpsInfo;
     Memset (buff, 0,1024);
     If ((nread = read (fd_gps, buff, 1024))> 0) {
         GpsInfo = buff;

         QDebug () << "com_info =====" << endl << gpsInfo;
         If (gpsInfo.length ()> 0)
             This-> getGPSinfo (gpsInfo);
     } Else {
         Postion = "GPS recvie error.";
         Speed ​​= postion;
     }}
     LineGps-> setText (postion);
     LineSpeed-> setText (speed);
 }}


 Int GpsDialog :: gpsInit (void) {
     Fd_gps = :: open (COM0, O_RDONLY);
     If (fd_gps <0) {
             Postion = "Can not Open Serial Port!";
             Postion + = COM0;
             Return -1;
     }}
     If (init_com (fd_gps) <0) {
             Postion = "Serial Init error!";
             Return -1;
     }}
     Postion = "GPS init OK.";
     LineGps-> setText (postion);
     Return 0;
 }}
 

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



Powered By OpenCart
Giga Technology © 2024