| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // This file is part of INSTINCT, the INS Toolkit for Integrated | ||
| 2 | // Navigation Concepts and Training by the Institute of Navigation of | ||
| 3 | // the University of Stuttgart, Germany. | ||
| 4 | // | ||
| 5 | // This Source Code Form is subject to the terms of the Mozilla Public | ||
| 6 | // License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 7 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
| 8 | |||
| 9 | /// @file Code.hpp | ||
| 10 | /// @brief Code definitions | ||
| 11 | /// @author T. Topp (topp@ins.uni-stuttgart.de) | ||
| 12 | /// @date 2022-06-01 | ||
| 13 | |||
| 14 | #pragma once | ||
| 15 | |||
| 16 | #include <bitset> | ||
| 17 | #include <cstdint> | ||
| 18 | #include <fmt/format.h> | ||
| 19 | |||
| 20 | #include "Navigation/GNSS/Core/SatelliteSystem.hpp" | ||
| 21 | #include "Navigation/GNSS/Core/Frequency.hpp" | ||
| 22 | |||
| 23 | namespace NAV | ||
| 24 | { | ||
| 25 | |||
| 26 | /// @brief Enumerate for GNSS Codes | ||
| 27 | /// | ||
| 28 | /// <table> | ||
| 29 | /// <tr><th> System <th> Band <th> Code <th> Description | ||
| 30 | /// <tr><td rowspan="16" valign="top"> GPS <td rowspan="7" valign="top"> L1 <td> L1C <td> C/A-code | ||
| 31 | /// <tr> <td> L1S, L1L, L1X <td> L1C (data, pilot, combined) | ||
| 32 | /// <tr> <td> L1P <td> P-code (unencrypted) | ||
| 33 | /// <tr> <td> L1W <td> Semicodeless P(Y) tracking (Z-tracking) | ||
| 34 | /// <tr> <td> L1Y <td> Y-code (with decryption) | ||
| 35 | /// <tr> <td> L1M <td> M-code | ||
| 36 | /// <tr> <td> L1N <td> codeless | ||
| 37 | /// <tr> <td rowspan="8" valign="top"> L2 <td> L2C <td> C/A-code | ||
| 38 | /// <tr> <td> L2D <td> Semi-codeless P(Y) tracking (L1 C/A+(P2-P1)) | ||
| 39 | /// <tr> <td> L2S, L2L, L2X <td> L2C-code (medium, long, combined) | ||
| 40 | /// <tr> <td> L2P <td> P-code (unencrypted) | ||
| 41 | /// <tr> <td> L2W <td> Semicodeless P(Y) tracking (Z-tracking) | ||
| 42 | /// <tr> <td> L2Y <td> Y-code (with decryption) | ||
| 43 | /// <tr> <td> L2M <td> M-code | ||
| 44 | /// <tr> <td> L2N <td> codeless | ||
| 45 | /// <tr> <td> L5 <td> L5I, L5Q, L5X <td> L5 (data, pilot, combined) | ||
| 46 | /// <tr><td rowspan= "7" valign="top"> Galileo <td rowspan="3" valign="top"> E1 <td> L1A <td> PRS signal | ||
| 47 | /// <tr> <td> L1B, L1C, L1X <td> OS (data, pilot, combined) | ||
| 48 | /// <tr> <td> L1Z <td> PRS + OS(data+pilot) | ||
| 49 | /// <tr> <td> E5a <td> L5I, L5Q, L5X <td> E5a (data, pilot, combined) | ||
| 50 | /// <tr> <td rowspan="3" valign="top"> E6 <td> L6A <td> E6 PRS signal | ||
| 51 | /// <tr> <td> L6B, L6C, L6X <td> E6 (data, pilot, combined) | ||
| 52 | /// <tr> <td> L6Z <td> E6 PRS + OS(data+pilot) | ||
| 53 | /// <tr> <td> E5b <td> L7I, L7Q, L7X <td> E5b (data, pilot, combined) | ||
| 54 | /// <tr> <td> E5 <td> L8I, L8Q, L8X <td> E5 AltBOC (data, pilot, combined) | ||
| 55 | /// <tr><td rowspan= "7" valign="top"> GLONASS <td rowspan="2" valign="top"> L1 <td> L1C <td> C/A-code | ||
| 56 | /// <tr> <td> L1P <td> P-code | ||
| 57 | /// <tr> <td rowspan="2" valign="top"> L2 <td> L2C <td> C/A-code | ||
| 58 | /// <tr> <td> L2P <td> P-code | ||
| 59 | /// <tr> <td> L3 <td> L3I, L3Q, L3X <td> L3 (data, pilot, combined) | ||
| 60 | /// <tr> <td> G1a <td> L4A, L4B, L4X <td> G1a (data, pilot, combined) | ||
| 61 | /// <tr> <td> G2b <td> L6A, L6B, L6X <td> G2a (data, pilot, combined) | ||
| 62 | /// <tr><td rowspan= "8" valign="top"> BeiDou (BDS-2/3) <td> B1 <td> L1D, L1P, L1X <td> B1 (data, pilot, combined) | ||
| 63 | /// <tr> <td> B1-2<td> L2I, L2Q, L2X <td> B1I(OS), B1Q, combined | ||
| 64 | /// <tr> <td> B2a <td> L5D, L5P, L5X <td> B2a (data, pilot, combined) | ||
| 65 | /// <tr> <td rowspan="2" valign="top"> B3 <td> L6I, L6Q, L6X <td> B3I, B3Q, combined | ||
| 66 | /// <tr> <td> L6A <td> B3A | ||
| 67 | /// <tr> <td rowspan="2" valign="top"> B2b <td> L7I, L7Q, L7X <td> BDS-2: B2I(OS), B2Q, combined | ||
| 68 | /// <tr> <td> L7D, L7P, L7Z <td> BDS-3: data, pilot, combined | ||
| 69 | /// <tr> <td> B2 <td> L8D, L8P, L8X <td> B2 (B2a+B2b): data, pilot, combined | ||
| 70 | /// <tr><td rowspan= "9" valign="top"> QZSS <td rowspan="3" valign="top"> L1 <td> L1C <td> C/A-code | ||
| 71 | /// <tr> <td> L1S, L1L, L1X <td> L1C (data, pilot, combined) | ||
| 72 | /// <tr> <td> L1Z <td> L1-SAIF signal | ||
| 73 | /// <tr> <td> L2 <td> L2S, L2L, L2X <td> L2C-code (medium, long, combined) | ||
| 74 | /// <tr> <td rowspan="2" valign="top"> L5 <td> L5I, L5Q, L5X <td> L5 (data, pilot, combined) | ||
| 75 | /// <tr> <td> L5D, L5P, L5Z <td> I, Q, combined | ||
| 76 | /// <tr> <td rowspan="3" valign="top"> L6 <td> L6S, L6L, L6X <td> LEX signal (short, long, combined) | ||
| 77 | /// <tr> <td> L6E <td> L6E | ||
| 78 | /// <tr> <td> L6Z <td> L6(D+E) | ||
| 79 | /// <tr><td rowspan= "4" valign="top"> IRNSS/NavIC <td rowspan="2" valign="top"> L5 <td> L5A <td> SPS Signal | ||
| 80 | /// <tr> <td> L5B, L5C, L5X <td> RS (data, pilot, combined) | ||
| 81 | /// <tr> <td rowspan="2" valign="top"> S <td> L9A <td> SPS signal | ||
| 82 | /// <tr> <td> L9B, L9C, L9X <td> RS (data, pilot, combined) | ||
| 83 | /// <tr><td rowspan= "2" valign="top"> SBAS <td> L1 <td> L1C <td> C/A-code | ||
| 84 | /// <tr> <td> L5 <td> L5I, L5Q, L5X <td> L5 (data, pilot, combined) | ||
| 85 | /// </table> | ||
| 86 | /// @note See \cite SpringerHandbookGNSS2017 Springer Handbook GNSS Annex A, Table A.5, p. 1211 | ||
| 87 | /// @note See \cite RINEX-3.04 RINEX 3.04 Appendix A23, p. A43-A46 (97-100) | ||
| 88 | class Code | ||
| 89 | { | ||
| 90 | public: | ||
| 91 | /// @brief Enumeration of all Codes | ||
| 92 | enum Enum : uint8_t | ||
| 93 | { | ||
| 94 | None, ///< None | ||
| 95 | |||
| 96 | G1C, ///< GPS L1 - C/A-code | ||
| 97 | G1S, ///< GPS L1 - L1C-D (data) | ||
| 98 | G1L, ///< GPS L1 - L1C-P (pilot) | ||
| 99 | G1X, ///< GPS L1 - L1C-(D+P) (combined) | ||
| 100 | G1P, ///< GPS L1 - P-code (unencrypted) | ||
| 101 | G1W, ///< GPS L1 - Semicodeless P(Y) tracking (Z-tracking) | ||
| 102 | G1Y, ///< GPS L1 - Y-code (with decryption) | ||
| 103 | G1M, ///< GPS L1 - M-code | ||
| 104 | G1N, ///< GPS L1 - codeless | ||
| 105 | G2C, ///< GPS L2 - C/A-code | ||
| 106 | G2D, ///< GPS L2 - Semi-codeless P(Y) tracking (L1 C/A + (P2-P1)) | ||
| 107 | G2S, ///< GPS L2 - L2C(M) (medium) | ||
| 108 | G2L, ///< GPS L2 - L2C(L) (long) | ||
| 109 | G2X, ///< GPS L2 - L2C(M+L) (combined) | ||
| 110 | G2P, ///< GPS L2 - P-code (unencrypted) | ||
| 111 | G2W, ///< GPS L2 - Semicodeless P(Y) tracking (Z-tracking) | ||
| 112 | G2Y, ///< GPS L2 - Y-code (with decryption) | ||
| 113 | G2M, ///< GPS L2 - M-code | ||
| 114 | G2N, ///< GPS L2 - codeless | ||
| 115 | G5I, ///< GPS L5 - Data | ||
| 116 | G5Q, ///< GPS L5 - Pilot | ||
| 117 | G5X, ///< GPS L5 - Combined | ||
| 118 | |||
| 119 | E1A, ///< GAL E1 - PRS signal | ||
| 120 | E1B, ///< GAL E1 - OS (data) | ||
| 121 | E1C, ///< GAL E1 - OS (pilot) | ||
| 122 | E1X, ///< GAL E1 - OS(B+C) (combined) | ||
| 123 | E1Z, ///< GAL E1 - PRS + OS (data + pilot) | ||
| 124 | E5I, ///< GAL E5a - Data | ||
| 125 | E5Q, ///< GAL E5a - Pilot | ||
| 126 | E5X, ///< GAL E5a - Combined | ||
| 127 | E6A, ///< GAL E6 - PRS signal | ||
| 128 | E6B, ///< GAL E6 - Data | ||
| 129 | E6C, ///< GAL E6 - Pilot | ||
| 130 | E6X, ///< GAL E6 - Combined (B+C) | ||
| 131 | E6Z, ///< GAL E6 - PRS + OS (A+B+C) | ||
| 132 | E7I, ///< GAL E5b - Data | ||
| 133 | E7Q, ///< GAL E5b - Pilot | ||
| 134 | E7X, ///< GAL E5b - Combined | ||
| 135 | E8I, ///< GAL E5(a+b) - AltBOC (data) | ||
| 136 | E8Q, ///< GAL E5(a+b) - AltBOC (pilot) | ||
| 137 | E8X, ///< GAL E5(a+b) - AltBOC (combined) | ||
| 138 | |||
| 139 | R1C, ///< GLO L1 - C/A-code | ||
| 140 | R1P, ///< GLO L1 - P-code | ||
| 141 | R2C, ///< GLO L2 - C/A-code | ||
| 142 | R2P, ///< GLO L2 - P-code | ||
| 143 | R3I, ///< GLO L3 - Data | ||
| 144 | R3Q, ///< GLO L3 - Pilot | ||
| 145 | R3X, ///< GLO L3 - Combined | ||
| 146 | R4A, ///< GLO G1a - L1OCd (data) | ||
| 147 | R4B, ///< GLO G1a - L1OCp (pilot) | ||
| 148 | R4X, ///< GLO G1a - L1OCd+L1OCp (combined) | ||
| 149 | R6A, ///< GLO G2a - L2CSI (data) | ||
| 150 | R6B, ///< GLO G2a - L2OCp (pilot) | ||
| 151 | R6X, ///< GLO G2a - L2CSI+L2OCp (combined) | ||
| 152 | |||
| 153 | B1D, ///< BeiDou B1 - Data (D) | ||
| 154 | B1P, ///< BeiDou B1 - Pilot(P) | ||
| 155 | B1X, ///< BeiDou B1 - D+P | ||
| 156 | B2I, ///< BeiDou B1-2 - B1I(OS) | ||
| 157 | B2Q, ///< BeiDou B1-2 - B1Q | ||
| 158 | B2X, ///< BeiDou B1-2 - B1I(OS), B1Q, combined | ||
| 159 | B5D, ///< BeiDou B2a - Data (D) | ||
| 160 | B5P, ///< BeiDou B2a - Pilot(P) | ||
| 161 | B5X, ///< BeiDou B2a - D+P | ||
| 162 | B6I, ///< BeiDou B3 - B3I | ||
| 163 | B6Q, ///< BeiDou B3 - B3Q | ||
| 164 | B6X, ///< BeiDou B3 - B3I, B3Q, combined | ||
| 165 | B6A, ///< BeiDou B3 - B3A | ||
| 166 | B7I, ///< BeiDou B2b (BDS-2) - B2I(OS) | ||
| 167 | B7Q, ///< BeiDou B2b (BDS-2) - B2Q | ||
| 168 | B7X, ///< BeiDou B2b (BDS-2) - B2I(OS), B2Q, combined | ||
| 169 | B7D, ///< BeiDou B2b (BDS-3) - Data (D) | ||
| 170 | B7P, ///< BeiDou B2b (BDS-3) - Pilot(P) | ||
| 171 | B7Z, ///< BeiDou B2b (BDS-3) - D+P | ||
| 172 | B8D, ///< BeiDou B2 (B2a+B2b) - Data (D) | ||
| 173 | B8P, ///< BeiDou B2 (B2a+B2b) - Pilot(P) | ||
| 174 | B8X, ///< BeiDou B2 (B2a+B2b) - D+P | ||
| 175 | |||
| 176 | J1C, ///< QZSS L1 - C/A-code | ||
| 177 | J1S, ///< QZSS L1 - L1C (data) | ||
| 178 | J1L, ///< QZSS L1 - L1C (pilot) | ||
| 179 | J1X, ///< QZSS L1 - L1C (combined) | ||
| 180 | J1Z, ///< QZSS L1 - L1-SAIF signal | ||
| 181 | J2S, ///< QZSS L2 - L2C-code (medium) | ||
| 182 | J2L, ///< QZSS L2 - L2C-code (long) | ||
| 183 | J2X, ///< QZSS L2 - L2C-code (combined) | ||
| 184 | J5I, ///< QZSS L5 - Data | ||
| 185 | J5Q, ///< QZSS L5 - Pilot | ||
| 186 | J5X, ///< QZSS L5 - Combined | ||
| 187 | J5D, ///< QZSS L5S - I | ||
| 188 | J5P, ///< QZSS L5S - Q | ||
| 189 | J5Z, ///< QZSS L5S - I+Q | ||
| 190 | J6S, ///< QZSS L6 - L6D LEX signal (short) | ||
| 191 | J6L, ///< QZSS L6 - L6P LEX signal (long) | ||
| 192 | J6X, ///< QZSS L6 - L6(D+P) LEX signal (combined) | ||
| 193 | J6E, ///< QZSS L6 - L6E | ||
| 194 | J6Z, ///< QZSS L6 - L6(D+E) | ||
| 195 | |||
| 196 | I5A, ///< IRNSS L5 - SPS Signal | ||
| 197 | I5B, ///< IRNSS L5 - RS (data) | ||
| 198 | I5C, ///< IRNSS L5 - RS (pilot) | ||
| 199 | I5X, ///< IRNSS L5 - RS (combined) | ||
| 200 | I9A, ///< IRNSS S - SPS signal | ||
| 201 | I9B, ///< IRNSS S - RS (data) | ||
| 202 | I9C, ///< IRNSS S - RS (pilot) | ||
| 203 | I9X, ///< IRNSS S - RS (combined) | ||
| 204 | |||
| 205 | S1C, ///< SBAS L1 - C/A-code | ||
| 206 | S5I, ///< SBAS L5 - Data | ||
| 207 | S5Q, ///< SBAS L5 - Pilot | ||
| 208 | S5X, ///< SBAS L5 - Combined | ||
| 209 | }; | ||
| 210 | /// @brief Helper variables | ||
| 211 | enum : uint8_t | ||
| 212 | { | ||
| 213 | _GPS_START = G1C, ///< GPS start index in the Enum | ||
| 214 | _GPS_END = G5X, ///< GPS end index in the Enum | ||
| 215 | _GAL_START = E1A, ///< GAL start index in the Enum | ||
| 216 | _GAL_END = E8X, ///< GAL end index in the Enum | ||
| 217 | _GLO_START = R1C, ///< GLO start index in the Enum | ||
| 218 | _GLO_END = R6X, ///< GLO end index in the Enum | ||
| 219 | _BDS_START = B1D, ///< BDS start index in the Enum | ||
| 220 | _BDS_END = B8X, ///< BDS end index in the Enum | ||
| 221 | _QZSS_START = J1C, ///< QZSS start index in the Enum | ||
| 222 | _QZSS_END = J6Z, ///< QZSS end index in the Enum | ||
| 223 | _IRNSS_START = I5A, ///< IRNSS start index in the Enum | ||
| 224 | _IRNSS_END = I9X, ///< IRNSS end index in the Enum | ||
| 225 | _SBAS_START = S1C, ///< SBAS start index in the Enum | ||
| 226 | _SBAS_END = S5X, ///< SBAS end index in the Enum | ||
| 227 | |||
| 228 | _G01_START = G1C, ///< GPS L1 start index in the Enum | ||
| 229 | _G01_END = G1N, ///< GPS L1 end index in the Enum | ||
| 230 | _G02_START = G2C, ///< GPS L2 start index in the Enum | ||
| 231 | _G02_END = G2N, ///< GPS L2 end index in the Enum | ||
| 232 | _G05_START = G5I, ///< GPS L5 start index in the Enum | ||
| 233 | _G05_END = G5X, ///< GPS L5 end index in the Enum | ||
| 234 | |||
| 235 | _E01_START = E1A, ///< GAL E1 start index in the Enum | ||
| 236 | _E01_END = E1Z, ///< GAL E1 end index in the Enum | ||
| 237 | _E05_START = E5I, ///< GAL E5a start index in the Enum | ||
| 238 | _E05_END = E5X, ///< GAL E5a end index in the Enum | ||
| 239 | _E06_START = E6B, ///< GAL E6 start index in the Enum | ||
| 240 | _E06_END = E6X, ///< GAL E6 end index in the Enum | ||
| 241 | _E07_START = E7I, ///< GAL E5b start index in the Enum | ||
| 242 | _E07_END = E7X, ///< GAL E5b end index in the Enum | ||
| 243 | _E08_START = E8I, ///< GAL E5(a+b) start index in the Enum | ||
| 244 | _E08_END = E8X, ///< GAL E5(a+b) end index in the Enum | ||
| 245 | |||
| 246 | _R01_START = R1C, ///< GLO L1 start index in the Enum | ||
| 247 | _R01_END = R1P, ///< GLO L1 end index in the Enum | ||
| 248 | _R02_START = R2C, ///< GLO L2 start index in the Enum | ||
| 249 | _R02_END = R2P, ///< GLO L2 end index in the Enum | ||
| 250 | _R03_START = R3I, ///< GLO L3 start index in the Enum | ||
| 251 | _R03_END = R3X, ///< GLO L3 end index in the Enum | ||
| 252 | _R04_START = R4A, ///< GLO G1a start index in the Enum | ||
| 253 | _R04_END = R4X, ///< GLO G1a end index in the Enum | ||
| 254 | _R06_START = R6A, ///< GLO G2a start index in the Enum | ||
| 255 | _R06_END = R6X, ///< GLO G2a end index in the Enum | ||
| 256 | |||
| 257 | _B01_START = B1D, ///< BDS B1 start index in the Enum | ||
| 258 | _B01_END = B1X, ///< BDS B1 end index in the Enum | ||
| 259 | _B02_START = B2I, ///< BDS B1-2 start index in the Enum | ||
| 260 | _B02_END = B2X, ///< BDS B1-2 end index in the Enum | ||
| 261 | _B05_START = B5D, ///< BDS B2a start index in the Enum | ||
| 262 | _B05_END = B5X, ///< BDS B2a end index in the Enum | ||
| 263 | _B06_START = B6I, ///< BDS B3 start index in the Enum | ||
| 264 | _B06_END = B6A, ///< BDS B3 end index in the Enum | ||
| 265 | _B07_START = B7I, ///< BDS B2b start index in the Enum | ||
| 266 | _B07_END = B7Z, ///< BDS B2b end index in the Enum | ||
| 267 | _B08_START = B8D, ///< BDS B2 (B2a+B2b) start index in the Enum | ||
| 268 | _B08_END = B8X, ///< BDS B2 (B2a+B2b) end index in the Enum | ||
| 269 | |||
| 270 | _J01_START = J1C, ///< QZSS L1 start index in the Enum | ||
| 271 | _J01_END = J1Z, ///< QZSS L1 end index in the Enum | ||
| 272 | _J02_START = J2S, ///< QZSS L2 start index in the Enum | ||
| 273 | _J02_END = J2X, ///< QZSS L2 end index in the Enum | ||
| 274 | _J05_START = J5I, ///< QZSS L5 start index in the Enum | ||
| 275 | _J05_END = J5Z, ///< QZSS L5 end index in the Enum | ||
| 276 | _J06_START = J6S, ///< QZSS L6 start index in the Enum | ||
| 277 | _J06_END = J6Z, ///< QZSS L6 end index in the Enum | ||
| 278 | |||
| 279 | _I05_START = I5A, ///< IRNSS L5 start index in the Enum | ||
| 280 | _I05_END = I5X, ///< IRNSS L5 end index in the Enum | ||
| 281 | _I09_START = I9A, ///< IRNSS S start index in the Enum | ||
| 282 | _I09_END = I9X, ///< IRNSS S end index in the Enum | ||
| 283 | |||
| 284 | _S01_START = S1C, ///< SBAS L start index in the Enum | ||
| 285 | _S01_END = S1C, ///< SBAS L end index in the Enum | ||
| 286 | _S05_START = S5I, ///< SBAS L start index in the Enum | ||
| 287 | _S05_END = S5X, ///< SBAS L end index in the Enum | ||
| 288 | |||
| 289 | COUNT = S5X + 1 ///< Amount of Codes in the Enum | ||
| 290 | }; | ||
| 291 | |||
| 292 | /// Typedef for the bitset with size of COUNT | ||
| 293 | using Set = std::bitset<COUNT>; | ||
| 294 | |||
| 295 | /// Default constructor for an empty code | ||
| 296 | 564800 | constexpr Code() = default; | |
| 297 | |||
| 298 | /// @brief Constructor from String representation | ||
| 299 | /// @param[in] str Code as string | ||
| 300 | explicit Code(const std::string& str); | ||
| 301 | |||
| 302 | /// @brief Constructor from a biset | ||
| 303 | /// @param[in] set Bitset with values to construct the Code from | ||
| 304 | 73828977 | constexpr explicit Code(const Set& set) : value(set) {} | |
| 305 | |||
| 306 | /// @brief Constructor from a satellite system | ||
| 307 | /// @param[in] sys System to set all codes for | ||
| 308 | explicit Code(SatelliteSystem_ sys); | ||
| 309 | |||
| 310 | /// @brief Constructor from a frequency | ||
| 311 | /// @param[in] freq Frequency to set all codes for | ||
| 312 | explicit Code(Frequency_ freq); | ||
| 313 | |||
| 314 | /// @brief Constructor from a single code value | ||
| 315 | /// @param[in] e Code enum value to construct the code from | ||
| 316 | 806871309 | Code(Enum e) { value.set(e, true); } // NOLINT(hicpp-explicit-conversions, google-explicit-constructor) | |
| 317 | |||
| 318 | /// Implicit bool conversion operator. Allows if(...) | ||
| 319 | 72608727 | explicit operator bool() const { return value.any(); } | |
| 320 | |||
| 321 | /// @brief std::bitset conversion operator | ||
| 322 | /// @return The bitset representation of the type | ||
| 323 | 1164660 | constexpr explicit operator Set() const { return value; } | |
| 324 | |||
| 325 | /// @brief std::string conversion operator | ||
| 326 | /// @return A std::string representation of the type | ||
| 327 | explicit operator std::string() const; | ||
| 328 | |||
| 329 | /// @brief Generates a Code from frequency and attribute | ||
| 330 | /// @param[in] freq Frequency of the code | ||
| 331 | /// @param[in] attribute Attribute letter of the code | ||
| 332 | /// @return Code representation | ||
| 333 | static Code fromFreqAttr(Frequency freq, char attribute); | ||
| 334 | |||
| 335 | /// @brief Returns a short description for the code | ||
| 336 | /// @param[in] code GNSS signal code | ||
| 337 | static const char* GetCodeDescription(Code code); | ||
| 338 | |||
| 339 | /// @brief Returns a short description for the code | ||
| 340 | [[nodiscard]] const char* getDescription() const; | ||
| 341 | |||
| 342 | /// @brief Returns the frequency for the code | ||
| 343 | /// @param[in] code GNSS signal code | ||
| 344 | static Frequency GetCodeFequency(Code code); | ||
| 345 | |||
| 346 | /// @brief Returns the frequency for the code | ||
| 347 | [[nodiscard]] Frequency getFrequency() const; | ||
| 348 | |||
| 349 | /// @brief Checks if the codes are part of a combined code | ||
| 350 | /// @param[in] first First GNSS signal code | ||
| 351 | /// @param[in] second Second GNSS signal code | ||
| 352 | static bool IsCodeCombined(Code first, Code second); | ||
| 353 | |||
| 354 | /// @brief Returns a list with all possible codes | ||
| 355 | static std::vector<Code> GetAll(); | ||
| 356 | |||
| 357 | /// @brief Returns the enum value for the code (only one must be set) | ||
| 358 | /// @param code GNSS signal code | ||
| 359 | static Enum GetCodeEnumValue(Code code); | ||
| 360 | |||
| 361 | /// @brief Returns the enum value for the code (only one must be set) | ||
| 362 | [[nodiscard]] Enum getEnumValue() const; | ||
| 363 | |||
| 364 | // ##################################################################################################################################### | ||
| 365 | |||
| 366 | /// @brief Allows combining flags of the Code enum. | ||
| 367 | /// @param[in] lhs Left-hand side value. | ||
| 368 | /// @param[in] rhs Right-hand side value. | ||
| 369 | /// @return The binary ORed value. | ||
| 370 | friend Code operator|(const Code& lhs, const Code& rhs); | ||
| 371 | /// @brief Allows combining flags of the Code enum. | ||
| 372 | /// @param[in] lhs Left-hand side value. | ||
| 373 | /// @param[in] rhs Right-hand side value. | ||
| 374 | /// @return The binary ORed value. | ||
| 375 | friend Code operator|(const Code& lhs, const Enum& rhs); | ||
| 376 | /// @brief Allows combining flags of the Code enum. | ||
| 377 | /// @param[in] lhs Left-hand side value. | ||
| 378 | /// @param[in] rhs Right-hand side value. | ||
| 379 | /// @return The binary ORed value. | ||
| 380 | friend Code operator|(const Enum& lhs, const Code& rhs); | ||
| 381 | |||
| 382 | /// @brief Allows combining flags of the Code enum. | ||
| 383 | /// @param[in] rhs Right-hand side value. | ||
| 384 | /// @return The binary ORed value. | ||
| 385 | Code& operator|=(const Code& rhs); | ||
| 386 | /// @brief Allows combining flags of the Code enum. | ||
| 387 | /// @param[in] rhs Right-hand side value. | ||
| 388 | /// @return The binary ORed value. | ||
| 389 | Code& operator|=(const Enum& rhs); | ||
| 390 | |||
| 391 | /// @brief Allows combining flags of the Code enum. | ||
| 392 | /// @param[in] lhs Left-hand side value. | ||
| 393 | /// @param[in] rhs Right-hand side value. | ||
| 394 | /// @return The binary ANDed value. | ||
| 395 | friend Code operator&(const Code& lhs, const Code& rhs); | ||
| 396 | /// @brief Allows combining flags of the Code enum. | ||
| 397 | /// @param[in] lhs Left-hand side value. | ||
| 398 | /// @param[in] rhs Right-hand side value. | ||
| 399 | /// @return The binary ANDed value. | ||
| 400 | friend Code operator&(const Code& lhs, const Enum& rhs); | ||
| 401 | /// @brief Allows combining flags of the Code enum. | ||
| 402 | /// @param[in] lhs Left-hand side value. | ||
| 403 | /// @param[in] rhs Right-hand side value. | ||
| 404 | /// @return The binary ANDed value. | ||
| 405 | friend Code operator&(const Enum& lhs, const Code& rhs); | ||
| 406 | |||
| 407 | /// @brief Allows combining flags of the Code enum. | ||
| 408 | /// @param[in] rhs Right-hand side value. | ||
| 409 | /// @return The binary ANDed value. | ||
| 410 | Code& operator&=(const Code& rhs); | ||
| 411 | /// @brief Allows combining flags of the Code enum. | ||
| 412 | /// @param[in] rhs Right-hand side value. | ||
| 413 | /// @return The binary ANDed value. | ||
| 414 | Code& operator&=(const Enum& rhs); | ||
| 415 | |||
| 416 | /// @brief Allows negating flags of the Code enum. | ||
| 417 | Code operator~() const; | ||
| 418 | |||
| 419 | // ##################################################################################################################################### | ||
| 420 | |||
| 421 | /// @brief Equal compares values | ||
| 422 | /// @param[in] lhs Left-hand side of the operator | ||
| 423 | /// @param[in] rhs Right-hand side of the operator | ||
| 424 | /// @return Whether the comparison was successful | ||
| 425 | friend bool operator==(const Code& lhs, const Code& rhs); | ||
| 426 | |||
| 427 | /// @brief Equal compares values | ||
| 428 | /// @param[in] lhs Left-hand side of the operator | ||
| 429 | /// @param[in] rhs Right-hand side of the operator | ||
| 430 | /// @return Whether the comparison was successful | ||
| 431 | friend bool operator==(const Code& lhs, const Enum& rhs); | ||
| 432 | |||
| 433 | /// @brief Equal compares values | ||
| 434 | /// @param[in] lhs Left-hand side of the operator | ||
| 435 | /// @param[in] rhs Right-hand side of the operator | ||
| 436 | /// @return Whether the comparison was successful | ||
| 437 | friend bool operator==(const Enum& lhs, const Code& rhs); | ||
| 438 | |||
| 439 | /// @brief Inequal compares values | ||
| 440 | /// @param[in] lhs Left-hand side of the operator | ||
| 441 | /// @param[in] rhs Right-hand side of the operator | ||
| 442 | /// @return Whether the comparison was successful | ||
| 443 | friend bool operator!=(const Code& lhs, const Code& rhs); | ||
| 444 | /// @brief Inequal compares values | ||
| 445 | /// @param[in] lhs Left-hand side of the operator | ||
| 446 | /// @param[in] rhs Right-hand side of the operator | ||
| 447 | /// @return Whether the comparison was successful | ||
| 448 | friend bool operator!=(const Code& lhs, const Enum& rhs); | ||
| 449 | /// @brief Inequal compares values | ||
| 450 | /// @param[in] lhs Left-hand side of the operator | ||
| 451 | /// @param[in] rhs Right-hand side of the operator | ||
| 452 | /// @return Whether the comparison was successful | ||
| 453 | friend bool operator!=(const Enum& lhs, const Code& rhs); | ||
| 454 | |||
| 455 | /// @brief Less than comparison | ||
| 456 | /// @param[in] lhs Left-hand side of the operator | ||
| 457 | /// @param[in] rhs Right hand side of the operator | ||
| 458 | /// @return True if lhs < rhs | ||
| 459 | friend bool operator<(const Code& lhs, const Code& rhs); | ||
| 460 | |||
| 461 | /// @brief Less than comparison | ||
| 462 | /// @param[in] lhs Left-hand side of the operator | ||
| 463 | /// @param[in] rhs Right hand side of the operator | ||
| 464 | /// @return True if lhs < rhs | ||
| 465 | friend bool operator<(const Code& lhs, const Enum& rhs); | ||
| 466 | |||
| 467 | /// @brief Less than comparison | ||
| 468 | /// @param[in] lhs Left-hand side of the operator | ||
| 469 | /// @param[in] rhs Right hand side of the operator | ||
| 470 | /// @return True if lhs < rhs | ||
| 471 | friend bool operator<(const Enum& lhs, const Code& rhs); | ||
| 472 | |||
| 473 | // ##################################################################################################################################### | ||
| 474 | |||
| 475 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 476 | /// @param[in] lhs Left-hand side enum value. | ||
| 477 | /// @param[in] rhs Right-hand side enum value. | ||
| 478 | /// @return The binary ANDed value. | ||
| 479 | friend Code operator&(Code lhs, SatelliteSystem_ rhs); | ||
| 480 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 481 | /// @param[in] lhs Left-hand side enum value. | ||
| 482 | /// @param[in] rhs Right-hand side enum value. | ||
| 483 | /// @return The binary ANDed value. | ||
| 484 | friend Code operator&(SatelliteSystem_ lhs, Code rhs); | ||
| 485 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 486 | /// @param[in] rhs Right-hand side enum value. | ||
| 487 | /// @return The binary ANDed value. | ||
| 488 | Code& operator&=(const SatelliteSystem_& rhs); | ||
| 489 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 490 | /// @param[in] lhs Left-hand side enum value. | ||
| 491 | /// @param[in] rhs Right-hand side enum value. | ||
| 492 | /// @return The binary ANDed value. | ||
| 493 | friend Code operator&(Code lhs, SatelliteSystem rhs); | ||
| 494 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 495 | /// @param[in] lhs Left-hand side enum value. | ||
| 496 | /// @param[in] rhs Right-hand side enum value. | ||
| 497 | /// @return The binary ANDed value. | ||
| 498 | friend Code operator&(SatelliteSystem lhs, Code rhs); | ||
| 499 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 500 | /// @param[in] rhs Right-hand side enum value. | ||
| 501 | /// @return The binary ANDed value. | ||
| 502 | Code& operator&=(const SatelliteSystem& rhs); | ||
| 503 | |||
| 504 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 505 | /// @param[in] lhs Left-hand side enum value. | ||
| 506 | /// @param[in] rhs Right-hand side enum value. | ||
| 507 | /// @return The binary ORed value. | ||
| 508 | friend Code operator|(Code lhs, SatelliteSystem_ rhs); | ||
| 509 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 510 | /// @param[in] lhs Left-hand side enum value. | ||
| 511 | /// @param[in] rhs Right-hand side enum value. | ||
| 512 | /// @return The binary ORed value. | ||
| 513 | friend Code operator|(SatelliteSystem_ lhs, Code rhs); | ||
| 514 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 515 | /// @param[in] rhs Right-hand side enum value. | ||
| 516 | /// @return The binary ORed value. | ||
| 517 | Code& operator|=(const SatelliteSystem_& rhs); | ||
| 518 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 519 | /// @param[in] lhs Left-hand side enum value. | ||
| 520 | /// @param[in] rhs Right-hand side enum value. | ||
| 521 | /// @return The binary ORed value. | ||
| 522 | friend Code operator|(Code lhs, SatelliteSystem rhs); | ||
| 523 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 524 | /// @param[in] lhs Left-hand side enum value. | ||
| 525 | /// @param[in] rhs Right-hand side enum value. | ||
| 526 | /// @return The binary ORed value. | ||
| 527 | friend Code operator|(SatelliteSystem lhs, Code rhs); | ||
| 528 | /// @brief Allows filtering Code with SatelliteSystem. | ||
| 529 | /// @param[in] rhs Right-hand side enum value. | ||
| 530 | /// @return The binary ORed value. | ||
| 531 | Code& operator|=(const SatelliteSystem& rhs); | ||
| 532 | |||
| 533 | // ##################################################################################################################################### | ||
| 534 | |||
| 535 | /// @brief Allows filtering Code with Frequency. | ||
| 536 | /// @param[in] lhs Left-hand side enum value. | ||
| 537 | /// @param[in] rhs Right-hand side enum value. | ||
| 538 | /// @return The binary ANDed value. | ||
| 539 | friend Code operator&(Code lhs, Frequency_ rhs); | ||
| 540 | /// @brief Allows filtering Code with Frequency. | ||
| 541 | /// @param[in] lhs Left-hand side enum value. | ||
| 542 | /// @param[in] rhs Right-hand side enum value. | ||
| 543 | /// @return The binary ANDed value. | ||
| 544 | friend Code operator&(Frequency_ lhs, Code rhs); | ||
| 545 | /// @brief Allows filtering Code with Frequency. | ||
| 546 | /// @param[in] rhs Right-hand side enum value. | ||
| 547 | /// @return The binary ANDed value. | ||
| 548 | Code& operator&=(const Frequency_& rhs); | ||
| 549 | /// @brief Allows filtering Code with Frequency. | ||
| 550 | /// @param[in] lhs Left-hand side enum value. | ||
| 551 | /// @param[in] rhs Right-hand side enum value. | ||
| 552 | /// @return The binary ANDed value. | ||
| 553 | friend Code operator&(Code lhs, Frequency rhs); | ||
| 554 | /// @brief Allows filtering Code with Frequency. | ||
| 555 | /// @param[in] lhs Left-hand side enum value. | ||
| 556 | /// @param[in] rhs Right-hand side enum value. | ||
| 557 | /// @return The binary ANDed value. | ||
| 558 | friend Code operator&(Frequency lhs, Code rhs); | ||
| 559 | /// @brief Allows filtering Code with Frequency. | ||
| 560 | /// @param[in] rhs Right-hand side enum value. | ||
| 561 | /// @return The binary ANDed value. | ||
| 562 | Code& operator&=(const Frequency& rhs); | ||
| 563 | |||
| 564 | /// @brief Allows filtering Code with Frequency. | ||
| 565 | /// @param[in] lhs Left-hand side enum value. | ||
| 566 | /// @param[in] rhs Right-hand side enum value. | ||
| 567 | /// @return The binary ORed value. | ||
| 568 | friend Code operator|(Code lhs, Frequency_ rhs); | ||
| 569 | /// @brief Allows filtering Code with Frequency. | ||
| 570 | /// @param[in] lhs Left-hand side enum value. | ||
| 571 | /// @param[in] rhs Right-hand side enum value. | ||
| 572 | /// @return The binary ORed value. | ||
| 573 | friend Code operator|(Frequency_ lhs, Code rhs); | ||
| 574 | /// @brief Allows filtering Code with Frequency. | ||
| 575 | /// @param[in] rhs Right-hand side enum value. | ||
| 576 | /// @return The binary ORed value. | ||
| 577 | Code& operator|=(const Frequency_& rhs); | ||
| 578 | /// @brief Allows filtering Code with Frequency. | ||
| 579 | /// @param[in] lhs Left-hand side enum value. | ||
| 580 | /// @param[in] rhs Right-hand side enum value. | ||
| 581 | /// @return The binary ORed value. | ||
| 582 | friend Code operator|(Code lhs, Frequency rhs); | ||
| 583 | /// @brief Allows filtering Code with Frequency. | ||
| 584 | /// @param[in] lhs Left-hand side enum value. | ||
| 585 | /// @param[in] rhs Right-hand side enum value. | ||
| 586 | /// @return The binary ORed value. | ||
| 587 | friend Code operator|(Frequency lhs, Code rhs); | ||
| 588 | /// @brief Allows filtering Code with Frequency. | ||
| 589 | /// @param[in] rhs Right-hand side enum value. | ||
| 590 | /// @return The binary ORed value. | ||
| 591 | Code& operator|=(const Frequency& rhs); | ||
| 592 | |||
| 593 | // ##################################################################################################################################### | ||
| 594 | |||
| 595 | private: | ||
| 596 | /// Code bitset | ||
| 597 | Set value; | ||
| 598 | }; | ||
| 599 | |||
| 600 | // ######################################################################################################################################### | ||
| 601 | |||
| 602 | /// @brief Converts the provided link into a json object | ||
| 603 | /// @param[out] j Json object which gets filled with the info | ||
| 604 | /// @param[in] data Data to convert into json | ||
| 605 | void to_json(json& j, const Code& data); | ||
| 606 | /// @brief Converts the provided json object into a link object | ||
| 607 | /// @param[in] j Json object with the needed values | ||
| 608 | /// @param[out] data Object to fill from the json | ||
| 609 | void from_json(const json& j, Code& data); | ||
| 610 | |||
| 611 | // ######################################################################################################################################### | ||
| 612 | |||
| 613 | /// @brief Allows combining flags of the Code enum. | ||
| 614 | /// @param[in] lhs Left-hand side value. | ||
| 615 | /// @param[in] rhs Right-hand side value. | ||
| 616 | /// @return The binary ORed value. | ||
| 617 | Code operator|(const Code::Enum& lhs, const Code::Enum& rhs); | ||
| 618 | /// @brief Allows combining flags of the Code enum. | ||
| 619 | /// @param[in] lhs Left-hand side value. | ||
| 620 | /// @param[in] rhs Right-hand side value. | ||
| 621 | /// @return The binary ANDed value. | ||
| 622 | Code operator&(const Code::Enum& lhs, const Code::Enum& rhs); | ||
| 623 | |||
| 624 | const Code Code_G1S_G1L_G1X = Code::G1S | Code::G1L | Code::G1X; ///< L1C (data, pilot, combined) | ||
| 625 | const Code Code_G2S_G2L_G2X = Code::G2S | Code::G2L | Code::G2X; ///< L2C-code (medium, long, combined) | ||
| 626 | const Code Code_G5I_G5Q_G5X = Code::G5I | Code::G5Q | Code::G5X; ///< L5 (data, pilot, combined) | ||
| 627 | |||
| 628 | const Code Code_E1B_E1C_E1X = Code::E1B | Code::E1C | Code::E1X; ///< OS (data, pilot, combined) | ||
| 629 | const Code Code_E5I_E5Q_E5X = Code::E5I | Code::E5Q | Code::E5X; ///< E5a (data, pilot, combined) | ||
| 630 | const Code Code_E6B_E6C_E6X = Code::E6B | Code::E6C | Code::E6X; ///< E6 (data, pilot, combined) | ||
| 631 | const Code Code_E7I_E7Q_E7X = Code::E7I | Code::E7Q | Code::E7X; ///< E5b (data, pilot, combined) | ||
| 632 | const Code Code_E8I_E8Q_E8X = Code::E8I | Code::E8Q | Code::E8X; ///< E5 AltBOC (data, pilot, combined) | ||
| 633 | |||
| 634 | const Code Code_R3I_R3Q_R3X = Code::R3I | Code::R3Q | Code::R3X; ///< L3 (data, pilot, combined) | ||
| 635 | const Code Code_R4A_R4B_R4X = Code::R4A | Code::R4B | Code::R4X; ///< G1a (data, pilot, combined) | ||
| 636 | const Code Code_R6A_R6B_R6X = Code::R6A | Code::R6B | Code::R6X; ///< G2a (data, pilot, combined) | ||
| 637 | |||
| 638 | const Code Code_B1D_B1P_B1X = Code::B1D | Code::B1P | Code::B1X; ///< B1 (data, pilot, combined) | ||
| 639 | const Code Code_B2I_B2Q_B2X = Code::B2I | Code::B2Q | Code::B2X; ///< B1I(OS), B1Q, combined | ||
| 640 | const Code Code_B5D_B5P_B5X = Code::B5D | Code::B5P | Code::B5X; ///< B2a (data, pilot, combined) | ||
| 641 | const Code Code_B6I_B6Q_B6X = Code::B6I | Code::B6Q | Code::B6X; ///< B3I, B3Q, combined | ||
| 642 | const Code Code_B7I_B7Q_B7X = Code::B7I | Code::B7Q | Code::B7X; ///< B2I(OS), B2Q, combined | ||
| 643 | const Code Code_B7D_B7P_B7Z = Code::B7D | Code::B7P | Code::B7Z; ///< B2b (data, pilot, combined) | ||
| 644 | const Code Code_B8D_B8P_B8X = Code::B8D | Code::B8P | Code::B8X; ///< B2 (B2a+B2b) (data, pilot, combined) | ||
| 645 | |||
| 646 | const Code Code_J1S_J1L_J1X = Code::J1S | Code::J1L | Code::J1X; ///< L1C (data, pilot, combined) | ||
| 647 | const Code Code_J2S_J2L_J2X = Code::J2S | Code::J2L | Code::J2X; ///< L2C-code (medium, long, combined) | ||
| 648 | const Code Code_J5I_J5Q_J5X = Code::J5I | Code::J5Q | Code::J5X; ///< L5 (data, pilot, combined) | ||
| 649 | const Code Code_J5D_J5P_J5Z = Code::J5D | Code::J5P | Code::J5Z; ///< L5 (data, pilot, combined) | ||
| 650 | const Code Code_J6S_J6L_J6X = Code::J6S | Code::J6L | Code::J6X; ///< LEX signal (short, long, combined) | ||
| 651 | |||
| 652 | const Code Code_I5B_I5C_I5X = Code::I5B | Code::I5C | Code::I5X; ///< RS (data, pilot, combined) | ||
| 653 | const Code Code_I9B_I9C_I9X = Code::I9B | Code::I9C | Code::I9X; ///< RS (data, pilot, combined) | ||
| 654 | |||
| 655 | const Code Code_S5I_S5Q_S5X = Code::S5I | Code::S5Q | Code::S5X; ///< L5 (data, pilot, combined) | ||
| 656 | |||
| 657 | const Code Code_ALL = Code(Code::Set().set()); ///< All codes set | ||
| 658 | /// Default selection for codes | ||
| 659 | const Code Code_Default = Code(Code::Set().set()) | ||
| 660 | & ~Code(Code::G1Y) // GPS L1 - Y-code (with decryption) | ||
| 661 | & ~Code(Code::G1M) // GPS L1 - M-code | ||
| 662 | & ~Code(Code::G2Y) // GPS L2 - Y-code (with decryption) | ||
| 663 | & ~Code(Code::G2M); // GPS L2 - M-code | ||
| 664 | |||
| 665 | /// @brief Shows a ComboBox to select signal codes | ||
| 666 | /// @param[in] label Label to show beside the combo box. This has to be a unique id for ImGui. | ||
| 667 | /// @param[in, out] code Reference to the code object to select | ||
| 668 | /// @param[in] filterFreq Frequencies to select codes for. Other Frequencies will be disabled. | ||
| 669 | /// @param[in] singleSelect If true, only one code can be selected at a time | ||
| 670 | bool ShowCodeSelector(const char* label, Code& code, const Frequency& filterFreq, bool singleSelect = false); | ||
| 671 | |||
| 672 | } // namespace NAV | ||
| 673 | |||
| 674 | /// @brief Stream insertion operator overload | ||
| 675 | /// @param[in, out] os Output stream object to stream the time into | ||
| 676 | /// @param[in] obj Object to print | ||
| 677 | /// @return Returns the output stream object in order to chain stream insertions | ||
| 678 | std::ostream& operator<<(std::ostream& os, const NAV::Code& obj); | ||
| 679 | |||
| 680 | namespace std | ||
| 681 | { | ||
| 682 | |||
| 683 | /// @brief Hash function for Frequency (needed for unordered_map) | ||
| 684 | template<> | ||
| 685 | struct hash<NAV::Code> | ||
| 686 | { | ||
| 687 | /// @brief Hash function for signal code | ||
| 688 | /// @param[in] c Signal code | ||
| 689 | /// @return Has value for the signal code | ||
| 690 | 2508480 | std::size_t operator()(const NAV::Code& c) const | |
| 691 | { | ||
| 692 | 2508480 | return static_cast<size_t>(c.getEnumValue()); | |
| 693 | } | ||
| 694 | }; | ||
| 695 | } // namespace std | ||
| 696 | |||
| 697 | #ifndef DOXYGEN_IGNORE | ||
| 698 | |||
| 699 | /// @brief Formatter for Code | ||
| 700 | template<> | ||
| 701 | struct fmt::formatter<NAV::Code> : fmt::formatter<std::string> | ||
| 702 | { | ||
| 703 | /// @brief Defines how to format Code structs | ||
| 704 | /// @param[in] code Struct to format | ||
| 705 | /// @param[in, out] ctx Format context | ||
| 706 | /// @return Output iterator | ||
| 707 | template<typename FormatContext> | ||
| 708 | 675878 | auto format(const NAV::Code& code, FormatContext& ctx) const | |
| 709 | { | ||
| 710 |
2/4✓ Branch 1 taken 675889 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 675881 times.
✗ Branch 6 not taken.
|
675878 | return fmt::formatter<std::string>::format(std::string(code), ctx); |
| 711 | } | ||
| 712 | }; | ||
| 713 | |||
| 714 | #endif | ||
| 715 |