# create the antenna tracker model a = Tracker(onoff=opts.onoff, yawrate=opts.yawrate, pitchrate=opts.pitchrate) # initial controls state state = ControlState() # parse home v = opts.home.split(',') if len(v) != 4: print("home should be lat,lng,alt,hdg") sys.exit(1) a.home_latitude = float(v[0]) a.home_longitude = float(v[1]) a.home_altitude = float(v[2]) a.altitude = a.home_altitude a.yaw = float(v[3]) a.latitude = a.home_latitude a.longitude = a.home_longitude a.set_yaw_degrees(a.yaw) print("Starting at lat=%f lon=%f alt=%f heading=%.1f" % ( a.home_latitude, a.home_longitude, a.altitude, a.yaw)) frame_time = 1.0/opts.rate sleep_overhead = 0