BearingNtf– estimated direction of arrival of a received signalField Type Default Remarks azimuthdoubleazimuth in body frame (degrees) elevationdoubleelevation in body frame (degrees) locationdouble[]pitchdoublerolldoublerxStartTimelongreception start time of the frame the bearing is for worldAzimuthdoubleazimuth in world frame (degrees, 0 is East, anticlockwise) worldElevationdoubleelevation in world frame (degrees) yawdouble
26 Direction of arrival
org.arl.unet.Services.DOA
26.1 Overview
The DOA service estimates the direction of arrival (bearing) of received signals, using an array of transducers. When DOA estimation is enabled, the bearing of each detected signal is reported as a BearingNtf, giving the azimuth and elevation of the source relative to the receiver (and, where node orientation is known, in world coordinates).
26.2 Bearings, frames of reference & arrays
Direction-of-arrival (DOA) estimation answers the question “which way did that signal come from?” When a frame arrives, a single-transducer modem can tell you that it arrived (and, with ranging, how far away the source is — see Chapter 25), but not the direction. To recover direction, the modem needs a receiver array — several transducers (hydrophones) at known positions. The small differences in arrival time (and phase) of the same signal across the elements of the array let the modem estimate the bearing of the source. This is the basis of ultra-short baseline (USBL) positioning: combine a bearing with a range and you have a relative position fix for the transmitting node.
A bearing carries two angles:
- Azimuth — the horizontal direction to the source.
- Elevation — the vertical angle to the source (how far above or below the horizontal plane it lies).
Crucially, each angle may be reported in two frames of reference:
- Local (body) frame —
azimuthandelevation, measured relative to the modem’s own array: azimuth is 0° in the array’s (+x, z)-plane and 90° in its (+y, z)-plane, while elevation is 0° in the xy-plane and 90° along the +z axis. These angles move with the node: if the node yaws, pitches or rolls, the same physical source produces different local angles. - World (geographic) frame —
worldAzimuthandworldElevation, the same direction expressed in fixed, earth-referenced coordinates, following the node frame conventions (Chapter 14): azimuth 0° is East, increasing anticlockwise. To resolve the local bearing into the world frame, the modem must know the node’s orientation; theBearingNtftherefore also reports thepitch,rollandyawused (and the receiverlocation, where known). When orientation is unavailable, only the local angles may be populated.
All angles are in degrees.
26.3 Messages
Agents providing this service generate the following notifications on the agent’s topic.
A BearingNtf reports the estimated direction of arrival for each received frame (or detected signal) whose bearing could be estimated:
The rxStartTime field matches that of the corresponding RxFrameNtf/RxBasebandSignalNtf, letting a subscriber pair each bearing with the reception it belongs to.
When a bearing can be combined with a range to the same node (from the RANGING service, Chapter 25), the provider resolves the two into a full position fix and reports it as a PeerLocationNtf:
PeerLocationNtf– location of a peer node, fixed by bearing and rangeField Type Default Remarks locationdouble[]location of this (receiving) node peerint-1address of the located peer node peerLocationdouble[]estimated location of the peer node rxStartTimelongreception start time of the frame used for the fix
This is what turns a USBL modem into a positioning system: the bearing gives direction, the range gives distance, and together they place the peer node in space. The peerLocation and the local node’s own location are reported in the node’s coordinate frame (Chapter 14), and rxStartTime ties the fix back to the reception it was computed from.
26.4 Parameters
An agent providing the DOA service exposes the following parameters (org.arl.unet.localization.DOAParam):
enable– enable DOA estimationbaseband– baseband agent monitored for DOA estimation
26.5 Examples
Start a 2-node network with node B offset both horizontally and vertically from node A, enable USBL reporting on node A’s simulated modem, and subscribe to the physical agent’s notifications:
Now, from node B’s shell, send a frame to node A:
> phy << new TxFrameReq(to: host('A'), type: DATA)
AGREEBack on node A’s shell, a BearingNtf is reported alongside the usual reception notifications. Node B lies to the north-east of A (world azimuth 45°) and 30 m below it, so the bearing reads:
phy >> DetectionNtf:INFORM[preamble:2 rxStartTime:2218435578 rxDuration:1020000]
phy >> RxFrameStartNtf:INFORM[type:DATA rxStartTime:2218435578 rxDuration:1020000]
phy >> BearingNtf:INFORM[worldAzimuth:45.0 worldElevation:-1.215244761967049 rxStartTime:2218435578 location:0,0,-15]A bearing gives direction; a range to the same node adds distance, and together they fix the peer’s position. If node A ranges node B and requests its location (Chapter 25), the modem fuses the bearing and range into a PeerLocationNtf. We range B over the DATA channel (so the response has room for the encoded location) and watch the fix arrive (the intervening reception notifications are omitted here for clarity):
phy >> BearingNtf:INFORM[worldAzimuth:45.0 worldElevation:-1.215244761967049 rxStartTime:2222758578 location:0,0,-15]
phy >> BearingNtf:INFORM[worldAzimuth:45.0 worldElevation:-1.215244761967049 rxStartTime:2223836578 location:0,0,-15]
ranging >> RangeNtf:INFORM[from:232 to:31 range:1418.8744 offset:-1246267925 rxStartTime:2222758578 peerLocation:1000,1000,-45]
phy >> PeerLocationNtf:INFORM[rxStartTime:2222758578 peerLocation:1000,1000,-45 location:0,0,-15 peer:31]The PeerLocationNtf places node B at [1000, 1000, -45] — direction from the bearing, distance from the range — a full USBL position fix, reported alongside the BearingNtf and the RangeNtf it was computed from.
26.6 Implementations
The DOA service is provided by the modem, not by an agent loaded from setup.groovy (see Chapter 13 for how the physical-layer services are provided in general).
26.6.1 USBL (modem firmware)
| Class | Services | Capabilities | Availability |
|---|---|---|---|
USBL |
DOA |
— | commercial modems with USBL arrays |
On a commercial modem whose receiver array supports direction-of-arrival estimation, the DOA service is provided by a usbl agent in the modem firmware; where the array does not support it, the modem simply does not advertise the service. When enable is set, the agent estimates the local (body-frame) angles from the differences in arrival time of each received signal across the array elements, resolves them into the world frame using the node’s measured orientation (yaw/pitch/roll from the NODE_INFO service), and publishes the result as a BearingNtf. When a range to the same node is also available (from the RANGING service), it combines the bearing and range into a full position fix and publishes it as a PeerLocationNtf.
26.6.2 HalfDuplexModem (phy)
In simulation, the HalfDuplexModem agent (Chapter 17) registers the DOA service, and generates BearingNtf notifications only when its usbl parameter is enabled (it is false by default; the simulator does not use DOAParam.enable). Because the simulator knows the true transmitter and receiver positions, it computes the world-frame angles directly from the geometry: worldAzimuth from the east/north offsets between the nodes, and worldElevation from the depth difference and horizontal range. The body-frame angles are not populated. With usbl enabled, a range to the same node (e.g. via requestLocation, Chapter 25) is combined with the cached bearing to emit a PeerLocationNtf, emulating a full USBL position fix.