Hi,
I'm not sure if anyone has done anything like this already, but I think it could be useful.
This source library contains a few simple algorithms for vector maths. It can create a 2D vector using X,Y components or an angle off the X axis and do some elementary calculations.
The attached example shows a dumb program which calculates an angle between car A's heading and car B's position.
The code is C++ but it should not be a problem to rewrite it to C# or PHP and include it in popular InSim libraries.
I'm not sure if anyone has done anything like this already, but I think it could be useful.
This source library contains a few simple algorithms for vector maths. It can create a 2D vector using X,Y components or an angle off the X axis and do some elementary calculations.
The attached example shows a dumb program which calculates an angle between car A's heading and car B's position.
The code is C++ but it should not be a problem to rewrite it to C# or PHP and include it in popular InSim libraries.