OreSat File
OLAF only support file in the card_keyword_timestamp.extension or card_keyword_timestamp
format where:
The
cardfield is the name of card it is for or the name of card it was made on; e.g.:gps,star-tracker, etc.The
keywordfield is a useful keyword for the file.Use
-to seperate multiple keywords.The keyword
updateis reserved for updates.
The
timestampfield is the unix timestamp in milliseconds when the file was made.The
.extensionfield 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, andtimestampfields 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.xzstar-tracker_capture_1688791896103.bmp.gzcfc_capture_1688791896103.bmp.gzc3_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:
- 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.