39 - Adds P25/LSM support to the DemodulatorViewerFX application and

adds Feed forward gain support to the C4FM DQPSK demodulator which seems
to improve output from the interpolating sample buffer at each symbol
period.  Updates the symbol timing gain for C4FM to decrease the gain a
bit since the feed forward gain is providing a better interpolated symbol.
This commit is contained in:
Denny
2018-03-24 11:03:18 -04:00
parent bfaacb309d
commit c36f6901af
16 changed files with 130 additions and 76 deletions

View File

@@ -248,12 +248,35 @@ public class Complex implements Serializable
}
/**
* Returns the vector length to 1 (unit circle),
* avoiding square root multiplication
* Maintains the vector magnitude close to 1.0 (unit circle) when the magnitude is already
* close to 1.0, avoiding square root multiplication. If you need a faster way to set the
* magnitude to close to 1.0 without the square root of normalize(), use fastNormalize2().
*/
public void fastNormalize()
{
multiply((float)(1.95f - magnitudeSquared()));
multiply((float)(1.9999f - magnitudeSquared()));
}
/**
* Sets vector magnitude to close to 1.0f without the magnitude square root operation
*/
public void normalizeFast()
{
float inphaseAbsolute = Math.abs(inphase());
float quadratureAbsolute = Math.abs(quadrature());
float gain;
if(inphaseAbsolute > quadratureAbsolute)
{
gain = 1.0f / (inphaseAbsolute + (0.4f * quadratureAbsolute));
}
else
{
gain = 1.0f / (quadratureAbsolute + (0.4f * inphaseAbsolute));
}
multiply(gain);
}
public float left()
@@ -434,17 +457,4 @@ public class Complex implements Serializable
return quadratureAbsolute + (0.4f * inphaseAbsolute);
}
}
public static void main(String[] args)
{
Complex ROTATE_FROM_MINUS_45 = Complex.fromAngle(1.0 * Math.PI / 4.0);
Complex ROTATE_FROM_PLUS_135 = Complex.fromAngle(-3.0 * Math.PI / 4.0);
mLog.debug("REF: " + ROTATE_FROM_MINUS_45.toString());
Complex symbol = new Complex(0.7665009f, -0.6422432f);
mLog.debug("SYM: " + symbol.toString());
symbol.multiply(ROTATE_FROM_MINUS_45);
mLog.debug("DER: " + symbol.toString());
}
}