This is my first time using QGIS(2.14.18), I construct this map, but I don't know how to measure the distances (D1, D2, D3, Dx ...) between the circles and the stars. So I have 2 layers (based in 2 CSV files), with thousands and thousands of lines, the image below is just a test.
The distances I need are only between stars and circles, never between star to star or circle to circle. One star can have infinite circles, but a circle can only have one star link. In the two CSV files exist a key ID that stars and circles share with each other, but I don't know how to use it in QGIS to solve this problem.
I have tried using the distance matrix in QGIS, but I don't know if I'm doing this right. I think the distance matrix is giving redundant results, like 2 times the same distance or calculating the distances between stars and circles with no link between them.
I need these distances in meters or kilometers, not degrees.