davidwong750
Posts: 54
Joined: Wed Mar 18, 2015 6:53 am

locking GPS !!! help!!!

Thu Mar 19, 2015 6:06 am

hi guys. i need help and info. i currently doing a project which is raspberry pi connected to Ultimate GPS breakout version 3. and my task is that i have to program that locking GPS and send the textfile every hours... any idea??? urgent

DirkS
Posts: 10362
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: locking GPS !!! help!!!

Thu Mar 19, 2015 7:26 pm

i have to program that locking GPS
What exactly do you mean with that?
What is 'locking a GPS'?

davidwong750
Posts: 54
Joined: Wed Mar 18, 2015 6:53 am

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 12:46 am

As you can see... that raspberry pi is connected to ultimate GPS breakout out. So I need to lock the GPS and send into text file like example:

20/3 Fri. Hr: mins: sec

So.is like every hour it send this into textfile

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 1:04 am

The GPS will "lock" automatically, if it can receive the signals from the GPS satellites (put it outside, or near a window). This process will take a short time after you turn on the GPS.

After that, the GPS should send data every second. You can read the data by opening a port in Linux and reading the incoming data. The next step is to parse the data and extract the time and location.

I suggest you install gtkterm on your Pi and use it to look at data coming from the GPS port (probably /dev/ttyUSB0, and probably 9600 of 4800 baud).

If you can not see data then you can not proceed.

davidwong750
Posts: 54
Joined: Wed Mar 18, 2015 6:53 am

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 1:10 am

How do I install it??? From internet or code??? Do give me instruction if is code

paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 1:56 am

Adafruit Ultimate GPS uses ttyAMA0 - it's connected as a serial device.
You will need to delete references to ttyAMA0 from /boot/config file(otherwise it will be set as a serial terminal for remote login!)

You could install gpsd, which listens to the GPS, and then get data from gpsd by listening on the correct port.

I get position data for xastir and 1pps data for NTP from gpsd (I had to wire the pps pin to a gpio pin & tweak other stuff, but you only asked about GPS position data...)

I believe there are instructions on Adafruit's website on how to use Ultimate GPS.
It has been my custom to use Xeyes

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 3:17 am

I would not recommend gpsd until basic communication has been established. Even then, depending on the application gpsd might just get in the way. It also has a habit of switching the gps module into binary mode, which adds confusion in the first stage (and prevents the same module being used on a different system until you switch it back to NMEA mode).

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 3:18 am

davidwong750 wrote:How do I install it??? From internet or code??? Do give me instruction if is code
Is the gps module connected to the Pi?
How did you connect the gps module to to Pi?

To install gtkterm you can type the following in a terminal:

Code: Select all

sudo apt-get install gtkterm

davidwong750
Posts: 54
Joined: Wed Mar 18, 2015 6:53 am

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 3:58 am

Then after that what do I.need to type to.do what I need to do for.my.task

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 4:04 am

Well, if you know what port your gps is connected to then you can start gtkterm from a terminal with the port as a parameter:

Code: Select all

gtkterm -p /dev/ttyAMA0
You can also include the baud rate if you know it. Or you can start gtkterm and use the menus to set the port and baud rate.

I suggest you play with it yourself and learn about it yourself. You can probably figure out what to do.

If your project is urgent then I think you are going to be sad. You have a lot to learn before you can do what you want to do.

DirkS
Posts: 10362
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: locking GPS !!! help!!!

Fri Mar 20, 2015 10:33 am


Return to “Beginners”