Skip to content

APRS and Swarm satellite based GPS tracking for tags

Notifications You must be signed in to change notification settings

kgrewal26/whale-tag-recovery

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

whale-tag-recovery

APRS based GPS tracking for whale tags on the Kaveet and Saksham Edition Recovery board.

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 aprs_sig_s struct in aprs.c.

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.

C Style and formatting

This repository is formatted in the same manner as the V3.0 Embedded Firmware for the Tag. See the style guide written by Michael Salino-Hugg for more specific details.

Repository Setup

This project is setup the same way as any other generic STM32 project, like the V3 Tag Firmware. 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

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

About

APRS and Swarm satellite based GPS tracking for tags

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.1%
  • Assembly 0.9%