For the location of the sensor:

and the flagpole: