diff --git a/README.rst b/README.rst index b80f1031cc6fc381270042564a32cd43b35d8820..62c49f28845872eb089fca1c0267713b55aacca8 100644 --- a/README.rst +++ b/README.rst @@ -1,19 +1,48 @@ -Python Module for APRS-IS. +Python Module for APRS-IS +************************* -.. image:: https://travis-ci.org/ampledata/aprs.png?branch=develop - :target: https://travis-ci.org/ampledata/aprs +Includes Python module with bindings for APRS as well as ``aprs_tracker`` command-line APRS location tracking utility. -Example Usage -============= +Examples +======== -Example 1: +Example 1: APRS Tracker +----------------------- + +The following example uses the ``aprs_tracker`` command to connect to APRS-IS +as W2GMD and send a single-shot location frame using location data from my +locally connected USB (or USB->Serial) GPS: + +Example 1 Code +^^^^^^^^^^^^^^ +:: + + $ aprs_tracker -c W2GMD -p 12345 -s /dev/cu.usbmodem1a1211 -u 3 -d + +Example 1 Output +^^^^^^^^^^^^^^^^ +:: + + 2015-09-25 15:04:55,930 INFO aprs.classes.connect:63 - Connected to server=rotate.aprs.net port=14580 + 2015-09-25 15:04:55,931 DEBUG aprs.cmd.tracker:113 - frame=W2GMD-3>APRS:!3745.78N/12225.14W>000/000/A=000175 APRS + + +See Also +^^^^^^^^ +See ``$ aprs_tracker -h`` for more information. + + +Example 2: Library Usage - Receive +---------------------------------- The following example connects to APRS-IS as W2GMD (me!) and filters for APRS frames coming from my prefix (W2GMD, W2GMD-n, etc). Any frames returned are -sent to my callback *my_cb* and printed. +sent to my callback *my_callback* and printed. - #!/usr/bin/env python +Example 2 Code +^^^^^^^^^^^^^^ +:: import aprs @@ -21,32 +50,30 @@ sent to my callback *my_cb* and printed. print line a = aprs.APRS('W2GMD', '12345') - a.connect() - - a.send('W2GMD>APRS:>Test!') - a.receive(callback=my_callback) - -Example 1 output: +Example 2 Output +^^^^^^^^^^^^^^^^ +:: W2GMD-6>APRX28,TCPIP*,qAC,APRSFI-I1:T#471,7.5,34.7,37.0,1.0,137.0,00000000 -Example 2: +Example 3: Library Usage - Send +---------------------------------- -The following example uses the `aprs_tracker` command to connect to APRS-IS -as W2GMD and send a single-shot location frame using location data from my -locally connected USB (or USB->Serial) GPS: +The following example connects to APRS-IS as W2GMD (me!) and sends an APRS frame. - $ aprs_tracker -c W2GMD -p 12345 -s /dev/cu.usbmodem1a1211 -u 3 -d +Example 3 Code +^^^^^^^^^^^^^^ +:: -Example 2 output: + import aprs - 2015-09-25 15:04:55,930 INFO aprs.classes.connect:63 - Connected to server=rotate.aprs.net port=14580 - 2015-09-25 15:04:55,931 DEBUG aprs.cmd.tracker:113 - frame=W2GMD-3>APRS:!3745.78N/12225.14W>000/000/A=000175 APRS Python Module + a = aprs.APRS('W2GMD', '12345') + a.connect() + a.send('W2GMD>APRS:>Hello World!') -See `$ aprs_tracker -h` for more information. Source ======