コード例 #1
0
ファイル: trackNORAD.py プロジェクト: weetgeen/OrbitTracker
def north(stepsTakenAzi, stepsTakenAlt):

    stepsToTakeAzi = 1472 - stepsTakenAzi
    if stepsToTakeAzi < 0:
        stepperAzi.clockwise(5, abs(stepsToTakeAzi))
    else:
        stepperAzi.counterclockwise(5, abs(stepsToTakeAzi))

    stepsToTakeAlt = 128 - stepsTakenAlt
    if stepsToTakeAlt > 0:
        stepperAlt.counterclockwise(5, abs(stepsToTakeAlt))
    else:
        stepperAlt.clockwise(5, abs(stepsToTakeAlt))
コード例 #2
0
ファイル: trackOrbit.py プロジェクト: weetgeen/OrbitTracker
def north(stepsTakenAzi, stepsTakenAlt):

    stepsToTakeAzi = 1472 - stepsTakenAzi
    if stepsToTakeAzi < 0:
        stepperAzi.clockwise(5, abs(stepsToTakeAzi))
    else:
        stepperAzi.counterclockwise(5, abs(stepsToTakeAzi))

    stepsToTakeAlt = 128 - stepsTakenAlt
    if stepsToTakeAlt > 0:
        stepperAlt.counterclockwise(5, abs(stepsToTakeAlt))
    else:
        stepperAlt.clockwise(5, abs(stepsToTakeAlt))

    shelfDirection['Alt'] = 90
    shelfDirection['Azi'] = 0
    shelfDirection.close()
コード例 #3
0
ファイル: moon.py プロジェクト: weetgeen/OrbitTracker
#StepperAzi
stepsTakenAzi = 0
stepsPerRev = 512

stepsTakenAlt = 0


#Stepper Freedom of motion checks
lcd.clear()
lcd.message('Initialize Alt\n Stepper') #\n is new line
#Stepper
stepsTakenAlt = 128
stepsToTakeAlt = 128
stepsTakenAlt = 256 
if stepsToTakeAlt > 0:
    stepperAlt.counterclockwise(5,abs(stepsToTakeAlt))
else:
    stepperAlt.clockwise(5,abs(stepsToTakeAlt))

stepsToTakeAlt = -128
stepsTakenAlt = 128
if stepsToTakeAlt > 0:
    stepperAlt.counterclockwise(5,abs(stepsToTakeAlt))
else:
    stepperAlt.clockwise(5,abs(stepsToTakeAlt))

     
lcd.clear()
lcd.message('Prep orbital\n Tracking')

send_url = 'http://freegeoip.net/json'  #site used to obtain gps coordinate from ip adress