From b1dd665a113c57a50647dad3bba7300d4afe5483 Mon Sep 17 00:00:00 2001 From: ryanpdx Date: Sun, 12 Nov 2023 12:34:22 -0800 Subject: [PATCH] add unit and scaling fields to objs --- oresat_configs/_yaml_to_od.py | 28 +++++-- oresat_configs/base/battery.yaml | 116 +++++++++++++++++--------- oresat_configs/base/c3.yaml | 53 ++++++++---- oresat_configs/base/cfc.yaml | 20 +++-- oresat_configs/base/dxwifi.yaml | 3 +- oresat_configs/base/fw_common.yaml | 3 +- oresat_configs/base/gps.yaml | 54 ++++++++---- oresat_configs/base/imu.yaml | 86 ++++++++++++------- oresat_configs/base/solar.yaml | 51 +++++++---- oresat_configs/base/star_tracker.yaml | 18 ++-- oresat_configs/base/sw_common.yaml | 20 +++-- 11 files changed, 309 insertions(+), 143 deletions(-) diff --git a/oresat_configs/_yaml_to_od.py b/oresat_configs/_yaml_to_od.py index de43bdd..3aa692a 100644 --- a/oresat_configs/_yaml_to_od.py +++ b/oresat_configs/_yaml_to_od.py @@ -99,6 +99,8 @@ def _add_objects(od: canopen.ObjectDictionary, objects: list): var.add_bit_definition(name, bits) for value, descr in obj.get("values", {}).items(): var.add_value_description(value, descr) + var.unit = obj.get("unit", "") + var.factor = obj.get("scaling", 1) var.data_type = OD_DATA_TYPES[obj["data_type"]] _set_var_default(obj, var) if var.data_type not in dynamic_len_data_types: @@ -119,10 +121,12 @@ def _add_objects(od: canopen.ObjectDictionary, objects: list): var.access_type = sub_obj["access_type"] var.description = sub_obj["description"] var.data_type = OD_DATA_TYPES[sub_obj["data_type"]] - for name, bits in obj.get("bitfield", {}).items(): + for name, bits in sub_obj.get("bitfield", {}).items(): var.add_bit_definition(name, bits) - for value, descr in obj.get("values", {}).items(): + for value, descr in sub_obj.get("values", {}).items(): var.add_value_description(value, descr) + var.unit = sub_obj.get("unit", "") + var.factor = sub_obj.get("scaling", 1) _set_var_default(sub_obj, var) if var.data_type not in dynamic_len_data_types: var.pdo_mappable = True @@ -145,10 +149,12 @@ def _add_objects(od: canopen.ObjectDictionary, objects: list): var = canopen.objectdictionary.Variable(sub_name, index, subindex) var.access_type = obj["access_type"] var.data_type = OD_DATA_TYPES[obj["data_type"]] - for name, bits in obj.get("bitfield", {}).items(): + for name, bits in sub_obj.get("bitfield", {}).items(): var.add_bit_definition(name, bits) - for value, descr in obj.get("values", {}).items(): + for value, descr in sub_obj.get("values", {}).items(): var.add_value_description(value, descr) + var.unit = sub_obj.get("unit", "") + var.factor = sub_obj.get("scaling", 1) _set_var_default(sub_obj, var) if var.data_type not in dynamic_len_data_types: var.pdo_mappable = True @@ -348,6 +354,10 @@ def _add_rpdo_data( var.access_type = "rw" var.data_type = tpdo_mapped_obj.data_type var.default = tpdo_mapped_obj.default + var.unit = tpdo_mapped_obj.unit + var.factor = tpdo_mapped_obj.factor + var.bit_definitions = deepcopy(tpdo_mapped_obj.bit_definitions) + var.value_descriptions = deepcopy(tpdo_mapped_obj.value_descriptions) var.pdo_mappable = True rpdo_mapped_rec.add_member(var) @@ -423,7 +433,11 @@ def read_yaml_od_config(file_path: str) -> dict: if "values" not in obj: obj["values"] = {} if "bitfield" not in obj: - obj["bitfie"] = {} + obj["bitfield"] = {} + if "unit" not in obj: + obj["unit"] = "" + if "scaling" not in obj: + obj["scaling"] = 1 elif "subindexes" not in obj: config["subindexes"] = [] else: @@ -440,6 +454,10 @@ def read_yaml_od_config(file_path: str) -> dict: sub_obj["values"] = {} if "bitfield" not in sub_obj: sub_obj["bitfield"] = {} + if "unit" not in sub_obj: + sub_obj["unit"] = "" + if "scaling" not in sub_obj: + sub_obj["scaling"] = 1 if "tpdos" not in config: config["tpdos"] = [] diff --git a/oresat_configs/base/battery.yaml b/oresat_configs/base/battery.yaml index 5b7e534..0c5838d 100644 --- a/oresat_configs/base/battery.yaml +++ b/oresat_configs/base/battery.yaml @@ -7,92 +7,107 @@ objects: - subindex: 0x1 name: vbatt data_type: uint16 - description: pack voltage in millivolts + description: pack voltage access_type: ro + unit: mV - subindex: 0x2 name: vcell_max data_type: uint16 - description: max voltage for a cell in millivolts + description: max voltage for a cell access_type: ro + unit: mV - subindex: 0x3 name: vcell_min data_type: uint16 - description: min voltage for a cell in millivolts + description: min voltage for a cell access_type: ro + unit: mV - subindex: 0x4 name: vcell data_type: uint16 - description: lowest cell voltage in millivolts + description: lowest cell voltage access_type: ro + unit: mV - subindex: 0x5 name: vcell_1 data_type: uint16 - description: cell 1 voltage in millivolts + description: cell 1 voltage access_type: ro + unit: mV - subindex: 0x6 name: vcell_2 data_type: uint16 - description: cell 2 voltage in millivolts + description: cell 2 voltage access_type: ro + unit: mV - subindex: 0x7 name: vcell_avg data_type: uint16 - description: average voltage of both cells in millivolts + description: average voltage of both cells access_type: ro + unit: mV - subindex: 0x8 name: current data_type: int16 - description: pack current in milliamps + description: pack current access_type: ro + unit: mA - subindex: 0x9 name: current_avg data_type: int16 - description: pack average current in milliamps + description: pack average current access_type: ro + unit: mA - subindex: 0xa name: current_max data_type: int16 - description: pack max current in milliamps + description: pack max current access_type: ro + unit: mA - subindex: 0xb name: current_min data_type: int16 - description: pack min current in milliamps + description: pack min current access_type: ro + unit: mA - subindex: 0xc name: full_capacity data_type: uint16 - description: capacity of battery pack in milliamp-hours + description: capacity of battery pack access_type: ro + unit: mAh - subindex: 0xd name: reported_capacity data_type: uint16 - description: reported capacity of battery pack in milliamp-hours + description: reported capacity of battery pack access_type: ro + unit: mAh - subindex: 0xe name: time_to_empty data_type: uint16 - description: estimate of time until battery pack is empty in seconds + description: estimate of time until battery pack is empty access_type: ro + unit: s - subindex: 0xf name: time_to_full data_type: uint16 - description: estimate of time until battery pack is full in seconds + description: estimate of time until battery pack is full access_type: ro + unit: s - subindex: 0x10 name: cycles @@ -107,30 +122,35 @@ objects: description: reported charge percent access_type: ro high_limit: 100 + unit: "%" - subindex: 0x12 name: temperature data_type: int8 - description: temperature of battery pack in celsius + description: temperature of battery pack access_type: ro + unit: C - subindex: 0x13 name: temperature_avg data_type: int8 - description: average temperature of battery pack in celsius + description: average temperature of battery pack access_type: ro + unit: C - subindex: 0x14 name: temperature_max data_type: int8 - description: max temperature of battery pack in celsius + description: max temperature of battery pack access_type: ro + unit: C - subindex: 0x15 name: temperature_min data_type: int8 - description: min temperature of battery pack in celsius + description: min temperature of battery pack access_type: ro + unit: C - subindex: 0x16 name: status @@ -151,92 +171,107 @@ objects: - subindex: 0x1 name: vbatt data_type: uint16 - description: pack voltage in millivolts + description: pack voltage access_type: ro + unit: mV - subindex: 0x2 name: vcell_max data_type: uint16 - description: max voltage for a cell in millivolts + description: max voltage for a cell access_type: ro + unit: mV - subindex: 0x3 name: vcell_min data_type: uint16 - description: min voltage for a cell in millivolts + description: min voltage for a cell access_type: ro + unit: mV - subindex: 0x4 name: vcell data_type: uint16 - description: lowest cell voltage in millivolts + description: lowest cell voltage access_type: ro + unit: mV - subindex: 0x5 name: vcell_1 data_type: uint16 - description: cell 1 voltage in millivolts + description: cell 1 voltage access_type: ro + unit: mV - subindex: 0x6 name: vcell_2 data_type: uint16 - description: cell 2 voltage in millivolts + description: cell 2 voltage access_type: ro + unit: mV - subindex: 0x7 name: vcell_avg data_type: uint16 - description: average voltage of both cells in millivolts + description: average voltage of both cells access_type: ro + unit: mV - subindex: 0x8 name: current data_type: int16 - description: pack current in milliamps + description: pack current access_type: ro + unit: mA - subindex: 0x9 name: current_avg data_type: int16 - description: average current in milliamps + description: pack average current access_type: ro + unit: mA - subindex: 0xa name: current_max data_type: int16 - description: max current in milliamps + description: pack max current access_type: ro + unit: mA - subindex: 0xb name: current_min data_type: int16 - description: min current in milliamps + description: pack min current access_type: ro + unit: mA - subindex: 0xc name: full_capacity data_type: uint16 - description: capacity of battery pack in milliamp-hours + description: capacity of battery pack access_type: ro + unit: mAh - subindex: 0xd name: reported_capacity data_type: uint16 - description: reported capacity of battery pack in milliamp-hours + description: reported capacity of battery pack access_type: ro + unit: mAh - subindex: 0xe name: time_to_empty data_type: uint16 - description: estimate of time until battery pack is empty in seconds + description: estimate of time until battery pack is empty access_type: ro + unit: s - subindex: 0xf name: time_to_full data_type: uint16 - description: estimate of time until battery pack is full in seconds + description: estimate of time until battery pack is full access_type: ro + unit: s - subindex: 0x10 name: cycles @@ -251,30 +286,35 @@ objects: description: reported charge percent access_type: ro high_limit: 100 + unit: "%" - subindex: 0x12 name: temperature data_type: int8 - description: temperature of battery pack in celsius + description: temperature of battery pack access_type: ro + unit: C - subindex: 0x13 name: temperature_avg data_type: int8 - description: average temperature of battery pack in celsius + description: average temperature of battery pack access_type: ro + unit: C - subindex: 0x14 name: temperature_max data_type: int8 - description: max temperature of battery pack in celsius + description: max temperature of battery pack access_type: ro + unit: C - subindex: 0x15 name: temperature_min data_type: int8 - description: min temperature of battery pack in celsius + description: min temperature of battery pack access_type: ro + unit: C - subindex: 0x16 name: status diff --git a/oresat_configs/base/c3.yaml b/oresat_configs/base/c3.yaml index 85f5145..bd34ab5 100644 --- a/oresat_configs/base/c3.yaml +++ b/oresat_configs/base/c3.yaml @@ -21,9 +21,10 @@ objects: - index: 0x4001 name: reset_timeout data_type: uint32 - description: the reset system timeout in seconds + description: the reset system timeout access_type: const default: 86400 # 24 hours + unit: s - index: 0x4002 name: mode @@ -50,15 +51,17 @@ objects: - subindex: 0x2 name: timeout data_type: uint32 - description: tx enable timeout in seconds + description: tx enable timeout access_type: const default: 1209600 # 2 weeks + unit: s - subindex: 0x3 name: last_enable_timestamp data_type: uint32 - description: last tx enable timestamp in seconds + description: last tx enable timestamp access_type: ro + unit: s - index: 0x4005 name: antennas @@ -80,23 +83,26 @@ objects: - subindex: 0x3 name: pre_attempt_timeout data_type: uint8 - description: number of seconds before trying to deploy the antennas + description: timeout before trying to deploy the antennas access_type: const default: 300 # 5 minutes + unit: s - subindex: 0x4 name: attempt_timeout data_type: uint8 - description: number of seconds for a deployment attempt + description: duration of a deployment attempt access_type: const default: 10 + unit: s - subindex: 0x5 name: reattempt_timeout data_type: uint8 - description: number of seconds between deployment reattempts + description: timeout between deployment reattempts access_type: const default: 15 + unit: s - subindex: 0x6 name: deploy_monopole_now @@ -114,9 +120,10 @@ objects: name: good_test_threshold data_type: uint16 description: | - when testing the antennas, any voltage (in millivolts) above this threshold is considered good + when testing the antennas, any voltage above this threshold is considered good access_type: const default: 100 + unit: mV - subindex: 0x9 name: test_monopole_is_good @@ -133,21 +140,24 @@ objects: - subindex: 0xb name: monopole_voltage data_type: uint16 - description: monopole voltage in millivolts + description: monopole voltage access_type: ro + unit: mV - subindex: 0xc name: helical_voltage data_type: uint16 - description: helical voltage in millivolts + description: helical voltage access_type: ro + unit: mV - subindex: 0xd name: attempt_between_timeout data_type: uint32 - description: number of seconds beteeen monopole and helical deployments for an attempt + description: timeout between monopole and helical deployments for an attempt access_type: const default: 5 + unit: s - index: 0x4006 name: lband @@ -158,6 +168,7 @@ objects: data_type: uint32 description: lband received byte count access_type: ro + unit: B - subindex: 0x2 name: rx_packets @@ -168,8 +179,9 @@ objects: - subindex: 0x3 name: rssi data_type: int8 - description: lband rssi of last packet received after lna, filters, and digital channel filter in dB + description: lband rssi of last packet received after lna, filters, and digital channel filter access_type: ro + unit: dB - index: 0x4007 name: uhf @@ -180,6 +192,7 @@ objects: data_type: uint32 description: uhf received byte count access_type: ro + unit: B - subindex: 0x2 name: rx_packets @@ -190,8 +203,9 @@ objects: - subindex: 0x3 name: rssi data_type: int8 - description: uhf rssi of last packet received after lna, filters, and digital channel filter in dB + description: uhf rssi of last packet received after lna, filters, and digital channel filter access_type: ro + unit: dB - index: 0x4008 name: edl @@ -271,9 +285,10 @@ objects: - subindex: 0xc name: timeout data_type: uint32 - description: edl timeout in seconds + description: edl timeout access_type: const default: 60 + unit: s - index: 0x4009 name: opd @@ -299,8 +314,9 @@ objects: - subindex: 0x3 name: current data_type: uint8 - description: opd system current draw in mA + description: opd system current draw access_type: ro + unit: mA - subindex: 0x4 name: scan @@ -324,9 +340,10 @@ objects: - subindex: 0x7 name: reset_delay data_type: uint8 - description: number of seconds between opd system resets + description: delay between opd system resets access_type: rw default: 10 + unit: s - subindex: 0x8 name: nodes_status_json @@ -401,9 +418,10 @@ objects: - subindex: 0x5 name: delay data_type: uint32 - description: delay between beacons in seconds or 0 to disable + description: delay between beacons or 0 to disable access_type: const default: 30 + unit: s - subindex: 0x6 name: send_now @@ -467,7 +485,8 @@ objects: - subindex: 0x1 name: timestamp data_type: uint32 - description: the last saved timestamp in seconds + description: the last saved timestamp + unit: s - subindex: 0x2 name: alarm_a diff --git a/oresat_configs/base/cfc.yaml b/oresat_configs/base/cfc.yaml index e6fb6c8..d7bf8ec 100644 --- a/oresat_configs/base/cfc.yaml +++ b/oresat_configs/base/cfc.yaml @@ -22,8 +22,9 @@ objects: - subindex: 0x3 name: capture_delay data_type: uint32 - description: delay between captures in milliseconds + description: delay between captures default: 1000 + unit: ms - subindex: 0x4 name: last_capture @@ -42,6 +43,7 @@ objects: data_type: uint64 description: the last capture timestamp access_type: ro + unit: scet - subindex: 0x7 name: save_captures @@ -59,13 +61,15 @@ objects: - subindex: 0x9 name: integration_time data_type: uint32 - description: camera integration time in milliseconds + description: camera integration time + unit: ms - subindex: 0xa name: temperature data_type: int8 - description: the camera temperature in celsius + description: the camera temperature access_type: ro + unit: C - index: 0x4001 name: tec @@ -85,7 +89,8 @@ objects: - subindex: 0x3 name: pid_setpoint data_type: int8 - description: the tec target temperature in celsius + description: the tec target temperature + unit: C - subindex: 0x4 name: pid_kp @@ -114,6 +119,7 @@ objects: description: the delay between PID loops in milliseconds access_type: rw default: 250 + unit: ms - subindex: 0x8 name: moving_avg_samples @@ -125,16 +131,18 @@ objects: - subindex: 0x9 name: saturation_diff data_type: uint8 - description: the difference between the lowest and current temperature (in celsius) to flag as saturated + description: the difference between the lowest and current temperature to flag as saturated access_type: rw default: 3 + unit: C - subindex: 0xa name: cooldown_temperature data_type: int8 - description: once saturated the TEC controller cannot be enable until the camera temperature (in celsius) is greater this value + description: once saturated the TEC controller cannot be enable until the camera temperature is greater this value access_type: rw default: 40 + unit: C - subindex: 0xb name: pid_graph diff --git a/oresat_configs/base/dxwifi.yaml b/oresat_configs/base/dxwifi.yaml index 8d07050..a462112 100644 --- a/oresat_configs/base/dxwifi.yaml +++ b/oresat_configs/base/dxwifi.yaml @@ -12,8 +12,9 @@ objects: - subindex: 0x1 name: temperature data_type: int8 - description: the temperature of the radio in celsius + description: the temperature of the radio access_type: ro + unit: C tpdos: - num: 3 diff --git a/oresat_configs/base/fw_common.yaml b/oresat_configs/base/fw_common.yaml index caa4e88..5aaffc8 100644 --- a/oresat_configs/base/fw_common.yaml +++ b/oresat_configs/base/fw_common.yaml @@ -68,8 +68,9 @@ objects: - subindex: 0x7 name: temperature data_type: int8 - description: the temperature of the processor in celsius + description: the temperature of the processor access_type: ro + unit: C - subindex: 0x8 name: vrefint diff --git a/oresat_configs/base/gps.yaml b/oresat_configs/base/gps.yaml index 2c7be5d..b7cb8c5 100644 --- a/oresat_configs/base/gps.yaml +++ b/oresat_configs/base/gps.yaml @@ -46,104 +46,124 @@ objects: - subindex: 0x4 name: tow data_type: uint32 - description: time of the week in 0.01 seconds scaling + description: time of the week access_type: ro + scaling: 0.01 + unit: s - subindex: 0x5 name: latitude data_type: int32 - description: latitude in 1e-7 degrees + description: latitude access_type: ro + scaling: 0.0000001 # 1e-7 + unit: deg - subindex: 0x6 name: longitude data_type: int32 - description: longitude in 1e-7 degrees + description: longitude access_type: ro + scaling: 0.0000001 # 1e-7 + unit: deg - subindex: 0x7 name: ellipsoid_alt data_type: uint32 - description: height above ellipsoid in cm + description: height above ellipsoid access_type: ro + unit: cm - subindex: 0x8 name: mean_sea_lvl_alt data_type: uint32 - description: mean sea level in cm + description: mean sea level access_type: ro + unit: cm - subindex: 0x9 name: gdop data_type: uint16 - description: geometric diluttion of precision in 0.01 scaling + description: geometric diluttion of precision access_type: ro + scaling: 0.01 - subindex: 0xa name: pdop data_type: uint16 - description: position diluttion of precision in 0.01 scaling + description: position diluttion of precision access_type: ro + scaling: 0.01 - subindex: 0xb name: hdop data_type: uint16 - description: height diluttion of precision in 0.01 scaling + description: height diluttion of precision access_type: ro + scaling: 0.01 - subindex: 0xc name: vdop data_type: uint16 - description: vertical diluttion of precision in 0.01 scaling + description: vertical diluttion of precision access_type: ro + scaling: 0.01 - subindex: 0xd name: tdop data_type: uint16 - description: time diluttion of precision in 0.01 scaling + description: time diluttion of precision access_type: ro + scaling: 0.01 - subindex: 0xe name: ecef_x data_type: int32 - description: ecef x coordinate in cm + description: ecef x coordinate access_type: ro + unit: cm - subindex: 0xf name: ecef_y data_type: int32 - description: ecef y coordinate in cm + description: ecef y coordinate access_type: ro + unit: cm - subindex: 0x10 name: ecef_z data_type: int32 - description: ecef z coordinate in cm + description: ecef z coordinate access_type: ro + unit: cm - subindex: 0x11 name: ecef_vx data_type: int32 - description: ecef x velocity in cm/s + description: ecef x velocity access_type: ro + unit: cm/s - subindex: 0x12 name: ecef_vy data_type: int32 - description: ecef y velocity in cm/s + description: ecef y velocity access_type: ro + unit: cm/s - subindex: 0x13 name: ecef_vz data_type: int32 - description: ecef z velocity in cm/s + description: ecef z velocity access_type: ro + unit: cm/s - subindex: 0x14 name: time_since_midnight data_type: uint32 - description: the number of milliseconds since midnight when the gps data was received + description: time since midnight when the gps data was received access_type: ro + unit: ms tpdos: - num: 3 diff --git a/oresat_configs/base/imu.yaml b/oresat_configs/base/imu.yaml index 51d33dc..6892a1d 100644 --- a/oresat_configs/base/imu.yaml +++ b/oresat_configs/base/imu.yaml @@ -6,37 +6,40 @@ objects: - subindex: 0x1 name: pitch_rate data_type: int16 - description: x axis rate deg/s + description: x-axis rate access_type: ro + unit: deg/s - subindex: 0x2 name: yaw_rate data_type: int16 - description: y axis rate deg/s + description: y-axis rate access_type: ro + unit: deg/s - subindex: 0x3 name: roll_rate data_type: int16 - description: z axis rate deg/s + description: z-axis rate access_type: ro + unit: deg/s - subindex: 0x4 name: pitch_rate_raw data_type: uint16 - description: raw x axis rate + description: raw x-axis rate access_type: ro - subindex: 0x5 name: yaw_rate_raw data_type: uint16 - description: raw y axis rate + description: raw y-axis rate access_type: ro - subindex: 0x6 name: roll_rate_raw data_type: uint16 - description: raw z axis rate + description: raw z-axis rate access_type: ro - index: 0x4001 @@ -46,19 +49,22 @@ objects: - subindex: 0x1 name: x data_type: int16 - description: x acceleration in milli-g's + description: x acceleration access_type: ro + unit: milli-g - subindex: 0x2 name: y data_type: int16 - description: y acceleration in milli-g's + description: y acceleration access_type: ro + unit: milli-g - subindex: 0x3 name: z data_type: int16 - description: z acceleration in milli-g's + description: z acceleration + unit: milli-g access_type: ro - subindex: 0x4 @@ -93,26 +99,29 @@ objects: - subindex: 0x1 name: x data_type: int16 - description: +z mag 1 x axis magnetic field in milligauss + description: +z mag 1 x-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - subindex: 0x2 name: y data_type: int16 - description: +z mag 1 y axis magnetic field in milligauss + description: +z mag 1 y-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - subindex: 0x3 name: z data_type: int16 - description: +z mag 1 z axis magnetic field in milligauss + description: +z mag 1 z-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - index: 0x4004 name: pos_z_magnetometer_2 @@ -122,26 +131,29 @@ objects: - subindex: 0x1 name: x data_type: int16 - description: +z mag 2 x axis magnetic field in milligauss + description: +z mag 2 x-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - subindex: 0x2 name: y data_type: int16 - description: +z mag 2 y axis magnetic field in milligauss + description: +z mag 2 y-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - subindex: 0x3 name: z data_type: int16 - description: +z mag 2 z axis magnetic field in milligauss + description: +z mag 2 z-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - index: 0x4005 name: min_z_magnetometer_1 @@ -151,26 +163,29 @@ objects: - subindex: 0x1 name: x data_type: int16 - description: -z mag 1 x axis magnetic field in milligauss + description: -z mag 1 x-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - subindex: 0x2 name: y data_type: int16 - description: -z mag 1 y axis magnetic field in milligauss + description: -z mag 1 y-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - subindex: 0x3 name: z data_type: int16 - description: -z mag 1 z axis magnetic field in milligauss + description: -z mag 1 z-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - index: 0x4006 name: min_z_magnetometer_2 @@ -180,67 +195,75 @@ objects: - subindex: 0x1 name: x data_type: int16 - description: -z mag 2 x axis magnetic field in milligauss + description: -z mag 2 x-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - subindex: 0x2 name: y data_type: int16 - description: -z mag 2 y axis magnetic field in milligauss + description: -z mag 2 y-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - subindex: 0x3 name: z data_type: int16 - description: -z mag 2 z axis magnetic field in milligauss + description: -z mag 2 z-axis magnetic field access_type: ro low_limit: -8192 high_limit: 8192 + unit: milligauss - index: 0x4007 name: magnetorquer object_type: record - description: Magnetorquer Current Feedback in uA subindexes: - subindex: 0x1 name: current_x data_type: int32 - description: current feedback + description: current feedback in the x-axis access_type: ro + unit: uA - subindex: 0x2 name: current_y data_type: int32 - description: current feedback + description: current feedback in the y-axis access_type: ro + unit: uA - subindex: 0x3 name: current_z data_type: int32 - description: current feedback + description: current feedback in the y-axis access_type: ro + unit: uA - subindex: 0x4 name: current_x_setpoint data_type: int32 - description: Set current + description: Setpoint for current in thex x-axis access_type: rw + unit: uA - subindex: 0x5 name: current_y_setpoint data_type: int32 - description: Set current + description: Setpoint for current in the y-axis access_type: rw + unit: uA - subindex: 0x6 name: current_z_setpoint data_type: int32 - description: Set current + description: Setpoint for current in thex z-axis access_type: rw + unit: uA - subindex: 0x7 name: pwm_x @@ -249,6 +272,8 @@ objects: access_type: ro low_limit: 0 high_limit: 10000 + scaling: 0.01 + unit: "%" - subindex: 0x8 name: pwm_y @@ -257,6 +282,8 @@ objects: access_type: ro low_limit: 0 high_limit: 10000 + scaling: 0.01 + unit: "%" - subindex: 0x9 name: pwm_z @@ -265,7 +292,8 @@ objects: access_type: ro low_limit: 0 high_limit: 10000 - + scaling: 0.01 + unit: "%" tpdos: - num: 1 diff --git a/oresat_configs/base/solar.yaml b/oresat_configs/base/solar.yaml index 6ccd5d4..6d8f340 100644 --- a/oresat_configs/base/solar.yaml +++ b/oresat_configs/base/solar.yaml @@ -7,62 +7,72 @@ objects: - subindex: 0x1 name: voltage data_type: uint16 - description: voltage in millivolts + description: voltage access_type: ro + unit: mV - subindex: 0x2 name: current data_type: int16 - description: current in milliamps + description: current access_type: ro + unit: mA - subindex: 0x3 name: power data_type: uint16 - description: power in milliwatts + description: power access_type: ro + unit: mW - subindex: 0x4 name: voltage_avg data_type: uint16 - description: average voltage in millivolts + description: average voltage access_type: ro + unit: mV - subindex: 0x5 name: current_avg data_type: int16 - description: average current in milliamps + description: average current access_type: ro + unit: mA - subindex: 0x6 name: power_avg data_type: uint16 - description: average power in milliwatts + description: average power access_type: ro + unit: mW - subindex: 0x7 name: voltage_max data_type: uint16 - description: max voltage in millivolts + description: max voltage access_type: ro + unit: mV - subindex: 0x8 name: current_max data_type: int16 - description: max current in milliamps + description: max current access_type: ro + unit: mA - subindex: 0x9 name: power_max data_type: uint16 - description: max power in milliwatts + description: max power access_type: ro + unit: mW - subindex: 0xa name: energy data_type: uint16 - description: storing energy in millijoules + description: storing energy access_type: ro + unit: mJ - index: 0x4001 name: cell_1 @@ -71,20 +81,23 @@ objects: - subindex: 0x1 name: temperature data_type: int8 - description: cell 1 temperature in celsius + description: cell 1 temperature access_type: ro + unit: C - subindex: 0x2 name: temperature_min data_type: int8 - description: min cell 1 temperature in celsius + description: min cell 1 temperature access_type: ro + unit: C - subindex: 0x3 name: temperature_max data_type: int8 - description: max cell 1 temperature in celsius + description: max cell 1 temperature access_type: ro + unit: C - index: 0x4002 name: cell_2 @@ -93,20 +106,23 @@ objects: - subindex: 0x1 name: temperature data_type: int8 - description: cell 2 temperature in celsius + description: cell 2 temperature access_type: ro + unit: C - subindex: 0x2 name: temperature_min data_type: int8 - description: min cell 2 temperature in celsius + description: min cell 2 temperature access_type: ro + unit: C - subindex: 0x3 name: temperature_max data_type: int8 - description: max cell 2 temperature in celsius + description: max cell 2 temperature access_type: ro + unit: C - index: 0x4003 name: mppt_alg @@ -119,8 +135,9 @@ objects: - index: 0x4004 name: lt1618_iadj data_type: uint16 - description: i_adj pin voltage in microvolts + description: i_adj pin voltage access_type: ro + unit: mV tpdos: - num: 1 diff --git a/oresat_configs/base/star_tracker.yaml b/oresat_configs/base/star_tracker.yaml index 1cbbea4..e0f6d61 100644 --- a/oresat_configs/base/star_tracker.yaml +++ b/oresat_configs/base/star_tracker.yaml @@ -24,14 +24,16 @@ objects: - subindex: 0x2 name: delay data_type: uint32 - description: delay between captures in ms + description: delay between captures default: 1000 + unit: ms - subindex: 0x3 name: duration data_type: uint32 - description: how long to try to capture for in seconds + description: how long to try to capture for default: 1 + unit: s - subindex: 0x4 name: last_capture @@ -71,26 +73,30 @@ objects: - subindex: 0x1 name: right_ascension data_type: int16 - description: the right ascension of the satellite in degrees + description: the right ascension of the satellite access_type: ro + unit: deg - subindex: 0x2 name: declination data_type: int16 - description: the delination of the satellite in degrees + description: the delination of the satellite access_type: ro + unit: deg - subindex: 0x3 name: roll data_type: int16 - description: the roll of the satellite in degrees + description: the roll of the satellite access_type: ro + unit: deg - subindex: 0x4 name: time_since_midnight data_type: uint32 - description: the number of milliseconds since midnight when the image was captured + description: time since midnight when the image was captured access_type: ro + unit: ms - index: 0x4003 name: capture_filter diff --git a/oresat_configs/base/sw_common.yaml b/oresat_configs/base/sw_common.yaml index 9f41ee1..8460c39 100644 --- a/oresat_configs/base/sw_common.yaml +++ b/oresat_configs/base/sw_common.yaml @@ -67,6 +67,11 @@ objects: name: reset data_type: uint8 description: reset the app. See the olaf.NodeStop enum for values + values: + 1: soft reset + 2: hard reset + 3: factory reset + 4: power off access_type: wo - subindex: 0x2 @@ -75,6 +80,7 @@ objects: description: the current storage percent used access_type: ro high_level: 100 + unit: "%" - subindex: 0x3 name: ram_percent @@ -82,18 +88,21 @@ objects: description: the current ram percent used access_type: ro high_level: 100 + unit: "%" - subindex: 0x4 name: unix_time data_type: uint32 - description: unix time in seconds + description: unix time access_type: ro + unit: s - subindex: 0x5 name: uptime data_type: uint32 - description: uptime in seconds + description: uptime access_type: ro + unit: s - subindex: 0x6 name: power_cycles @@ -107,10 +116,9 @@ objects: - subindex: 0x9 name: boot_select data_type: uint8 - description: | - boot bank or mmc info - - bit 0: current boot bank/mmc - - bit 1: next boot bank/mmc + bitfield: + CURRENT_BOOT: 0 + NEXT_BOOT: 1 access_type: ro - index: 0x3004