OreSat File

OLAF only support file in the card_keyword_timestamp.extension or card_keyword_timestamp format where:

  • The card field is the name of card it is for or the name of card it was made on; e.g.: gps, star-tracker, etc.

  • The keyword field is a useful keyword for the file.

    • Use - to seperate multiple keywords.

    • The keyword update is reserved for updates.

  • The timestamp field is the unix timestamp in milliseconds when the file was made.

  • The .extension field is the optional extension. Can also be multiple extensions, e.g.: .tar.gz.

All fields should not contain _ as it is used to seperate the fields.

Reasoning behind naming scheme:

  • Between the card, keyword, and timestamp fields all file names should be unique.

  • When a file is upload to the C3 from the UniClOGS, the C3 can use card field can be used to figure out if the file is for it or what card to send the file to over the CAN bus.

  • When file are download from the C3 to UniClOGS, all 3 fields can be used to figure out what card the file originated from, what it is, and when it was made.

Examples:

  • gps_update_1688791896103.tar.xz

  • star-tracker_capture_1688791896103.bmp.gz

  • cfc_capture_1688791896103.bmp.gz

  • c3_logs_1688791896103.txt.xz

olaf.new_oresat_file(keyword: str, card: str = '', date: float = -1.0, ext: str = '') str[source]

Convenience function for making valid oresat file_names

Parameters:
  • keyword (str) – The keyword for the new file_name

  • card (str) – The card name for the file_name. If not set, the hostname will be used.

  • date (float) – Unix timestamp the file was made. Set to a time.time() value or set to a negative number to use current time.

  • ext (str) – The file extension. Optional.

Returns:

The new oresat file name.

Return type:

str

class olaf.OreSatFile(file: str)[source]

A class that follows the OreSat file format.

Parameters:

file_name (str) – Name of the OreSat file.

Raises:

ValueError – If file name format is wrong.

property name: str

The name of the file. Read only.

Type:

str

property card: str

The card the file is for or the card the file was made on. Read only.

Type:

str

property keyword: str

The keyword for the file, this can be used to figure out what todo with the file. Read only.

Type:

str

property date: float

The Unix time the file was made in milliseconds. Read only.

Type:

float

property extension: str

The file extension. Can be an empty string. Read only.

Type:

str