What is the best pair selection algorithm?
When using a DME pair, the location of the receiver can be determined with some accuracy associated. 

The time measurement is performed with some uncertainty leading to a slant range that is within a ring area (the double circles). 

  

Observation

When looking at the intersection of the two rings with different positions of the DMEs:


The hatched area must be eliminated using some method
The blue area is reduced when the two DME bearings are at a right angle
As the width of a ring is proportional to the radius (the uncertainty is a percentage of the range), the smallest blue area is obtained with DME at right angle and the closest to the aircraft (last diagram).




Proposed algorithm

Divide the area around the aircraft into, say 8 sectors of 45° (the number of sectors impacts the accuracy but also the number of computations to be done, in an exponential way).


Look for the two closest stations, write down the sector(s) they belong to
Compute the intersection area
Find the next closest station D, note its sector S
If S is a sector already tested, ignore D, return to 3
Else within the already known sectors, find sector SP closest to 90° of S. Get station DC of this sector.
Compute intersection area for pair D-DC
If this area is smaller than the previous smallest area, keep it as new smallest
Repeat from step 3 until all sectors have been tested (one station per sector) or the radius has exceeded some predetermined limit.
Determine the new aircraft position using the best pair found.
Restart at step 1 using the new aircraft position (the time interval before restarting the cycle may be determined from the distance the aircraft moved. If the aircraft hasn't moved, then the next search for a pair is likely to find the same pair).


Example


Step 1: The two closest stations are in sectors S3 and S7 (fig A).
Step 2: Their intersection area is X (fig. A).
Step 3: The next closest is D3 in sector S2 (fig B).
Step 4: S2 has not yet been visited, so let's look at D3.
Step 5: In {S3, S7}, S7 is the sector closest to 90° of S2
Step 6: D3-D6 intersection area is Y (fig. B)
Step 7: Y is smaller than X, so our candidates are now D3-D6


  


Step 3: The next closest is D5 in sector S5 (fig C).
Step 4: S5 has not yet been visited, so let's look at D5.
Step 5: In {S2, S3, S7}, S3 and S7 are the sector closest to 90° of S5, we chose S3 because D4 is closer than D6.
Step 6: D4-D5 intersection area is Z.
Step 7: Z is smaller than Y, so our candidates are now D4-D5
Step 3: The next closest is D2 in sector S2
Step 4: S2 has already been visited, we ignore D2.
Step 3: The next closest is D1 in sector S1
Step 4: S1 has not yet been visited, so let's look at D1 (fig D).
Step 5: In {S2, S3, S5, S7}, S3 and S7 are the sector closest to 90° of S1, we chose S3 because D4 is closer than D6.
Step 6: D4-D5 intersection area is Z.
Step 7: Z is smaller than Y, so our candidates are now D4-D5
Step 3: The next closest is D1 in sector S1 (fig D).
Step 4: S1 has not yet been visited, so let's look at D1.
Step 5: In {S2, S3, S5, S7}, S3 and S7 are the sector closest to 90° of S1, we chose S3 because D4 is closer than D6.
Step 6: D1-D4 intersection area is T.
Step 7: T is larger than Z, so our candidates still D4-D5
Step 8: Our maximum radius has been reached, our pair is D4-D5