MccMovementPathFile: addToPath(mcc_telemetry_data_c auto const& tdata) add

mount current speed saving
This commit is contained in:
Timur A. Fatkhullin
2026-03-11 22:49:24 +03:00
parent be69df5068
commit de097d6db2
2 changed files with 10 additions and 9 deletions

View File

@@ -534,8 +534,8 @@ concept mcc_skypoint_c =
requires requires(typename T::dist_result_t res) {
requires mcc_angle_c<decltype(res.dist)>; // distance on sphere
requires mcc_angle_c<decltype(res.dx)>; // defference on co-longitude coordinates
requires mcc_angle_c<decltype(res.dy)>; // defference on co-latitude coordinates
requires mcc_angle_c<decltype(res.dx)>; // difference along co-longitude coordinate
requires mcc_angle_c<decltype(res.dy)>; // difference along co-latitude coordinate
requires mcc_angle_c<decltype(res.x2)>; // co-longitude coordinates of target sky point (in the same
// coordinate system as 'this')
requires mcc_angle_c<decltype(res.y2)>; // co-latitude coordinates of target sky point (in the same

View File

@@ -19,7 +19,6 @@
#include <print>
#include <typeinfo>
#include "mcc_coordinate.h"
#include "mcc_error.h"
@@ -162,10 +161,10 @@ struct MccMovementPathFile {
// comment corresponded to addToPath(mcc_telemetry_data_c auto const& tdata)
void addDefaultComment()
{
addComment("Format (time is in milliseconds, coordinates are in degrees):");
addComment("Format (time is in milliseconds, coordinates are in degrees, speeds are in degrees/s):");
addComment(
" <UNIXTIME> <mount X> <mount Y> <target X> <target Y> <dX_{mount-target}> "
"<dY_{mount-target}> <mount-to-target-distance> <moving state>");
"<dY_{mount-target}> <mount-to-target-distance> <mount X-speed> <mount Y-speed> <moving state>");
}
// general purpose method
@@ -187,7 +186,8 @@ struct MccMovementPathFile {
// default-implemented method
void addToPath(mcc_telemetry_data_c auto const& tdata)
{
// UNIX-time millisecs, mount X, mount Y, target X, target Y, dX(mount-target), dY(mount-target), dist, state
// UNIX-time millisecs, mount X, mount Y, target X, target Y, dX(mount-target), dY(mount-target), dist, speedX,
// speedY, state
auto dist = tdata.mountPos.distance(tdata.targetPos);
using d_t = std::chrono::milliseconds;
@@ -195,7 +195,7 @@ struct MccMovementPathFile {
auto tp = std::chrono::duration_cast<d_t>(tdata.mountPos.epoch().UTC().time_since_epoch());
const std::string_view d_fmt = "{:14.8f}";
const auto v = std::views::repeat(d_fmt, 7) | std::views::join_with(' ');
const auto v = std::views::repeat(d_fmt, 9) | std::views::join_with(' ');
std::string fmt = "{} " + std::string(v.begin(), v.end()) + " {}";
@@ -206,7 +206,8 @@ struct MccMovementPathFile {
tag_x = dist.x2.degrees(), tag_y = dist.y2.degrees(), dx = dist.dx.degrees(), dy = dist.dy.degrees(),
dd = dist.dist.degrees();
addToPath(std::string_view(fmt.begin(), fmt.end()), tp_val, mnt_x, mnt_y, tag_x, tag_y, dx, dy, dd, state);
addToPath(std::string_view(fmt.begin(), fmt.end()), tp_val, mnt_x, mnt_y, tag_x, tag_y, dx, dy, dd,
tdata.hwState.speedXY.x().degrees(), tdata.hwState.speedXY.y().degrees(), state);
}
void clearPath()