#include <satposition.h>
Inheritance diagram for TermSatPosition:


Public Member Functions | |
| TermSatPosition (double=0, double=0) | |
| virtual coordinate | coord () |
| void | set (double latitude, double longitude) |
| int | type () |
| double | period () |
| Node * | node () |
Static Public Attributes | |
| double | time_advance_ = 0 |
Protected Member Functions | |
| int | command (int argc, const char *const *argv) |
Protected Attributes | |
| coordinate | initial_ |
| double | period_ |
| int | type_ |
| Node * | node_ |
|
||||||||||||
|
Definition at line 124 of file satposition.cc. References EARTH_PERIOD, EARTH_RADIUS, SatPosition::initial_, SatPosition::period_, POSITION_SAT_TERM, coordinate::r, set(), and SatPosition::type_.
00124 {
00125 initial_.r = EARTH_RADIUS;
00126 period_ = EARTH_PERIOD; // seconds
00127 set(Theta, Phi);
00128 type_ = POSITION_SAT_TERM;
00129 }
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented in PolarSatPosition. Definition at line 103 of file satposition.cc. References SatPosition::node_. Referenced by PolarSatPosition::command().
00103 {
00104 //Tcl& tcl = Tcl::instance();
00105 if (argc == 2) {
00106 }
00107 if (argc == 3) {
00108 if(strcmp(argv[1], "setnode") == 0) {
00109 node_ = (Node*) TclObject::lookup(argv[2]);
00110 if (node_ == 0)
00111 return TCL_ERROR;
00112 return TCL_OK;
00113 }
00114 }
00115 return (TclObject::command(argc, argv));
00116 }
|
|
|
Implements SatPosition. Definition at line 153 of file satposition.cc. References SatPosition::initial_, NOW, SatPosition::period_, coordinate::phi, PI, coordinate::r, coordinate::theta, and SatPosition::time_advance_.
00154 {
00155 coordinate current;
00156
00157 current.r = initial_.r;
00158 current.theta = initial_.theta;
00159 current.phi = fmod((initial_.phi +
00160 (fmod(NOW + time_advance_,period_)/period_) * 2*PI), 2*PI);
00161
00162 #ifdef POINT_TEST
00163 current = initial_; // debug option to stop earth's rotation
00164 #endif
00165 return current;
00166 }
|
|
|
Definition at line 62 of file satposition.h. References SatPosition::node_. Referenced by SatLinkHandoffMgr::handoff(), and TermLinkHandoffMgr::handoff().
00062 { return node_; }
|
|
|
Definition at line 61 of file satposition.h. References SatPosition::period_.
00061 { return period_; }
|
|
||||||||||||
|
Definition at line 138 of file satposition.cc. References DEG_TO_RAD, SatPosition::initial_, coordinate::phi, and coordinate::theta. Referenced by TermSatPosition().
00139 {
00140 if (latitude < -90 || latitude > 90)
00141 fprintf(stderr, "TermSatPosition: latitude out of bounds %f\n",
00142 latitude);
00143 if (longitude < -180 || longitude > 180)
00144 fprintf(stderr, "TermSatPosition: longitude out of bounds %f\n",
00145 longitude);
00146 initial_.theta = DEG_TO_RAD(90 - latitude);
00147 if (longitude < 0)
00148 initial_.phi = DEG_TO_RAD(360 + longitude);
00149 else
00150 initial_.phi = DEG_TO_RAD(longitude);
00151 }
|
|
|
Definition at line 60 of file satposition.h. References SatPosition::type_. Referenced by SatNode::dumpSats(), and TermLinkHandoffMgr::handoff().
00060 { return type_; }
|
|
|
Definition at line 69 of file satposition.h. Referenced by GeoSatPosition::coord(), PolarSatPosition::coord(), coord(), GeoSatPosition::GeoSatPosition(), PolarSatPosition::isascending(), GeoSatPosition::set(), PolarSatPosition::set(), set(), and TermSatPosition(). |
|
|
Definition at line 72 of file satposition.h. Referenced by SatPosition::command(), and SatPosition::node(). |
|
|
Definition at line 70 of file satposition.h. Referenced by GeoSatPosition::coord(), PolarSatPosition::coord(), coord(), GeoSatPosition::GeoSatPosition(), PolarSatPosition::isascending(), SatPosition::period(), PolarSatPosition::set(), and TermSatPosition(). |
|
|
Definition at line 96 of file satposition.cc. Referenced by GeoSatPosition::coord(), PolarSatPosition::coord(), coord(), SatGeometry::get_longitude(), PolarSatPosition::isascending(), and SatPosition::SatPosition(). |
|
|
Definition at line 71 of file satposition.h. Referenced by GeoSatPosition::GeoSatPosition(), PolarSatPosition::PolarSatPosition(), TermSatPosition(), and SatPosition::type(). |
1.3.3