Commit Graph

44 Commits

Author SHA1 Message Date
Colin Ian King 7397c3cd9b Fix build warnings about ternary operator precedence
Be more explicit with parenthesis to avoid any possibly confusion
about operator precendence.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
2016-03-21 12:42:29 -07:00
Kamal Mostafa f801ae3f28 update copyright dates 2016 2016-02-19 12:29:58 -08:00
Kamal Mostafa 639b695f31 eliminate all instances of implicit double-promotion 2015-08-23 10:16:15 -07:00
Marcos Vives Del Sol ff0346f5a8 Really use 64 data types for demodulation
[ kamal: cleanup ]
2014-11-16 12:46:14 -08:00
Marcos Vives Del Sol cc6b5c9123 Change code to use 64-bit variables for decoding 2014-11-16 12:46:13 -08:00
Kamal Mostafa 40f1d50cbd fsk: calc separate divergences for mark and space bits
Calculate and consider separate signal-strength divergence values for
mark and space bits, so that imbalanced (but consistent) mark/space
strengths do not drive down confidence.

Note: This change makes all existing test cases yield very slightly
higher confidence values.
2014-11-16 11:00:36 -08:00
Kamal Mostafa c2fa2dae93 fsk: fix FSK_DEBUG character decode 2012-11-03 13:26:10 -07:00
Mike Tedesco 577b84d7f2 (portability) use stdlib.h not malloc.h 2012-10-04 18:10:33 -07:00
Kamal Mostafa 1ed3b8465a fsk: confidence algo #6: "SNR * (1-divergence)"
Disabled all the hardcoded noise limiters.
2012-08-24 22:38:41 -07:00
Kamal Mostafa dd6040336d minimodem: stats report ampl={amplitude} 2012-08-25 09:17:05 -07:00
Kamal Mostafa 501ee25c7d fsk: expect_bits_string param, no start/stop bits required
fsk_find_frame() takes expect_bits_string  (e.g. "10dddddddd1"), as a
parameter supplied by the caller allowing for encodings which don't use
any start/stop bits (e.g. just "dddddddd").
2012-08-24 13:20:20 -07:00
Kamal Mostafa e9263c9c9d fsk: fix noise <= EPSILON handling
Handle noise <= EPSILON better; fixes (im)perfect test cases on i386.
2012-08-19 15:58:08 -07:00
Kamal Mostafa f81f069d95 minimodem: --limit (2.3) sets fsk_confidence_search_limit
Significant performance enhancements from fsk_confidence_search_limit:
runs far fewer FFT's when --limit (default 2.3) is less than INFINITY.
2012-08-18 21:24:01 -07:00
Kamal Mostafa e1b055cf4f fsk: AVOID_TRANSIENTS noise limiter re-enabled
Algo #5 needs this, just as #3 did.
2012-08-18 19:15:33 -07:00
Kamal Mostafa 076343a9c3 fsk: MIN_MAGNITUDE noise limiter 2012-08-18 19:15:07 -07:00
Kamal Mostafa 725355aa43 fsk: performance: do not bzero fftin 2012-08-18 16:52:07 -07:00
Kamal Mostafa cf9ba20ee0 fsk: confidence algo #5 (SNR)
Computes SNR confidence value, where "signal" is the magnitude of the FSK
driven frequency, and "noise" is the magnitude of the non-driven frequency.

(Also includes unused algo #4 code, which may not compile anymore.)
2012-08-14 22:31:30 -07:00
Kamal Mostafa bca34371e1 fsk: do not consider the stop bit twice 2011-07-08 13:00:50 -07:00
Kamal Mostafa 25e6e41939 fsk: no FSK_MIN_STRENGTH limitation 2011-07-08 09:26:02 -07:00
Kamal Mostafa 845c3e1be6 fsk: CONFIDENCE_ALGO 3 (worst divergence)
CONFIDENCE_ALGO 3 (worst divergence):
 - single worst diverging bit in the frame
 - amplitude normalized
 - drop AVOID_TRANSIENT
2011-07-08 08:03:31 -07:00
Kamal Mostafa cb3e81e576 fsk debug 2011-07-08 07:31:54 -07:00
Kamal Mostafa fd0546d80d fsk expect_bits 2011-07-07 13:31:10 -07:00
Kamal Mostafa 2d1310febf reduce FSK_MIN_STRENGTH to 0.005 2011-06-23 23:05:35 -07:00
Kamal Mostafa 702c0be223 minimodem licenced as GPL3+ 2011-06-22 17:10:50 -07:00
Kamal Mostafa 3a22116159 fsk: new confidence algo 2011-06-22 10:06:19 -07:00
Kamal Mostafa 2b014b50fb fsk_find_frame: search across an entire bit 2011-06-21 22:30:37 -07:00
Kamal Mostafa 243af5da56 fsk: floating point band_width 2011-06-21 20:27:51 -07:00
Kamal Mostafa 9002cf2694 fsk: confidence considers start/stop bits 2011-06-21 12:13:47 -07:00
Kamal Mostafa 775ef649e1 fsk_bits_analyze / fsk_frame_analyze rework
- confidence calc only uses data bits metrics (for good or ill)
2011-06-12 12:42:08 -07:00
Kamal Mostafa e7b16118e4 fsk: respect n_data_bits 2011-06-10 16:19:11 -07:00
Kamal Mostafa 439b606a97 minimodem 0.2.0 2011-06-08 14:00:22 -07:00
Kamal Mostafa 54f8efde20 minimodem: use fsk.h API 2011-06-08 13:21:12 -07:00
Kamal Mostafa 35121ab63c fsk: move advance to top of loop 2011-06-06 21:36:23 -07:00
Kamal Mostafa 0509066f34 fsk cleanup 2011-06-06 21:33:50 -07:00
Kamal Mostafa 336a057233 fsk: carrier autodetect for 300 baud 2011-06-05 12:10:59 -07:00
Kamal Mostafa 2ea1085b45 fsk cleanup 2011-06-05 08:49:06 -07:00
Kamal Mostafa cd6ab7f77d fsk: noconfidence_bits increase to 20
... and probably should be set even higher, to allow for even longer
idle-bit (stop-bit) periods.
2011-06-05 08:44:47 -07:00
Kamal Mostafa 3522182394 fsk new confidence equation 2011-06-04 16:31:26 -07:00
Kamal Mostafa 1e96d42d16 fsk_bit_analyze refactor 2011-06-04 15:55:22 -07:00
Kamal Mostafa 0e888d2bf2 fsk cleanup 2011-06-04 14:41:41 -07:00
Kamal Mostafa 08654e8466 fsk: AVOID_TRANSIENTS allows for miniscule FSK_MIN_CONFIDENCE 2011-06-04 14:15:54 -07:00
Kamal Mostafa 71baa6f916 fsk cleanup 2011-06-04 11:56:26 -07:00
Kamal Mostafa b73f7fb5b8 fsk: cleanup 2011-06-04 09:57:33 -07:00
Kamal Mostafa 80c8a62073 fsk: multibit decoder 2011-06-03 23:26:00 -07:00