Location-aware devices will create new services and applications in emerging fields such as autonomous driving, smart cities, and the Internet of Things. Many existing localization systems rely on anchors such as satellites at known positions which broadcast radio signals. However, such signals may be blocked by obstacles, corrupted by multipath propagation, or provide insufficient localization accuracy. Therefore, ubiquitous localization remains an extremely challenging problem. This paper introduces Peregrine, a 3-D cooperative network localization and navigation (NLN) system. Peregrine nodes are low-cost business-card-sized devices, consisting of a microprocessor, a commercially available ultra-wideband (UWB) radio module, and a small battery. Recently developed distributed algorithms are used in Peregrine to solve the highly interrelated problems of node inference and node activation in real-time, enabling resource efficiency, scalability, and accuracy for NLN. Node inference – based on the recently introduced sigma point belief propagation (SPBP) algorithm – enables spatiotemporal cooperation in realtime and estimates the nodes' positions accurately from UWB distance measurements. A distributed node activation algorithm controls channel access to improve the efficiency and reduce the localization error of the network. Contributions of each algorithmic component to overall system performance are validated through indoor localization experiments. Our results show that Peregrine achieves decimeter-level 3-D position accuracy in a challenging propagation environment.