Skip to content

Project-CETI/whale-tag-recovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whale-tag-recovery

Daughterboard for Project CETI whale tags v2.2 implementing APRS based GPS tracking.

Repository Setup

This project is setup to not track most of the autogenerated files created by STM32CubeMX (or STM32CubeIDE). To generate these codes in STM32CubeIDE select project > Generate Code from the menu bar. See the section titled "Code and Flashing" from Amjad's Handover document for more specifics on downloading STM32CubeIDE and flashing the board: https://docs.google.com/document/d/1o9TE2r5OU4Np_9Mus9UJ9wEsDlY4g3nc/edit

Background information

Recovery Boards used by Project CETI are attached to tags to record GPS location of the tag when the whale surfaces, and to broadcast GPS location using APRS to track the location of the tag in real time and eventually recover it when it has detached from a whale. Currently there is limited communication between the tag software and the Recovery Board software, so the Recovery Board does not always know when a whale is submerged or not. Because of this, it will attempt to acquire a GPS signal before going into a sleep state until it gets woken up again. Once a GPS signal has been acquired, the Recovery Board broadcasts the GPS location data and also relays the information to the main tag so that it can be logged with the other tag sensor data. The Recovery Boards have also been used as standalone devices, or "floaters".

APRS

APRS is the radio communication protocol the Recovery Boards use for broadcasting the GPS location. One reasoning for using APRS is that the infrasture in Dominica is very well suited for APRS communication. The APRS protocol is specified in much greater detail here, however the overall premise is that it uses frequency switching of waveforms to encode information.

Once a GPS location has been acquired, an APRS message is formatted with all the information such as callsign, ssid, etc. Then, using the AX.25 protocol that ASCII string of the APRS message is converted into an binary array. The binary array is then converted into an FSK FM signal, one byte at a time. The bit encoding scheme is known as NRZI or Non-Return to Zero, Inverted.

The bit encoding is what dictates the waveform frequencies. The two APRS waveform frequencies are 1200Hz and 2200Hz. Every time a 1-bit is encountered, there is no change in the tone. If a 0-bit is encountered, the frequency is switched. For example, if the frequency was previously 1200Hz, it will switch to 2200Hz when a 0-bit is encountered. The waveform itself is generated by sending values from an 8-bit sine wave to the DAC with microsecond pauses in-between. The pauses are what determines the frequency of the wave, and the value of the pause changes based on which frequency is being generated.

Within the aprs directory, the values for the timing can be found in the Core/Inc/Recovery Inc/VHF.h.

In the United States, the frequency APRS is broadcast at is 144.39MHz, but in Dominica it is 145.05MHz. It varies country to country.

ThreadX Documentation

This project uses ThreadX as its RTOS. Although we only really have one active thread at a time (APRS or Fishtracker), an RTOS was used since it was also used on the V3 Tag. This made the code entirely reuseable between the two. For more information on ThreadX, see the setup document: https://docs.google.com/document/d/1OzBxFDs0OrZu2cVyPhHXoqq2Y2pGeERJWq3Q2YsUxtY/edit?usp=sharing

Recovery Documentation and Code Description

For more information on how the Recovery Algorithm works, see the following resources/handover documents: TODO: ADD HANDOVER LINKS HERE

Authors:

Michael Salino-Hugg, Kaveet Grewal, Saksham Ahuja