Skip to content

Commit

Permalink
Fix latlon reading for terminal
Browse files Browse the repository at this point in the history
The code wasn't casting into float.
  • Loading branch information
Zack Moratto committed Dec 5, 2011
1 parent 0a6964f commit cc30d72
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/python/uhd_modes.py
Expand Up @@ -20,8 +20,6 @@
#

my_position = [37.76225, -122.44254]
#my_position = [37.409066,-122.077836]
#my_position = None

from gnuradio import gr, gru, optfir, eng_notation, blks2, air
from gnuradio import uhd
Expand Down Expand Up @@ -136,12 +134,13 @@ def tune(self, freq):
parser.add_option("-n","--no-print", action="store_true", default=False,
help="disable printing decoded packets to stdout")
parser.add_option("-l","--location", type="string", default=None,
help="GPS coordinates of receiving station in format xx.xxxxx,xx.xxxxx")
help="GPS coordinates of receiving station in format xx.xxxxx,xx.xxxxx (latlon)")
(options, args) = parser.parse_args()

if options.location is not None:
reader = csv.reader([options.location])
my_position = reader.next()
latlon = reader.next();
my_position = [float(latlon[0]), float(latlon[0])]

queue = gr.msg_queue()

Expand Down

0 comments on commit cc30d72

Please sign in to comment.