...
This commit is contained in:
57
cxx/mcc_mount_pz.h
Normal file
57
cxx/mcc_mount_pz.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#pragma once
|
||||
|
||||
/* MOUNT CONTROL COMPONENTS LIBRARY */
|
||||
|
||||
/* PROHIBITED ZONE IMPLEMENTATION */
|
||||
|
||||
#include <chrono>
|
||||
#include <string_view>
|
||||
|
||||
#include "mcc_coord.h"
|
||||
#include "mcc_traits.h"
|
||||
|
||||
namespace mcc
|
||||
{
|
||||
|
||||
class MccProhibitedZone
|
||||
{
|
||||
public:
|
||||
// floating-point time duration (seconds)
|
||||
typedef std::chrono::duration<double> pz_duration_t;
|
||||
|
||||
struct pz_request_t {
|
||||
bool in_zone{false}; // true if given coordinates are within the zone
|
||||
pz_duration_t time_to; // a time duration to reach the zone
|
||||
pz_duration_t time_from; // a time duration to exit the zone
|
||||
};
|
||||
|
||||
struct pz_context_t {
|
||||
};
|
||||
|
||||
MccProhibitedZone(std::string_view name) : _name(name) {}
|
||||
|
||||
std::string_view name() const
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
bool inZone(const MccAngle& x,
|
||||
const MccAngle& y,
|
||||
const pz_context_t& context,
|
||||
traits::mcc_systime_c auto const& utc = std::chrono::system_clock::now())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
pz_request_t request(const MccAngle& x,
|
||||
const MccAngle& y,
|
||||
const pz_context_t& context,
|
||||
traits::mcc_systime_c auto const& utc = std::chrono::system_clock::now())
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
std::string_view _name;
|
||||
};
|
||||
|
||||
} // namespace mcc
|
||||
Reference in New Issue
Block a user