GithubHelp home page GithubHelp logo

bradleeharr / kiwitracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bigalnz/test_fft

0.0 0.0 0.0 1.5 MB

A project to log to standard console the BPM of a Chick Timer (CT) for Kiwis using RTL-SDR

Python 37.70% Jupyter Notebook 62.30%

kiwitracker's Introduction

kiwitracker

A project to log to standard console the BPM of a Chick Timer (CT) for Kiwi.

Suggested buffering chunk size -c 16384 or -c 65536 (to test) Suggested sample rate -s 2.048e6 (allows covering from channel 00 (160.120Mhz), 01 (160.130).....99 (161.110Mhz) ) (Total Spectrum 0.990Mhz) (Not configurable but FYI processing 2.56e5 samples at a time)

Background modes of transmitter

  • 80 BPM - Mortality mode
  • 46-48 BPM - Not incubating
  • 30 BPM - Incubating

Chick Timer (CT) modes

Every 10 minutes the transmitter pauses for 3 seconds then emits 8 groups of two digit numbers. Each pair of two digit numbers is seperated by a 3 second pause.

  1. Days since change of state
  2. Days since hatch
  3. Days since desertion alert
  4. Time of emergence
  5. Weeks of batt life for Tx
  6. Activity yesterday
  7. Activity 2 days ago
  8. True mean of last 4 days (activity)

Full manual http://wildtech.co.nz/downloads/NiB%20CT%20V3.4.pdf

To Do:

  • Add samples for testing purposes (weak signals, signals on ch00 and ch99, multiple signals, signals at 30, 48, 80 bpm, CT signals)
  • In sample_processor handle edge case where chunk edge goes through middle of a beep (falling edge array is empty). Add Boolean 'no_falling_edge' and track number of high samples for calculation of BEEP_DURATION on next set of chunks.
  • Lower threshold to more suitable value - from 0.9 to ?
  • Test performance on Rpi4
  • Add sample signal on Ch00 and Ch99 for Nyquist edge test
  • Add sample signal for 30BPM (incubation mode)
  • Add validation (1) background BPM output with tolerance +/- 1? [expected for expected in [80, 46, 47, 48, 30] if abs(actual - expected) < 1] and (2) BEEP_DURATION must be 0.017 sec
  • Processing of CT signals - start with a data class for CT and then CT detection (3 second pause in gap between beeps, i.e. rising_edges)
  • Add SNR output for each beep
  • How often to do a channel scan? Hourly?
  • Add option to log signals to MySQL
  • Change Fc default to closer to being between middle freqs (i.e. 160.625Mhz) if bandwidth is 1.5Mhz. Else if bandwidth is 2.048Mhz then Fc can be out of band for freqs of interest - performance question on Rpi4 / No need to deal with DC spike at Fc.
  • Scan and Log CT signals daily.

Sample Array Files

https://geekhelp-my.sharepoint.com/:f:/g/personal/al_geekhelp_co_nz/EhBFHUL_rwtKlAynyeeJMHoB3r3P6JYrl-5MQp0ihP7-_w?e=hoKMeB

Installation

Installation within a virtual environment is highly recommended

Pip

pip install 'kiwitracker@git+https://github.com/bigalnz/test_fft.git'

Development Mode

Clone the repo

git clone [email protected]:bigalnz/test_fft.git

Install in "editable mode"

pip install -e .

Usage

Once installed, the project can be invoked on the command line:

kiwitracker --help

Which should display the following:

usage: kiwitracker [-h] [-f INFILE] [-o OUTFILE] [-m MAX_SAMPLES] [-c CHUNK_SIZE] [-s SAMPLE_RATE] [--center-freq CENTER_FREQ] [-g GAIN] [--carrier CARRIER]

options:
  -h, --help            show this help message and exit

  -f INFILE, --from-file INFILE
                        Read samples from the given filename and process them

  -o OUTFILE, --outfile OUTFILE
                        Read samples from the device and save to the given filename

  -m MAX_SAMPLES, --max-samples MAX_SAMPLES
                        Number of samples to read when "-o/--outfile" is specified

Sampling:
  -c CHUNK_SIZE, --chunk-size CHUNK_SIZE
                        Chunk size for sdr.read_samples (default: 65536)

  -s SAMPLE_RATE, --sample-rate SAMPLE_RATE
                        SDR sample rate (default: 1024000.0)
  --center-freq CENTER_FREQ
                        SDR center frequency (default: 160270968)

  -g GAIN, --gain GAIN  SDR gain (default: 7.7)

Processing:
  --carrier CARRIER     Carrier frequency to process (default: 160707760)

kiwitracker's People

Contributors

bigalnz avatar nocarryr avatar bradleeharr avatar dkozel avatar smarsland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.