Top Ad unit 728 × 90

Hot News

recent

Parsing data GPS PMB 648 dengan ATMega128

Selamat malam sobat,.. malam ini mau berbagi ilmu nih..... sekalian buat dokumentasi mengenai Parsing data GPS PMB 648 dengan ATMega128. disini spesifikasi yang saya gunakan adalah
Minimum system AtMega 128
LCD 4x20
GPS Paralax PMB-648
Power Bank sebagai suplay

berikut penampakan hardwarenya

Hardware untuk parsing data GPS

data keluaran gpsnya adalah seperti berikut jika di interface kan langsung ke PC

$GPGGA,124726.481,0716.6087,S,11247.6956,E,0,00,,27.2,M,12.3,M,,0000*54<\r>
$GPGSA,A,1,,,,,,,,,,,,,,,*1E<\r>
$GPRMC,124726.481,V,0716.6087,S,11247.6956,E,,,111013,,,N*65<\r>


Pada Gps PMB-648 ini mengirimkan data serial yang bisa langsung di terima microkontroler dengan baudrate 4800.

Pembagian dari data GPS adalah seperti berikut

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
Where:
     GGA          Global Positioning System Fix Data
     123519       Fix taken at 12:35:19 UTC
     4807.038,N   Latitude 48 deg 07.038' N
     01131.000,E  Longitude 11 deg 31.000' E
     1            Fix quality: 0 = invalid
                               1 = GPS fix (SPS)
                               2 = DGPS fix
                               3 = PPS fix
                               4 = Real Time Kinematic
                               5 = Float RTK
                               6 = estimated (dead reckoning) (2.3 feature)
                               7 = Manual input mode
                               8 = Simulation mode
     08           Number of satellites being tracked
     0.9          Horizontal dilution of position
     545.4,M      Altitude, Meters, above mean sea level
     46.9,M       Height of geoid (mean sea level) above WGS84
                      ellipsoid
     (empty field) time in seconds since last DGPS update
     (empty field) DGPS station ID number
     *47          the checksum data, always begins with *

//Ref : http://www.boondog.com/tutorials/gps/gps.html


berikut listing program untuk Parsing data GPS PMB 648 dengan ATMega128 menggunakan Code Vision AVR


//====================================
// Bakhtriyar Sierad
// bakhtiyarsierad@gmail.com
// tyrsrd@student.eepis-its.edu
// http://www.nunutjoe.com
// ===================================
// Program terster
// Parsing data GPS PMB 648 dengan ATMega128
// 11 Oktober 2013
// Progres Tugas Akhir :D
//====================================

#include <mega128.h>
#include <delay.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>

// Alphanumeric LCD Module functions
#include <alcd.h>

#ifndef RXB8
#define RXB8 1
#endif

#ifndef TXB8
#define TXB8 0
#endif

#ifndef UPE
#define UPE 2
#endif

#ifndef DOR
#define DOR 3
#endif

#ifndef FE
#define FE 4
#endif

#ifndef UDRE
#define UDRE 5
#endif

#ifndef RXC
#define RXC 7
#endif

#define FRAMING_ERROR (1<<FE)
#define PARITY_ERROR (1<<UPE)
#define DATA_OVERRUN (1<<DOR)
#define DATA_REGISTER_EMPTY (1<<UDRE)
#define RX_COMPLETE (1<<RXC)

// Get a character from the USART1 Receiver
#pragma used+
char getchar1(void)
{
char status,data;
while (1)   //eneng while 1nak kene opo oleh?bukane mengko prograqme mbulet nak kene?
      {
      while (((status=UCSR1A) & RX_COMPLETE)==0);
      data=UDR1;
      if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0)
         return data;
      }
}
#pragma used-

// Write a character to the USART1 Transmitter
#pragma used+
void putchar1(char c)
{
while ((UCSR1A & DATA_REGISTER_EMPTY)==0);
UDR1=c;
}
#pragma used-

// Standard Input/Output functions
#include <stdio.h>

// Declare your global variables here
int i, temp;
char data[100];
char *lon[100];
char *gps[100];
char buffer[100];
char tes[100];

void GPSdata(){
  if(getchar()=='$'){
        if(getchar()=='G')
          if(getchar()=='P')
            if(getchar()=='G')
              if(getchar()=='G'){
                for(i=0;i<=49;i++){
                  data[i]=getchar();
                }
                gps[0]=strtok(data,",");
                for(i=0;i<=8;i++)
                  gps[i]=strtok(NULL,",");
      }
      }
}


void main(void)
{
// Declare your local variables here

//// Konfigurasi USART Baud Rate 4800 ///

// USART0 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART0 Receiver: On
// USART0 Transmitter: On
// USART0 Mode: Asynchronous
// USART0 Baud Rate: 4800
UCSR0A=0x00;
UCSR0B=0x18;
UCSR0C=0x06;
UBRR0H=0x00;
UBRR0L=0x8F;

// USART1 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART1 Receiver: On
// USART1 Transmitter: On
// USART1 Mode: Asynchronous
// USART1 Baud Rate: 4800
UCSR1A=0x00;
UCSR1B=0x18;
UCSR1C=0x06;
UBRR1H=0x00;
UBRR1L=0x8F;

// Alphanumeric LCD initialization
// Connections specified in the
// Project|Configure|C Compiler|Libraries|Alphanumeric LCD menu:
// RS - PORTA Bit 0
// RD - PORTA Bit 1
// EN - PORTA Bit 2
// D4 - PORTA Bit 4
// D5 - PORTA Bit 5
// D6 - PORTA Bit 6
// D7 - PORTA Bit 7
// Characters/line: 20
lcd_init(20);
             lcd_gotoxy(0,0)  ;
   // lcd_putsf("Halo bakhtiyar");        
    //lcd_gotoxy(2,1) ;
    //lcd_putsf("Selamat Malam");
while (1)
      {
      // Place your code here

// Menampilkan data Longitude

      lcd_clear();
      GPSdata();
      lcd_gotoxy(0,0) ;
      lcd_putsf("LAT: ");
      lcd_puts(gps[1]);  
      lcd_putsf(",");
      lcd_puts(gps[2]);

// Menampilkan data Latitude

     GPSdata();
      lcd_gotoxy(0,1) ;
      lcd_putsf("LON: ");  
      lcd_puts(gps[3]);
      lcd_putsf(",");
      lcd_puts(gps[4]);  

// Menampilkan data Banyak satelite yang diterima
    
      GPSdata();
      lcd_gotoxy(0,2) ;
      lcd_putsf("Sat: ");
      lcd_puts(gps[6]);

// Menampilkan status valid tidaknya data GPS
      
      GPSdata();
      lcd_gotoxy(0,3) ;
      lcd_putsf("Status: ");
      i=atoi(gps[5]);
      if(i=='1')
        lcd_putsf("oke");  
      else
        lcd_putsf("Cari  ");
      lcd_puts(gps[5]);
      delay_ms(500);  
       }
}

Berikut hasil pengujian yang saya lakukan tanggal 10 Oktober 2013 Dini hari kisaran pukul 12.10
dengan lokasi di Lapangan merah Gedung baru PENS

Pengujian data dini hari 10 oktober 2013
Berikut pengujian pada siang hari tanggal 11 Oktober 2013 di lapangan rumput sebelah lapangan merah gedung baru PENS pukul 11.15

Pengujian alat di siang hari

Data gps dengan menggunakan Smartphone Xperia Mini ST15i

Banyaknya satelite yang ditangkap dengan menggunakan Smartphone Xperia Mini ST15i

dan berikut pengujian pengambilan data di lapangan merah gedung baru PENS 11 Oktober 2013 pukul

Data GPS dari Micro 

Data gps dengan menggunakan Smartphone Xperia Mini ST15i

Data banyknya satelite dengan menggunakan Smartphone Xperia Mini ST15i

Nah berikut file project Code Vision avr Parsing data GPS PMB 648 dengan ATMega128 .. Atau berikut untuk melihat project yang lainnya
Sobat....
program berikut jauh dari kesempurnaan .. sehingga bila ada yang menyempurnakan atau ada cara lain untuk melakukan parsing silahkan berbagi :)

Semoga membantu.... dan tunggu update selanjutnya..
:D
Parsing data GPS PMB 648 dengan ATMega128 Reviewed by Bakhtiyar Sierad - Hosterbyte on Friday, October 11, 2013 Rating: 5

6 comments:

  1. This design is wicked! You definitely know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved
    to start my own blog (well, almost...HaHa!) Excellent job.

    I really enjoyed what you had to say, and more than that,
    how you presented it. Too cool!

    my webpage :: crib mattress reviews 2014

    ReplyDelete
  2. I think this is among the most vital information for me.
    And i am glad reading your article. But want to remark on some general things,
    The website style is wonderful, the articles is really nice : D.
    Good job, cheers

    Here is my homepage; Infant car seat 2014

    ReplyDelete
  3. For the benefit of developing an useful product comparisons,
    we've looked at routers in this range that reveal similar attributes for
    example IEEE 802.11n wi fi standards, 2.4-ghz band and double antennas.
    If you're searching for a new router, nothing less than an n layer 3 switch is highly recommended.
    It will be advisable to update to your wireless n layer 3 switch,
    when you own a wireless g router. The most recent routers additionally increase speed with wifi Quality of Support applications (QoS) common, which makes efficient usage of Ethernet connections by prioritizing multimedia visitors based on the program's sensitivity to delay.
    Many wireless n routers additionally apply multiple-input and several-output (MIMO) radio antennae to boost speeds.


    Also visit my web blog; top routers 2014

    ReplyDelete
  4. I love what you guys are usually up too. This
    type of clever work and exposure! Keep up the very good works guys I've included
    you guys to blogroll.

    Also visit my webpage - best infant car seat 2014

    ReplyDelete
  5. Wɦat'ѕ up i am kavin, its mү fіrst occasion tо commenting
    anyplace, wҺen i reaԁ tҺis article i thouǥht i cοuld аlso create comment duе to tҺіѕ
    gߋod post.

    Feel free tο visit my bllg post ... acid alkaline diet simplified

    ReplyDelete
  6. Ι always spent mƴ half an hօur to гead tҺis web site's
    posts daily along witɦ a cup of coffee.

    Review mƴ webpage - fight acne

    ReplyDelete

Don't Forget to leave comment

All Rights Reserved by Nunutjoe All In One © 2014 - 2015
Powered By Blogger, Designed by Sweetheme

Contact Form

Name

Email *

Message *

Powered by Blogger.