reading GPS?

View: New views
8 Messages — Rating Filter:   Alert me  

reading GPS?

by Justin Mitchell-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Any suggestions on where to get started on reading GPS coordinates?
Would these be read through the serial interface? I have a Motorola Q9C
Smartphone.

Justin

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Parent Message unknown Re: reading GPS?

by Christopher Fairbairn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Justin,

On Wed  9/07/08 11:47 , Justin Mitchell gmane@... sent:
> Any suggestions on where to get started on reading GPS coordinates?
> Would these be read through the serial interface? I have a Motorola Q9C
> Smartphone.

One approach (if you don't mind being Windows Mobile dependant) is to use ctypes
to interface to the GPS Intermediate Driver (documented on MSDN at
http://msdn.microsoft.com/en-us/library/ms850332.aspx).

This approach would take care of NEMA sentance parsing etc and give you a
structure with current lat/long and speed etc.

Alternatively you can also go the serial port route. In that case you can use the
GPS control panel applet to determine which COM port you should read from. See
http://blogs.conchango.com/kenibarwick/archive/2006/03/19/3119.aspx for more details.

Hope this helps,
Christopher Fairbairn
Microsoft MVP - Device Application Development
http://www.christec.co.nz/blog/

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: reading GPS?

by Alex Mandel-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Justin Mitchell wrote:
> Any suggestions on where to get started on reading GPS coordinates?
> Would these be read through the serial interface? I have a Motorola Q9C
> Smartphone.
>
> Justin
>


Yes, do a search through the history of this list for ceserial to get
the python wrapper around the com ports.

I'm actually working on a GPS tool based on this. I have a sample tool
that logs anything over com port and specifically is aimed at parsing
NMEA with a tcl/tk interface right now.

Ideally I just need to contact the ceserial author since the license is
unclear and see about where we should post this stuff. Maybe a new
sourceforge project?

Let me know if you need some examples,
Alex

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: reading GPS?

by Justin Mitchell-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alex Mandel wrote:

> Justin Mitchell wrote:
>> Any suggestions on where to get started on reading GPS coordinates?
>> Would these be read through the serial interface? I have a Motorola
>> Q9C Smartphone.
>>
>> Justin
>>
>
>
> Yes, do a search through the history of this list for ceserial to get
> the python wrapper around the com ports.
>
> I'm actually working on a GPS tool based on this. I have a sample tool
> that logs anything over com port and specifically is aimed at parsing
> NMEA with a tcl/tk interface right now.
>
> Ideally I just need to contact the ceserial author since the license is
> unclear and see about where we should post this stuff. Maybe a new
> sourceforge project?
>
> Let me know if you need some examples,
> Alex


Examples would be excellent!

Justin

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: reading GPS?

by Justin Mitchell-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Christopher Fairbairn wrote:

> Hi Justin,
>
> On Wed  9/07/08 11:47 , Justin Mitchell gmane@... sent:
>> Any suggestions on where to get started on reading GPS coordinates?
>> Would these be read through the serial interface? I have a Motorola Q9C
>> Smartphone.
>
> One approach (if you don't mind being Windows Mobile dependant) is to use ctypes
> to interface to the GPS Intermediate Driver (documented on MSDN at
> http://msdn.microsoft.com/en-us/library/ms850332.aspx).
>
> This approach would take care of NEMA sentance parsing etc and give you a
> structure with current lat/long and speed etc.
>
> Alternatively you can also go the serial port route. In that case you can use the
> GPS control panel applet to determine which COM port you should read from. See
> http://blogs.conchango.com/kenibarwick/archive/2006/03/19/3119.aspx for more details.
>
> Hope this helps,
> Christopher Fairbairn
> Microsoft MVP - Device Application Development
> http://www.christec.co.nz/blog/


Thanks for the info. I think the serial approach would suit me better.
However... I don't think the GPS control panel exists on my phone (there
was no GPS Settings registry key). I wonder if MS removed it in WM 6.1.

Do you know if these settings can be specified manually?

Thanks!
Justin

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Parent Message unknown Re: reading GPS?

by Christopher Fairbairn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Wed  9/07/08 12:58 , Justin Mitchell gmane@... sent:
> Thanks for the info. I think the serial approach would suit me better.
> However... I don't think the GPS control panel exists on my phone (there
> was no GPS Settings registry key). I wonder if MS removed it in WM 6.1.
>
> Do you know if these settings can be specified manually?

Sorry I didn't switch gears between Windows Mobile Standard and Windows Mobile
Professional before posting.

Indeed Windows Mobile Standard (i.e. Smartphone) devices do not have the GPS
settings app.  This is a feature present within Windwos Mobile Professional or
Classic (commonly refered to as Pocket PC) devices.

If you have installed the Windows Mobile SDK on your PC there is a executable
called settings.exe available within C:\Program Files\Windows Mobile 6
SDK\Tools\GPS (or equivalent path on your machine) which provides a similiar
feature once you've transfered it to your phone.

I am not familair with the make/model of phone you are using, but perhaps the
following thread will also be of help you determine the correct COM port for your
device -
http://www.modaco.com/content/smartphone-standard-news/262137/motorola-q9h-at-t-gps-activated-updated/

Hope this helps,
Christopher Fairbairn

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: reading GPS?

by Alex Mandel-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Justin Mitchell wrote:

> Alex Mandel wrote:
>> Justin Mitchell wrote:
>>> Any suggestions on where to get started on reading GPS coordinates?
>>> Would these be read through the serial interface? I have a Motorola
>>> Q9C Smartphone.
>>>
>>> Justin
>>>
>>
>>
>> Yes, do a search through the history of this list for ceserial to get
>> the python wrapper around the com ports.
>>
>> I'm actually working on a GPS tool based on this. I have a sample tool
>> that logs anything over com port and specifically is aimed at parsing
>> NMEA with a tcl/tk interface right now.
>>
>> Ideally I just need to contact the ceserial author since the license
>> is unclear and see about where we should post this stuff. Maybe a new
>> sourceforge project?
>>
>> Let me know if you need some examples,
>> Alex
>
>
> Examples would be excellent!
>
> Justin
>

I don't have my full svn of my project moved to a public website yet
(actually only have the last checkout right now) but I can show you the
example I used to figure out how to deal with the gps. This should get
you started.

http://article.gmane.org/gmane.comp.python.windows-ce/1631/match=ceserial

More to come later I'm sure,
Alex
_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: reading GPS?

by Justin Mitchell-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alex Mandel wrote:

> Justin Mitchell wrote:
>> Alex Mandel wrote:
>>> Justin Mitchell wrote:
>>>> Any suggestions on where to get started on reading GPS coordinates?
>>>> Would these be read through the serial interface? I have a Motorola
>>>> Q9C Smartphone.
>>>>
>>>> Justin
>>>>
>>>
>>>
>>> Yes, do a search through the history of this list for ceserial to get
>>> the python wrapper around the com ports.
>>>
>>> I'm actually working on a GPS tool based on this. I have a sample
>>> tool that logs anything over com port and specifically is aimed at
>>> parsing NMEA with a tcl/tk interface right now.
>>>
>>> Ideally I just need to contact the ceserial author since the license
>>> is unclear and see about where we should post this stuff. Maybe a new
>>> sourceforge project?
>>>
>>> Let me know if you need some examples,
>>> Alex
>>
>>
>> Examples would be excellent!
>>
>> Justin
>>
>
> I don't have my full svn of my project moved to a public website yet
> (actually only have the last checkout right now) but I can show you the
> example I used to figure out how to deal with the gps. This should get
> you started.
>
> http://article.gmane.org/gmane.comp.python.windows-ce/1631/match=ceserial
>
> More to come later I'm sure,
> Alex


Thanks! I've been fooling around with that code, and am getting an
exception in this function in ceserial.py:


def getCommTimeouts(self):
   """Get the comm timeouts."""
   timeouts = COMMTIMEOUTS()
   if not(windll.coredll.GetCommTimeouts(self.__handle,byref(timeouts))):
     raise SerialException, windll.coredll.GetLastError()
   return timeouts


windll.coredll.GetLastError() print's "0", which isn't of much help! I'm
not too familiar with the win32api. What is the proper way to print
error messages?

I googled it, and found one other person who ran into the same problem,
but did not resolve it.

I've looked through the MSDN docs, and the ceserial source, but I'm
stuck. Any ideas?

Thanks again,
Justin

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce