Hello,
from the equation and simple substitution should suffice to get the distance from the sensor to the light source, is this correct?
Have a look at the way the reading is calculated at
https://github.com/ilpincy/argos3/blob/ ... r.cpp#L104
Each light adds something to the sensor readings. If you have only one light, there will be one sensor that gets the maximum exposure to the light (and thus will have the largest reading); the sensors around will get a little bit of light, with lower readings.
So, if you have only one light and you want to estimate the distance to that light, consider only the sensor with the highest reading.
The reading is calculated by the function at:
https://github.com/ilpincy/argos3/blob/ ... or.cpp#L33
which is a decreasing exponential. You can invert it pretty easily, but this would work well only if noise is not added to the sensor readings. Without noise, it's all pretty unrealistic.
If your problem is to have a sort of global maximum you give the robots to refer to, I think it would be better if you simply gave that global position to the robots "magically" and use the code I sent you above. The light would not be anyway particularly convincing in a paper, so I wouldn't bother making this extra effort.
Cheers,
Carlo
I made ARGoS.