gpsd documentation
Anyone know where I can find the documentation for the gpsd python client drivers?
www.raspberrypiblog.com
Re: gpsd documentation
This might help: http://gpsd.berlios.de/client-howto.html
Re: gpsd documentation
Well actually I've already been there and I have a couple of problems with that page:
1. This (http://www.catb.org/gpsd/client-howto.h ... n_examples) is actually the latest version of that page (it seems gpsd have moved their website, but not redirected the old one).
2. So table 1 seems to be the kind of thing I am after: lists of methods which I can call. But then you get down to the python example and it doesn't seem to use any of the methods listed in the table, but does use a few which are not.
All I really want to know at this point in time is what type of object does the next() method return on this line "report = session.next()" and what methods and members that object has. Other open source libraries I have used in the past have had documentation which details the classes and their members at least, but so far I am struggling to find that for gpsd.
I guess if it doesn't exist I will have to download the source code and do it from there, but as a consumer of the library I feel like I shouldn't need to do that...
1. This (http://www.catb.org/gpsd/client-howto.h ... n_examples) is actually the latest version of that page (it seems gpsd have moved their website, but not redirected the old one).
2. So table 1 seems to be the kind of thing I am after: lists of methods which I can call. But then you get down to the python example and it doesn't seem to use any of the methods listed in the table, but does use a few which are not.
All I really want to know at this point in time is what type of object does the next() method return on this line "report = session.next()" and what methods and members that object has. Other open source libraries I have used in the past have had documentation which details the classes and their members at least, but so far I am struggling to find that for gpsd.
I guess if it doesn't exist I will have to download the source code and do it from there, but as a consumer of the library I feel like I shouldn't need to do that...
www.raspberrypiblog.com
-
- Posts: 85
- Joined: Sat Nov 05, 2011 11:31 pm
Re: gpsd documentation
The next() call is to support iterating so you can do
You wouldn't normally call next your self.
The level of documentation projects have is very much up to the project members and this is opensource, every one can muck in. Many/most projects are there to scratch an itch. At least with open source you can "use the source luke"
and that is often far more informative than a lot of docs.
Unfortunately this is one of the really bad ones re: docs ;-( So it's going to be the source.
Though this link might be helpful http://blog.perrygeo.net/2007/05/27/pyt ... -bindings/
Cheers
Code: Select all
session = gps(**opts)
session.stream(WATCH_ENABLE|WATCH_NEWSTYLE)
for report in session:
print report
The level of documentation projects have is very much up to the project members and this is opensource, every one can muck in. Many/most projects are there to scratch an itch. At least with open source you can "use the source luke"

Unfortunately this is one of the really bad ones re: docs ;-( So it's going to be the source.
Though this link might be helpful http://blog.perrygeo.net/2007/05/27/pyt ... -bindings/
Cheers
Re: gpsd documentation
@AdRiley: You can use `type()` and `dir()` to find out which type and attributes an object has. Interactively playing with code in Python shells like IPython might also be handy. It has tab completion for objects and an easy way to look at the source code of whole modules or smaller parts like classes, functions, or methods.
Code: Select all
while not self.asleep():
sheep += 1
Re: gpsd documentation
Hey Guys,
I was wondering the same thing. So I did some research and did a write-up: http://www.danmandle.com/blog/getting-g ... th-python/
Feedback appreciated.
I was wondering the same thing. So I did some research and did a write-up: http://www.danmandle.com/blog/getting-g ... th-python/
Feedback appreciated.