2 #define STATE_H_LOADED 1
4 #include "quaternion.h"
44 virtual ms_t
step(
double current_phi,
double current_theta, ms_t t) = 0;
61 virtual std::ostream& tostream(std::ostream& strm)
const = 0;
78 ms_t full_speed_time_;
79 bool route_planned_p_;
82 double calculate_angdot(
double remaining_angle, ms_t current_time);
86 ms_t
step(
double current_phi,
double current_theta, ms_t t);
92 std::ostream& tostream(std::ostream& strm)
const;
107 double maximum_angle_;
117 ms_t
step(
double current_phi,
double current_theta, ms_t t);
123 std::ostream& tostream(std::ostream& strm)
const;
147 const ms_t current_time,
153 void alt_click(ms_t t,
double current_speed,
double angle);
154 void az_click(ms_t t,
double current_speed,
double angle);
178 std::ostream& operator<<(std::ostream& strm,
const State& s);
179 std::ostream& operator<<(std::ostream& strm,
const Schedule& s);
double suggested_thetadot_frac(void)
Return the suggested rate of change in altitude, in units of fractional speed.
Definition: state.cpp:630
double suggested_phidot_frac(void)
Return the suggested rate of change in longitude, in units of fractional speed.
Definition: state.cpp:612
The State class holds the state of the system while it is slewing or tracking.
Definition: state.h:131
double phidot_
Suggested rate of change of phi (azimuthal coordinate, rad/s)
Definition: state.h:27
The Quaternion class encapsulates quaternions (quelle surprise!), and provides a small set of operati...
Definition: quaternion.h:29
ms_t step(ms_t t)
Retrospectively update the state by incrementally rotating the pointing.
Definition: state.cpp:575
virtual ms_t step(double current_phi, double current_theta, ms_t t)=0
Update the schedule with the current position of the system.
Provides the schedule for tracking a point across the celestial sphere, typically at a speed of one s...
Definition: state.h:100
The Position class allows us to represent positions on the celestial sphere (or on Earth...
Definition: position.h:15
float limit_tracking(Quaternion &actual, const TelescopeController *)
Establish the bounds of the permitted movement of the telescope.
Definition: state.cpp:368
SlewSchedule(const Position &target)
Construct an instance of this schedule.
Definition: state.cpp:36
void az_click(ms_t t, double current_speed, double angle)
Return the current pointing of the state, as a vector in AzAlt coordinates.
Definition: state.cpp:542
Provides the schedule for a slew to a particular point on the celestial sphere.
Definition: state.h:72
A class for controlling the telescope.
Definition: qp.h:11
double phidot(void) const
Obtain the suggested azimuthal angular speed.
Definition: state.h:51
double thetadot_
Suggested rate of change of theta (altitude coordinate, rad/s).
Definition: state.h:30
double speed(void)
Returns the rotation speed of the schedule, in rad/s.
Definition: state.cpp:360
double thetadot(void) const
Obtain the suggested altitudinal angular speed.
Definition: state.h:58
void alt_click(ms_t t, double current_speed, double angle)
Report a click in altitude.
Definition: state.cpp:555
bool schedule_ok() const
Is this a feasible schedule? Return false if it would end up in the empty sector. ...
Definition: state.h:89
ms_t step(double current_phi, double current_theta, ms_t t)
Update the schedule with the current position of the system.
Definition: state.cpp:273
The Schedule class represents a planned rotation of the telescope.
Definition: state.h:24
State()
No-arg constructor.
Definition: state.cpp:472
TrackingSchedule(const Quaternion &axis, double hdot, Position observatory)
Initialise a schedule which tracks a point in a rotation about a given axis.
Definition: state.cpp:250
void set_schedule(Schedule *)
Sets the schedule which the state is to follow.
Definition: state.cpp:482
ms_t step(double current_phi, double current_theta, ms_t t)
Take a step on the slewing path.
Definition: state.cpp:161