Detection of the HR source

I'm looking for a way to identify the HR source (optical or external through ANT+). I would like to do some computations only if an external source is used due to the better precision of the measurement.

Any idea how to detect the usage of a external HR band?