mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-12 13:23:09 +00:00
Linting fixes
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "ion_gsms_signal_source.h"
|
||||
#include <gnuradio/blocks/copy.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
|
||||
#if USE_GLOG_AND_GFLAGS
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "gnss_sdr_timestamp.h"
|
||||
#include "ion_gsms.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Signal_Source
|
||||
* \{ */
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
#include "gnuradio/block.h"
|
||||
#include "ion_gsms.h"
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#if USE_GLOG_AND_GFLAGS
|
||||
#include <glog/logging.h>
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
#include <gnuradio/sync_block.h>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class IONGSMSFileSource : public gr::sync_block
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "ion_gsms_chunk_data.h"
|
||||
#include <bitset>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if USE_GLOG_AND_GFLAGS
|
||||
#include <glog/logging.h>
|
||||
@@ -46,7 +48,7 @@ IONGSMSChunkData::IONGSMSChunkData(const GnssMetadata::Chunk& chunk, const std::
|
||||
return stream.Id() == it;
|
||||
}))
|
||||
{
|
||||
streams_.emplace_back(lump, stream, GnssMetadata::encoding_from_string(stream.Encoding()),output_streams + output_stream_offset);
|
||||
streams_.emplace_back(lump, stream, GnssMetadata::encoding_from_string(stream.Encoding()), output_streams + output_stream_offset);
|
||||
++output_streams;
|
||||
std::size_t sample_bitsize = stream.Packedbits() / stream.RateFactor();
|
||||
std::size_t sample_rate = stream.RateFactor();
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "ion_gsms_stream_encodings.h"
|
||||
#include "ion_gsms_chunk_unpacking_ctx.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if USE_GLOG_AND_GFLAGS
|
||||
#include <glog/logging.h>
|
||||
@@ -141,4 +143,4 @@ private:
|
||||
void* buffer_;
|
||||
};
|
||||
|
||||
#endif //ION_GSM_CHUNK_DATA_H
|
||||
#endif // ION_GSM_CHUNK_DATA_H
|
||||
|
||||
@@ -176,4 +176,4 @@ struct IONGSMSChunkUnpackingCtx
|
||||
}
|
||||
};
|
||||
|
||||
#endif //ION_GSM_CHUNK_UNPACKING_CTX_H
|
||||
#endif // ION_GSM_CHUNK_UNPACKING_CTX_H
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "GnssMetadata.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if USE_GLOG_AND_GFLAGS
|
||||
#include <glog/logging.h>
|
||||
@@ -45,4 +47,4 @@ private: // State
|
||||
GnssMetadata::Metadata metadata_;
|
||||
};
|
||||
|
||||
#endif //ION_GSMS_METADATA_HANDLER_H
|
||||
#endif // ION_GSMS_METADATA_HANDLER_H
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#ifndef ION_GSM_STREAM_ENCODINGS_H
|
||||
#define ION_GSM_STREAM_ENCODINGS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#if USE_GLOG_AND_GFLAGS
|
||||
#include <glog/logging.h>
|
||||
#else
|
||||
@@ -27,26 +29,29 @@
|
||||
|
||||
namespace GnssMetadata
|
||||
{
|
||||
using StreamEncoding = unsigned char;
|
||||
|
||||
namespace StreamEncodings
|
||||
{
|
||||
constexpr unsigned char SIGN = 0;
|
||||
constexpr unsigned char OB = 1;
|
||||
constexpr unsigned char SM = 2;
|
||||
constexpr unsigned char MS = 3;
|
||||
constexpr unsigned char TC = 4;
|
||||
constexpr unsigned char OG = 5;
|
||||
constexpr unsigned char OBA = 6;
|
||||
constexpr unsigned char SMA = 7;
|
||||
constexpr unsigned char MSA = 8;
|
||||
constexpr unsigned char TCA = 9;
|
||||
constexpr unsigned char OGA = 10;
|
||||
constexpr unsigned char FP = 11;
|
||||
}
|
||||
using StreamEncoding = unsigned char;
|
||||
|
||||
inline StreamEncoding encoding_from_string(const std::string& str)
|
||||
{
|
||||
namespace StreamEncodings
|
||||
{
|
||||
|
||||
constexpr unsigned char SIGN = 0;
|
||||
constexpr unsigned char OB = 1;
|
||||
constexpr unsigned char SM = 2;
|
||||
constexpr unsigned char MS = 3;
|
||||
constexpr unsigned char TC = 4;
|
||||
constexpr unsigned char OG = 5;
|
||||
constexpr unsigned char OBA = 6;
|
||||
constexpr unsigned char SMA = 7;
|
||||
constexpr unsigned char MSA = 8;
|
||||
constexpr unsigned char TCA = 9;
|
||||
constexpr unsigned char OGA = 10;
|
||||
constexpr unsigned char FP = 11;
|
||||
|
||||
} // namespace StreamEncodings
|
||||
|
||||
inline StreamEncoding encoding_from_string(const std::string& str)
|
||||
{
|
||||
if (str == "SIGN")
|
||||
{
|
||||
return StreamEncodings::SIGN;
|
||||
@@ -96,11 +101,11 @@ namespace GnssMetadata
|
||||
return StreamEncodings::FP;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T two_bit_look_up[11][4]
|
||||
{
|
||||
template <typename T>
|
||||
inline T two_bit_look_up[11][4]
|
||||
{
|
||||
[0] = {},
|
||||
[1 /*OB*/] = {-2, -1, 0, 1},
|
||||
[2 /*SM*/] = {0, 1, 0, -1},
|
||||
@@ -112,11 +117,11 @@ namespace GnssMetadata
|
||||
[8 /*MSA*/] = {1, -1, 3, -3},
|
||||
[9 /*TCA*/] = {1, 3, -3, -1},
|
||||
[10 /*OGA*/] = {-3, -1, 3, 1},
|
||||
};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline T three_bit_look_up[11][8]
|
||||
{
|
||||
template <typename T>
|
||||
inline T three_bit_look_up[11][8]
|
||||
{
|
||||
[0] = {},
|
||||
[1 /*OB*/] = {-4, -3, -2, -1, 0, 1, 2, 3},
|
||||
[2 /*SM*/] = {0, 1, 2, 3, 0, -1, -2, -3},
|
||||
@@ -128,11 +133,11 @@ namespace GnssMetadata
|
||||
[8 /*MSA*/] = {1, -1, 3, -3, 5, -5, 7, -7},
|
||||
[9 /*TCA*/] = {1, 3, 5, 7, -7, -5, -3, -1},
|
||||
[10 /*OGA*/] = {-7, -5, -1, -3, 7, 5, 1, 3},
|
||||
};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline T four_bit_look_up[11][16]
|
||||
{
|
||||
template <typename T>
|
||||
inline T four_bit_look_up[11][16]
|
||||
{
|
||||
[0] = {},
|
||||
[1 /*OB*/] = {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7},
|
||||
[2 /*SM*/] = {0, 1, 2, 3, 4, 5, 6, 7, 0, -1, -2, -3, -4, -5, -6, -7},
|
||||
@@ -144,11 +149,11 @@ namespace GnssMetadata
|
||||
[8 /*MSA*/] = {1, -1, 3, -3, 5, -5, 7, -7, 9, -9, 11, -11, 13, -13, 15, -15},
|
||||
[9 /*TCA*/] = {1, 3, 5, 7, 9, 11, 13, 15, -15, -13, -11, -9, -7, -5, -3, -1},
|
||||
[10 /*OGA*/] = {-15, -13, -9, -11, -1, -3, -7, -5, 15, 13, 9, 11, 1, 3, 7, 5},
|
||||
};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline T five_bit_look_up[11][32]
|
||||
{
|
||||
template <typename T>
|
||||
inline T five_bit_look_up[11][32]
|
||||
{
|
||||
[0] = {},
|
||||
[1 /*OB*/] = {-16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
|
||||
[2 /*SM*/] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15},
|
||||
@@ -160,7 +165,8 @@ namespace GnssMetadata
|
||||
[8 /*MSA*/] = {1, -1, 3, -3, 5, -5, 7, -7, 9, -9, 11, -11, 13, -13, 15, -15, 17, -17, 19, -19, 21, -21, 23, -23, 25, -25, 27, -27, 29, -29, 31, -31},
|
||||
[9 /*TCA*/] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, -31, -29, -27, -25, -23, -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1},
|
||||
[10 /*OGA*/] = {-31, -29, -25, -27, -17, -19, -23, -21, -1, -3, -7, -5, -15, -13, -9, -11, 31, 29, 25, 27, 17, 19, 23, 21, 1, 3, 7, 5, 15, 13, 9, 11},
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
#endif //ION_GSM_STREAM_ENCODINGS_H
|
||||
} // namespace GnssMetadata
|
||||
|
||||
#endif // ION_GSM_STREAM_ENCODINGS_H
|
||||
|
||||
Reference in New Issue
Block a user