QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSReceiverFamilies.cc
Go to the documentation of this file.
2
3#include <algorithm>
4#include <array>
5
6namespace {
7
8// A new family adds its FAMILY here.
9constexpr std::array FAMILIES{
10 &UBX::FAMILY, // u-blox
11 &Ashtech::FAMILY, // Trimble
12 &SBF::FAMILY, // Septentrio
13 &Femto::FAMILY, // Femtomes
14 &Unicore::FAMILY, // Unicore
15 &Quectel::FAMILY, // Quectel
16 &Passive::FAMILY, // Passive NMEA
17};
18
19} // namespace
20
21std::span<const GPSReceiverFamily* const> gpsReceiverFamilies()
22{
23 return FAMILIES;
24}
25
27{
28 const auto found = std::ranges::find(FAMILIES, type, &GPSReceiverFamily::type);
29 return found == FAMILIES.end() ? nullptr : *found;
30}
std::span< const GPSReceiverFamily *const > gpsReceiverFamilies()
Every native receiver family, in lookup order.
const GPSReceiverFamily * gpsReceiverFamily(GPSType type)
The family for type, or nullptr when no native family supports it.
const GPSReceiverFamily FAMILY
const GPSReceiverFamily FAMILY
const GPSReceiverFamily FAMILY
const GPSReceiverFamily FAMILY
const GPSReceiverFamily FAMILY
const GPSReceiverFamily FAMILY