The Modem class in classes/modem.py
provides an interface to Delphis subsea acoustic modems.
Multiple nodes form an acoustic telemetry network. Each node is a Raspberry Pi with an attached acoustic modem. Nodes are either active or passive. Passive nodes have known positions, either prescribed or measured with GPS, which are periodically broadcast. Active nodes send ranging pings to passive nodes and estimate their own positions using true-range multilateration.
All nodes contain identical code. When a node starts up, it checks the address of the attached modem and runs using associated parameters from config.yaml
. A mode can also be specified from the command line for testing purposes, ignoring the mode in config.yaml
.
Depending on the specified mode, the node will perform a different task:
- Set address (
./beacons.py set xxx
): sets the address of the attached modem toxxx
, then exits. - Active mode (
./beacons.py active
) runs two threads:- Cyclically send range pings to all passive beacons
- Parse incoming range returns and broadcasts from passive beacons
- Passive mode (
./beacons.py passive
) runs two threads:- Monitor GPS serial port for position updates
- Periodically broadcast current position
- Timer mode (
./beacons.py timer P
or./beacons.py timer P xxx
) periodically (with periodP
) broadcasts (or unicasts to modemxxx
) the current time from the node’s Raspberry Pi. - Report mode (
./beacons.py report
) prints all incoming messages.
Copy deploy_example.sh
to deploy.sh
and modify as necessary to copy code to all nodes.
Each time an active beacon receives a new unit of position information (i.e. a passive beacon location or range), the multilateration solver estimates the active beacon’s position.
This process utilizes Scipy’s minimize function to numerically minimize the difference between measured ranges and expected ranges given a position estimate. This is a high-level but highly configuratble numerical solver, and may require additional tuning for best results.
See true-range multilateration on Wikipedia for more information on this class of problem.
- Re-configure timing to switch between a broadcast phase and cyclic ping phase
- Add third beacon class (non-tracking, non-broadcasting) for ranging only