FOUND
Loading...
Searching...
No Matches
datafile.hpp
Go to the documentation of this file.
1#ifndef DATAFILE_H
2#define DATAFILE_H
3
4#include <memory>
5#include <cstdint>
6#include <string>
7
8#include "common/spatial/attitude-utils.hpp" // Includes Vec3 and EulerAngles
9#include "common/style.hpp"
10
20namespace found {
21
37 char magic[4] = {'F', 'O', 'U', 'N'};
38
43 uint32_t version = 1U;
44
48 uint32_t num_positions;
49
53 uint32_t crc;
54};
55
61struct DataFile {
66
71
75 std::unique_ptr<LocationRecord[]> positions;
76
82 std::string path;
83
85 DataFile() = default;
86
92 DataFile(DataFile &&other) noexcept = default;
93
99 DataFile& operator=(DataFile &&other) = default;
100};
101
102} // namespace found
103
104#endif // DATAFILE_H
A Quaternion is a mutable object that represents a Quaternion.
Definition attitude-utils.hpp:192
Definition calibrate.cpp:7
Represents the header of a data file used in the serialization process.
Definition datafile.hpp:28
uint32_t version
Version of the file format.
Definition datafile.hpp:43
uint32_t num_positions
Number of position entries (Vec3 elements) in the file.
Definition datafile.hpp:48
uint32_t crc
CRC32 checksum of the header (excluding this field) for validation.
Definition datafile.hpp:53
char magic[4]
Magic identifier used to validate file type.
Definition datafile.hpp:37
Represents a complete serialized data file.
Definition datafile.hpp:61
DataFile & operator=(DataFile &&other)=default
Moves another DataFile.
std::string path
The path of this DataFile.
Definition datafile.hpp:82
DataFile()=default
Constructs this.
DataFile(DataFile &&other) noexcept=default
Moves another DataFile.
std::unique_ptr< LocationRecord[]> positions
Collection of location records in the file.
Definition datafile.hpp:75
Quaternion relative_attitude
Relative orientation (attitude) of the object as Euler angles.
Definition datafile.hpp:70
DataFileHeader header
Metadata header for the file (includes magic, version, and CRC).
Definition datafile.hpp:65