From de097d6db215ab6db23890095e09610e671d460b Mon Sep 17 00:00:00 2001 From: "Timur A. Fatkhullin" Date: Wed, 11 Mar 2026 22:49:24 +0300 Subject: [PATCH] MccMovementPathFile: addToPath(mcc_telemetry_data_c auto const& tdata) add mount current speed saving --- include/mcc/mcc_concepts.h | 6 +++--- include/mcc/mcc_generic_movecontrols.h | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/mcc/mcc_concepts.h b/include/mcc/mcc_concepts.h index fddf196..a256416 100644 --- a/include/mcc/mcc_concepts.h +++ b/include/mcc/mcc_concepts.h @@ -534,11 +534,11 @@ concept mcc_skypoint_c = requires requires(typename T::dist_result_t res) { requires mcc_angle_c; // distance on sphere - requires mcc_angle_c; // defference on co-longitude coordinates - requires mcc_angle_c; // defference on co-latitude coordinates + requires mcc_angle_c; // difference along co-longitude coordinate + requires mcc_angle_c; // difference along co-latitude coordinate requires mcc_angle_c; // co-longitude coordinates of target sky point (in the same // coordinate system as 'this') - requires mcc_angle_c; // co-latitude coordinates of target sky point (in the same + requires mcc_angle_c; // co-latitude coordinates of target sky point (in the same // coordinate system as 'this') }; diff --git a/include/mcc/mcc_generic_movecontrols.h b/include/mcc/mcc_generic_movecontrols.h index d5c2feb..79ec822 100644 --- a/include/mcc/mcc_generic_movecontrols.h +++ b/include/mcc/mcc_generic_movecontrols.h @@ -19,7 +19,6 @@ #include -#include #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( " " - " "); + " "); } // 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(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()