Code

Project: jvfeatures

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

Project: Other

migrateMailbox.scpt.txt     

Project: Infinite HMM Tutorial

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

Project: RRT

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

Project: Box2D_friction_mod

WheelConstraint.h      test_TopDownCar.py      b2FrictionJoint.h      python_friction_joint.patch      test_TopDownFrictionJoint.py      TestEntries.cpp      TopDownCar.h      b2FrictionJoint.cpp      box2d_friction_joint.patch     

Project: Dirichlet Process Mixture Tutorial

EM_GM.m      DP_Demo.m      DPMM.m      DP_Tutorial.zip      DirichletProcess.m      gaussian_EM.m     

Project: Arduino_Code

plot_ardunio_data.sh      Arduino_Code.zip      convert_range2D.py      arduino-serial.c      oscilloscope.sh      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

arducom.py      setup.py     

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/convert_range2D.py"

resources/code/Arduino_Code/convert_range2D.py

#!/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