import math

from subsystems.interop import ObjectType

STATE_CHANGE_DELAY = 1.5 # Seconds

MIN_ROTATE_TIME  = 8
MAX_TRAVEL_TIME  = 5

DIST_THRESH = 10
HEAD_THRESH = 5
PRUNE_TIME  = 0.5

ROTATE_DEAD_ZONE = 6
ROTATE_STOP      = 2.5

ROTATE_SPEED_FAST = 0.2
ROTATE_SPEED_MED  = 0.2
ROTATE_SPEED_SLOW = 0.2

MOVE_SPEED_FAST  = 0.025
MOVE_SPEED_MED   = 0.02
MOVE_SPEED_SLOW  = 0.015

NAV_DIST_ROCK   = 20
NAV_DIST_SAMPLE = 15
NAV_DIST_LANDER = 30

LOOKAT_THRESH_SAMPLE = 4
LOOKAT_THRESH_ROCK   = 4
LOOKAT_THRESH_LANDER = 4

APPROACH_TIME_ROCK   = 3
APPROACH_TIME_SAMPLE = 6
APPROACH_TIME_LANDER = 4

DISC_TIMEOUT_SAMPLE  = 10 

AVOID_MOVE_TIME = 2

AVOID_RADIUS = {}
AVOID_RADIUS[ObjectType.OBSTACLE] = 17
AVOID_RADIUS[ObjectType.SAMPLE]   = 6
AVOID_RADIUS[ObjectType.ROCK]     = 10
AVOID_RADIUS[ObjectType.LANDER]   = 20
