#ifndef GERMANAIRLINESVA_FILE_RECORDINGENTRY_H #define GERMANAIRLINESVA_FILE_RECORDINGENTRY_H #include #include #include #include "geodata.h" namespace germanairlinesva { namespace file { namespace recording { /* * Path Segment (24) * UINT32 | UINT16 | UINT16 | POINT * -------+----------+-------------+------------ * TIME | ALTITUDE | GROUNDSPEED | COORDINATES */ class RecordingEntry { private: std::uint32_t time = 0; std::uint16_t altitude = 0; std::uint16_t groundSpeed = 0; struct germanairlinesva_geodata::point coordinates; std::vector file; public: RecordingEntry() = default; RecordingEntry(std::uint32_t time, std::uint16_t altitude, std::uint16_t groundSpeed, struct germanairlinesva_geodata::point coordinates); inline const std::uint8_t *getBinaryData() const { return file.data(); } inline std::size_t getBinaryLength() const { return file.size(); } friend inline bool operator==(const RecordingEntry &lhs, const RecordingEntry &rhs) { return lhs.altitude == rhs.altitude && lhs.groundSpeed == rhs.groundSpeed && lhs.coordinates.latitude == rhs.coordinates.latitude && lhs.coordinates.longitude == rhs.coordinates.longitude; } friend inline bool operator!=(const RecordingEntry &lhs, const RecordingEntry &rhs) { return !(lhs == rhs); } }; } // namespace recording } // namespace file } // namespace germanairlinesva #endif