MccMovementPathFile: addToPath(mcc_telemetry_data_c auto const& tdata) add
mount current speed saving
This commit is contained in:
@@ -534,8 +534,8 @@ concept mcc_skypoint_c =
|
|||||||
|
|
||||||
requires requires(typename T::dist_result_t res) {
|
requires requires(typename T::dist_result_t res) {
|
||||||
requires mcc_angle_c<decltype(res.dist)>; // distance on sphere
|
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.dx)>; // difference along co-longitude coordinate
|
||||||
requires mcc_angle_c<decltype(res.dy)>; // defference on co-latitude coordinates
|
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
|
requires mcc_angle_c<decltype(res.x2)>; // co-longitude coordinates of target sky point (in the same
|
||||||
// coordinate system as 'this')
|
// coordinate system as 'this')
|
||||||
requires mcc_angle_c<decltype(res.y2)>; // co-latitude coordinates of target sky point (in the same
|
requires mcc_angle_c<decltype(res.y2)>; // co-latitude coordinates of target sky point (in the same
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <print>
|
#include <print>
|
||||||
#include <typeinfo>
|
|
||||||
|
|
||||||
#include "mcc_coordinate.h"
|
#include "mcc_coordinate.h"
|
||||||
#include "mcc_error.h"
|
#include "mcc_error.h"
|
||||||
@@ -162,10 +161,10 @@ struct MccMovementPathFile {
|
|||||||
// comment corresponded to addToPath(mcc_telemetry_data_c auto const& tdata)
|
// comment corresponded to addToPath(mcc_telemetry_data_c auto const& tdata)
|
||||||
void addDefaultComment()
|
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(
|
addComment(
|
||||||
" <UNIXTIME> <mount X> <mount Y> <target X> <target Y> <dX_{mount-target}> "
|
" <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
|
// general purpose method
|
||||||
@@ -187,7 +186,8 @@ struct MccMovementPathFile {
|
|||||||
// default-implemented method
|
// default-implemented method
|
||||||
void addToPath(mcc_telemetry_data_c auto const& tdata)
|
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);
|
auto dist = tdata.mountPos.distance(tdata.targetPos);
|
||||||
|
|
||||||
using d_t = std::chrono::milliseconds;
|
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());
|
auto tp = std::chrono::duration_cast<d_t>(tdata.mountPos.epoch().UTC().time_since_epoch());
|
||||||
|
|
||||||
const std::string_view d_fmt = "{:14.8f}";
|
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()) + " {}";
|
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(),
|
tag_x = dist.x2.degrees(), tag_y = dist.y2.degrees(), dx = dist.dx.degrees(), dy = dist.dy.degrees(),
|
||||||
dd = dist.dist.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()
|
void clearPath()
|
||||||
|
|||||||
Reference in New Issue
Block a user