32 std::string orbits_name =
"orbits";
33 std::string index_name =
"linear_orbit_index";
38 err_log() <<
"WARNING: Detected old ECI format (version < 1.0.X): Reading "
39 "\"cluster_functions\" instead of \"orbits\", and "
40 "\"linear_cluster_index\" instead of \"linear_orbit_index\"."
43 orbits_name =
"cluster_functions";
44 index_name =
"linear_cluster_functions";
48 std::stringstream msg;
49 msg <<
"Error parsing ECI: '" << orbits_name <<
"' array not found";
50 parser.
error.insert(msg.str());
54 std::vector<double> value;
55 std::vector<ECIContainer::size_type> index;
58 fs::path orbits_path{orbits_name};
60 for (
auto const &orbit : orbits_json) {
61 if (orbit.find(
"eci") != orbit.end()) {
65 parser.
require(eci_value, orbit_path /
"eci");
66 parser.
require(linear_orbit_index, orbit_path / index_name);
67 value.push_back(eci_value);
68 index.push_back(linear_orbit_index);
72 parser.
value = notstd::make_unique<ECIContainer>(value.begin(), value.end(),
Clexulator::size_type size_type
bool contains(const std::string &name) const
Return true if JSON object contains 'name'.
iterator end()
Returns iterator to end of JSON object or JSON array.
iterator find(const std::string &name)
Return iterator to JSON object value with 'name'.
std::string to_string(ENUM val)
Return string representation of enum class.
INDEX_TYPE Index
For long integer indexing:
void parse(InputParser< ConfigEnumOptions > &parser, std::string method_name, PrimClex const &primclex, DataFormatterDictionary< Configuration > const &dict)
std::set< std::string > error