18 class PunctiformProduct :
public Product
27 std::string channel_name;
28 std::vector<double> timestamps;
29 std::vector<geodetic::geodetic_coords_t> positions;
30 std::vector<double> data;
33 NLOHMANN_DEFINE_TYPE_INTRUSIVE(
DataHolder, channel_name, timestamps, positions, data)
36 std::vector<DataHolder> data;
40 void set_tle(nlohmann::json tle) { contents[
"tle"] = tle; }
42 bool has_tle() {
return contents.contains(
"tle"); }
44 nlohmann::json get_tle() {
return contents[
"tle"]; }
47 void *satellite_tracker =
nullptr;
51 geodetic::geodetic_coords_t get_sample_position(
int ch_index,
int sample_index);
53 int getChannelIndexByName(std::string name)
55 for (
int i = 0; i < data.size(); i++)
56 if (data[i].channel_name == name)
58 throw satdump_exception(
"Invalid channel for punctiform product : " + name);
64 if (d.channel_name == name)
66 throw satdump_exception(
"Invalid channel for punctiform product : " + name);
73 virtual void save(std::string directory);
74 virtual void load(std::string file);
76 PunctiformProduct() { type =
"punctiform"; }
77 virtual ~PunctiformProduct();