Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Extracting from GPS with 8051

Status
Not open for further replies.

DrWhoF

Advanced Member level 1
Advanced Member level 1
Joined
May 6, 2005
Messages
402
Helped
24
Reputation
48
Reaction score
11
Trophy points
1,298
Activity points
4,388
8051 gps

GPS receiver sends a lot of ASCII strings.
For example:
$GPGLL,2138.0754,S,11218.8060,E,202328,A*33
The usefull information is:
2138.0754 S(south) and 11218.8060 E(east)
Using 8051 serial port interrupt, what is the most efficient way of extracting this information and ignoring all other strings (hundreds of useless characters)
Thanks
 

gps 8051

use C library functions for string handling. Normally I test the algorithm on PC before putting it on 8051.
 

8051 gps project

The serial port interrupt routine should deliver ASCII characters into a buffer.
In your main program you should take characters from that buffer, decode $GPGLL sequence, and then just count commas and accept number (including decimal point) between 2 consecutive commas, then letter S (or N) between two next commas and so on.
When another string starts, and it always starts with "$", and the next 5 letters are not GPGLL, ignore next characters till next "$".
Regards,
IanP
 

    DrWhoF

    Points: 2
    Helpful Answer Positive Rating
gps receiver with 8051

Hi

I have done many project with GPS.

I think the first step you should do is to program the GPS to send only relevant data.

E.g. program it to send out only GPRMC & GPGGA every 5 sec
load data into buffer & process the data.

All the best

Bobi
 

nmea 8051

hi

how can i program the GPS

also where to find the Gramin protocol so that i can upload way points to thge gps

can i use the garmin protocol to determine what sentences it will send

thanks for help
 

gps using 8051

Hi

Look at the DS for the TX pin.

read the DS{data sheet} for the programming protocol

Most GPS use a type NMEA programming using ASCII command

Try the command by connecting a windows terminal to the GPS receiver

All the best

Bobi
 

gps with 8051

hi

my device supports NMEA version 3 as in datasheet

do u mean that i can use NMEA also to send commands not only to read data?

thanks for help
 

8051+gps

Hi

The answer is YES, most of the GPS receiver have a TX line as well as RX line

look in the DS for the connection diagram


All the best

Bobi
 

gps using microcontroller

hi

thanks too much bobcat1

my device can receive commands as it has a receiveing input RX

but the problem is that i donnot know the commands of NMEA that do that

i know only about the sentences format of the NMEA output from the GPS

and i didnot find any where commands in NMEA

can u guide me where to find them

and thanks too much for your support
 

how to know north direction by gps data

asic1984 said:
hi

thanks too much bobcat1

my device can receive commands as it has a receiveing input RX

but the problem is that i donnot know the commands of NMEA that do that

i know only about the sentences format of the NMEA output from the GPS

and i didnot find any where commands in NMEA

can u guide me where to find them

and thanks too much for your support



im not sure if NMEA-protocol is implemente both direction in GARMIN
but if you need more than one position/sec you need using Garmin protocol
(you can find this on Internet) and my old GPS 12 XL can take out
5 positions every second.

garmin protocol is a peer to peer and working on
question -> answer, question-> answer... in timing grid of 1/10 sec exactly

(ie wait answer after question to a 1/10 sec anwer slot)

unfortly only on 9600 Baud out for garmin protocol
and long answer like positions can only give 5 answer/sec
depend of low token speed in serial interface
but short answer like time can give 10 answer/sec


I using Garmin exatly answer time interval to bulid time base
on useless timinghandling program like HP-VEE etc. for
synchronized RF-measure more than one place on same time
( uplink and downlink measure same time but different (moving) place)

(i really hate PC and windows and hp-vee usuless, timedrifting
and phase noising timing base...)

if you search on Internet you can find Linux-program with
source to interfacing Garmin and Garmin protocoll and pick
or learn how, from usable part of this.
 

example gps atmel 16

hi

thanks but can u guide me to where i can find the garmin protocol?
 

gps with 8051 microcontroller

Hi asci1984,

NMEA is just an output protocol. There shall be other proprietary protocols for setting the baud rate and other stuff for each make of the receiver.
br
madhukar
 

16c550 c51

hi

thanks too much for your help

will as i couldnot find the garmin protocol datasheets i will depend on the NMEA in my systems,i need to know that if there is a waypoints that the autonomus system should follow what statements should i care of (i know how to know the current position but i need to get from gps the required angle to head to the next way point )
 

gps+8051

hi

some statemnts in NMEA contains course and bearing

can someone please explain what they mean and how to use them

thanks
 

how to interpret the gps data for microcontroller

Meaning of all NMEA sentences can be found here:
**broken link removed**
You can read bearing (true or magnetic) from, for example, $GPBWC and others, but within NMEA sentences there is no course information.
This can be compueted from Lat-Long information from sentences such as $GPGLL, $GPGGA and others.
Regards,
IanP
 

    DrWhoF

    Points: 2
    Helpful Answer Positive Rating
c example for gps for microcontrollers

hi

thanks too much IanP u are a very helpful person

but what i mean is the definition of course and bearing

also is the measured value of bearing is with reference to the current dirrection of the gps receiver or with refernce with the North direction?

thanks too much for help and sorry if this questions is stupid but i am new to GPS
 

mcs 51 gps

Bearing information gives you your heading in relation to the North Pole (TRUE) or the Magnetic Pole (MAGNETIC) which you can read from previously mentioned strings ..
BTW: you should have started new topic on this, as we are here far away from the original issue started by DrWhoF ..
Regards,
IanP
 

gps receiver using 8051

hello

help me in this problem how I can Inerface 2 serial device(GPS+ GSM) to 8051
and I use Keil mvision to program 8051 but I do not kow If I can use the same softwre to do that please I wish to see example about it.

please help me.
 

gps con 8051

To incorporate 2 serial ports, you can use an 8051 variant with 2 UARTS, like Winbond, Dallas, ST etc parts. Or you can use external UART like 16C550. Or an easy way is the use a multiplexer and address GPS and GSM one by one.

Once you decide on the hardware, I can help you with the software.
 

gps com 8051

Thanks


I want to use mux and make 8051 service GSM at all time until get interrupt
from GPS (Is it true ? and please talk more about how to use mux in this proje
ct)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top