Project: jvfeatures

jvtypes.h      jvfeatures.h      chessSeg.cpp      jvtypes.cpp      jvtest.cpp      jvfeatures.cpp     

Project: Other


Project: Infinite HMM Tutorial

run.m      HDP_HMM.m      README.txt      ConditionalProbabilityTable.m      HDP.m      HMMProblem.m      HMM.m     

Project: RRT

RRT.h      RRT.tgz      rrt_test.cpp      RRT.cpp      BidirectionalRRT.cpp      AbstractRRT.cpp     

Project: Box2D_friction_mod

WheelConstraint.h      b2FrictionJoint.h      python_friction_joint.patch      TestEntries.cpp      TopDownCar.h      b2FrictionJoint.cpp      box2d_friction_joint.patch     

Project: Dirichlet Process Mixture Tutorial

EM_GM.m      DP_Demo.m      DPMM.m      DirichletProcess.m      gaussian_EM.m     

Project: Arduino_Code      arduino-serial.c      oscilloscope.pde      motordriver.pde      helicopter_controller.pde      accelerometer_test.pde      ranger_plane_sweep.pde      clodbuster_controller.pde      pwm_manual.pde      ranger_test.pde      servo_test.pde     

Project: ArduCom     

Project: support

geshi.php      Protector.php     

Project: Cogent

CodePane.php      NotesPane.php      PicsPane.php      Cogent.php      PubsTable.php     
Click here to download "resources/code/Arduino_Code/"


#!/usr/bin/env python

import math,sys

file = sys.argv[1]

#file = open("/Users/jscholz/Documents/Arduino/rangeloop_raw.dat")
print "Converting ", file

for i in file.readlines():
    #print i
    angle = i.strip("\n").split(" ")[0]
    dist = i.strip("\n").split(" ")[1]
#    print angle,dist
#    x = (500 - float(dist)) * math.cos(float(angle) * math.pi/180)
#    y = (500 - float(dist)) * math.sin(float(angle) * math.pi/180)
    x = (1/float(dist)+0.42) * math.cos(float(angle) * math.pi/180)
    y = (1/float(dist)+0.42) * math.sin(float(angle) * math.pi/180)
    print x, y


About me

Pic of me