MCPcopy Create free account
hub / github.com/SatDump/SatDump / setObject

Method setObject

src-core/common/tracking/obj_tracker/object_tracker.cpp:67–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 void ObjectTracker::setObject(TrackingMode mode, int objid)
68 {
69 general_mutex.lock();
70 tracking_mode = TRACKING_NONE;
71
72 if (mode == TRACKING_HORIZONS)
73 {
74 if (horizonsoptions.size() == 1)
75 horizonsoptions = pullHorizonsList();
76 for (int i = 0; i < (int)horizonsoptions.size(); i++)
77 {
78 if (horizonsoptions[i].first == objid)
79 {
80 tracking_mode = TRACKING_HORIZONS;
81 current_horizons_id = i;
82 break;
83 }
84 }
85 }
86 else if (mode == TRACKING_SATELLITE)
87 {
88 for (int i = 0; i < (int)satoptions.size(); i++)
89 {
90 if (general_tle_registry[i].norad == objid)
91 {
92 tracking_mode = TRACKING_SATELLITE;
93 current_satellite_id = i;
94 break;
95 }
96 }
97 }
98
99 backend_needs_update = true;
100 general_mutex.unlock();
101 }
102
103 void ObjectTracker::setRotator(std::shared_ptr<rotator::RotatorHandler> rot)
104 {

Callers 2

TrackingWidgetMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected