Quick Details
Property | Value |
---|---|
Class | CubeSat |
Namespace | artemis |
File | cubesatclass.py |
Description
The CubeSat class is a container of Python objects needed to communicate with various components of the CubeSat from the Raspberry Pi
Usage
An instance of the CubeSat class is created when the artemis
module is first imported. In a payload script, this
can be done using the following import statement:
from artemis import cubesat
All necessary functionality is contained within the cubesat
instance.
Example 1
To update the cubesat
object, you can execute the update
function:
cubesat.update()
Example 2
To get the acceleration vector from the IMU:
accel = cubesat.imu.acceleration
accel_x = accel[0]
accel_y = accel[1]
accel_z = accel[2]
Functions
def update(self)
Updates information stored in the cubesat object.
def transmit_file(self, source_file, outgoing_file_name=None)
Marks the file source_file
for transmission, renaming it to outgoing_file_name
.
If None
is provided for the second argument, then the file name is unchanged.
This is the same function as in the BeagleBone class
def set_shutdown_callback(self, function)
Sets the shutdown callback. The function supplied will be called when the program terminates.
def set_soh(self, soh_dictionary)
Sets the state of health message for the payload script. The value soh_dictionary
is a dictionary containing relevant values.
Properties
battery_voltage
The battery voltage in volts.
battery_current
The battery charge current in mA.
system_voltage
The system voltage in volts.
system_current
The system current draw in mA.