Hello,
Before I start thanking everybody.
Through my application s/w I will read syncro values which will be in angles. When I run Python script, the values are collected in particular variables.
Suppose the range is -180 to 180.
And I got angle as -180. According to the requirement it should be +/-1 deg window;ie; between 179 and -179.
How I will check whether its falling in that range ?
angle = -180
tolerance = 1 (in degree)
if(180-1) <= -180 <= (-180+1):
# statements
angle1 = -179
tolerance = 1
if(-170-1)<= -179 <= (-179+1):
# statements
angle2 = 179
tolerance = 1
if(179-1) <= 179 <= (179+1):
# statements
will this work for all angle combinations ? what you think ?