77 c->
i = 51.6407 * (M_PI/180.0);
78 c->
O = 126.7653 * (M_PI/180.0);
79 c->
w = 163.1572 * (M_PI/180.0);
83 c->
n = pow( (c->
mu / pow(c->
a,3.0) ), (0.5) );
85 c->
T = ( 2.0 * M_PI ) / c->
n;
87 cout<<
"\tPeriod in seconds = "<<setprecision(numeric_limits<double>::digits10)<<c->
T<<endl;
88 cout<<
"\tRevolutions / day = "<<setprecision(numeric_limits<double>::digits10)<<86400.0/c->
T<<endl;
90 string workernames[3] = {
"albeert",
"beeber",
"corbee"};
98 string request =
"are_you_out_there";
104 sss<<setprecision(numeric_limits<double>::digits10)<<t;
105 string time = sss.str();
110 int workernum = rand() % (
sizeof(workernames)/
sizeof(*workernames));
111 string worker =
"worker_0" +
to_string(workernum+1);
113 if(response.size()) {
114 string s =
"\t[" + worker +
":" + workernames[workernum] +
"]";
115 cout<<left<<setw(40)<< s <<setw(16)<<
"\033[1;32mFOUND\033[0m"<<endl;
120 cout<<response<<endl;
124 string s =
"\t[" + worker +
":" + workernames[workernum] +
"]";
125 cout<<left<<setw(40) << s <<
"\033[1;31mNOT FOUND\033[0m"<<endl;
int32_t send_request(beatstruc cbeat, string request, string &output, float waitsec=5.)
Send a request over AGENT.
Definition: agentclass.cpp:424
static Agent * agent
Definition: queen.cpp:43
string to_string(char *value)
Definition: stringlib.cpp:220
string agent_name
Definition: queen.cpp:45
double O
Definition: jsondef.h:4336
string cosmos_error_string(int32_t cosmos_errno)
Definition: cosmos-errno.cpp:45
uint16_t running()
Check if we're supposed to be running.
Definition: agentclass.cpp:391
int32_t add_request(string token, external_request_function function, string synopsis="", string description="")
Add internal request to Agent request list with description and synopsis.
Definition: agentclass.cpp:312
Definition: agentclass.h:139
string tel_message
Definition: queen.cpp:49
int32_t are_you_out_there(string &request, string &response, Agent *cdata)
Definition: queen.cpp:138
bool once
Definition: queen.cpp:48
double mu
Definition: jsondef.h:4350
double currentmjd(double offset)
Current UTC in Modified Julian Days.
Definition: timelib.cpp:65
string node_agent_name
Definition: queen.cpp:46
int32_t last_error()
Definition: agentclass.cpp:414
string node_name
Definition: queen.cpp:44
double T
Definition: jsondef.h:4356
double w
Definition: jsondef.h:4338
beatstruc find_agent(string node, string agent, double waitsec=0.)
Find agent.
Definition: agentclass.cpp:559
cosmosstruc * cinfo
Definition: agentclass.h:346
double n
Definition: jsondef.h:4353
int32_t req_pass_message(string &request, string &response, Agent *)
Definition: queen.cpp:145
Definition: jsondef.h:4199
double a
Definition: jsondef.h:4320
double tau
Definition: jsondef.h:4340
double i
Definition: jsondef.h:4334
double e
Definition: jsondef.h:4322