You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SensorReading class is the team's current solution to handling sensor data and relevant faults. It has the following fields and methods:
Private
type: type of the reading as a fault_index_type object
value: boolean value representing the reading value
fault_status: whether the reading is faulty (1 means invalid reading and 0 means valid reading)
Public
SensorReading(fault_index_type t, float x, bool fault): constructor of a SensorReading Object with the three arguments corresponding to the three fields above
get_value(): returns the float value of the SensorReading object
is_valid(): return true if the reading is valid and false othersise
set_valid(): set the fault_status field to 0 to indicate valid reading; will also toggle the corresponding bit in faults::fault_1/fault_2/fault_3
set_invalid(): set the fault_status field to 1 to indicate invalid reading; will also toggle the corresponding bit in faults::fault_1/fault_2/fault_3
The SensorReading objects are initialized in the sfr and modified by the monitors to keep track of different sensor readings on the satellite.