HELP me understand the code
RN
Posts: 28
I was trying to understand the attached code(Stingray Demo - stingray obstacle avoidance using PING kit) but couldn't come up with an intitutive feel. Anybody who knows this code please help me with few lines....
Comments
What exactly you do not understand ?
or is of the kind "I do not from where to start" ?
In the latter case, I'd recommend you read about <insert_topic_here> to get an idea of how it works or on which concepts it is based, then I'd look at some implementations.
1. Their are lot of nos in the code eg. maxdelta, rotate, cutoff how did he get those nos.
2. Exact location of the PING sensors(which one is connected to 0 to1 and to 2).
3. why?
Left := Distance[1] * RISK_FACTOR <# Distance[2] * RISK_FACTOR
Right := Distance[1] * RISK_FACTOR <# Distance[0] * RISK_FACTOR
4. why?
OldLeft += (Left - OldLeft) <# MAXDELTA #> (-MAXDELTA)
OldRight += (Right - OldRight) <# MAXDELTA #> (-MAXDELTA)
and the list continues....