...
This commit is contained in:
@@ -590,6 +590,8 @@ protected:
|
||||
} else {
|
||||
return std::make_error_code(std::errc::invalid_argument);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
template <traits::mcc_input_char_range IR>
|
||||
@@ -602,6 +604,8 @@ protected:
|
||||
} else {
|
||||
return std::make_error_code(std::errc::invalid_argument);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -671,8 +675,8 @@ protected:
|
||||
template <mcc_celestial_point_c T, traits::mcc_output_char_range OR>
|
||||
void serializePairKindTimePoint(const T& value, OR& bytes)
|
||||
{
|
||||
std::format_to(std::back_inserter(bytes), "{0:}{1:}{2:}{3:%F}T{3:%T}", _delimiter,
|
||||
MccCoordPairKindToStr(value.pair_kind), _delimiter, value.time_point);
|
||||
std::format_to(std::back_inserter(bytes), "{0:}{1:}{2:%F}T{2:%T}", MccCoordPairKindToStr(value.pair_kind),
|
||||
_delimiter, value.time_point);
|
||||
}
|
||||
|
||||
template <traits::mcc_output_char_range OR, std::convertible_to<double>... Ts>
|
||||
@@ -957,6 +961,8 @@ public:
|
||||
template <mcc_pointing_target_coord_c T, traits::mcc_output_char_range OR>
|
||||
void operator()(const T& value, OR& bytes)
|
||||
{
|
||||
static MccEqtHrzCoordsSerializer eqhrz_ser;
|
||||
|
||||
// output format: RA_ICRS, DEC_ICRS, RA_APP, DEC_APP, HA, AZ, ZD, ALT, X, Y, pair-kind, time-point
|
||||
// in the case of sexagesimal output X,Y coordinates will be interpretated
|
||||
// according to value.pair_kind field
|
||||
@@ -972,7 +978,11 @@ public:
|
||||
|
||||
std::format_to(std::back_inserter(bytes), "{}", _delimiter);
|
||||
|
||||
MccEqtHrzCoordsSerializer{}(value, bytes);
|
||||
eqhrz_ser.setFormat(_currentFormat);
|
||||
eqhrz_ser.setPrecision(_currentPrec);
|
||||
eqhrz_ser(value, bytes);
|
||||
|
||||
// MccEqtHrzCoordsSerializer{}(value, bytes);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1020,15 +1030,26 @@ public:
|
||||
template <mcc_telemetry_data_c T, traits::mcc_output_char_range OR>
|
||||
void operator()(const T& value, OR& bytes)
|
||||
{
|
||||
static MccEqtHrzCoordsSerializer eqhrz_ser;
|
||||
static MccPointingTargetSerializer pt_ser;
|
||||
|
||||
// output format: <mount data>, speedX, speedY, pcmX, pcmY, refCorr, <target data>
|
||||
|
||||
MccEqtHrzCoordsSerializer{}(value, bytes);
|
||||
eqhrz_ser.setFormat(_currentFormat);
|
||||
eqhrz_ser.setPrecision(_currentPrec);
|
||||
eqhrz_ser(value, bytes);
|
||||
|
||||
// MccEqtHrzCoordsSerializer{}(value, bytes);
|
||||
std::format_to(std::back_inserter(bytes), "{}", _delimiter);
|
||||
|
||||
toDegrees(bytes, value.speedX, value.speedY, value.pcmX, value.pcmY, value.refCorr);
|
||||
std::format_to(std::back_inserter(bytes), "{}", _delimiter);
|
||||
|
||||
MccPointingTargetSerializer{}(value.target, bytes);
|
||||
pt_ser.setFormat(_currentFormat);
|
||||
pt_ser.setPrecision(_currentPrec);
|
||||
pt_ser(value.target, bytes);
|
||||
|
||||
// MccPointingTargetSerializer{}(value.target, bytes);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user