2#include <ufo/io/file_handler.hpp>
3#include <ufo/io/pts.hpp>
12CloudProperties cloudPropertiesPTS(std::filesystem::path
const& file)
14 FileHandler fp(file.c_str(),
"rb");
17 throw std::runtime_error(std::format(
18 "[UFO | Cloud Properties PTS] Failed to open file: {}", file.string()));
23 if (
nullptr != std::fgets(line,
sizeof line, fp.get())) {
24 std::sscanf(line,
"%zu", &size);
28 throw std::runtime_error(std::format(
29 "[UFO | Cloud Properties PTS] Unable to read header of file: {}", file.string()));
32 std::array<double, 7> fields;
34 std::sscanf(line,
"%lf %lf %lf %lf %lf %lf %lf", &fields[0], &fields[1], &fields[2],
35 &fields[3], &fields[4], &fields[5], &fields[6]);
38 prop.color = 6 == num_fields || 7 == num_fields;
40 prop.intensity = 4 == num_fields || 7 == num_fields;
All vision-related classes and functions.