Back To Top
The Real Time web pages supply the spacecraft quaternions whenever we
are in Comm. There are times when we can just use those values. But
other times, the values of the quaternions read from the spacecraft
are not correct, nor will they be correct until we are well into the
recovery procedures. At the outset of the event, we can be provided
the last known expected Q's from mission planning, or PCAD, or the
load backstop file itself. Those can be used in the history-files.pl
run which records the NSM or BSH event.
Subsequent to that event, you may find that we will orient the
spacecraft into a "cooling attitude" such that various devices begin
to cool (e.g. ACA). You must then run the NLET GUI to capture the
maneuver and, again, you must specify the target Quaternions.
This is done by specifying new Target Quaternions. If you are
listening in to the recovery procedures you will hear PCAD announce
the existence of a "FOT Request file" on Lucky - usually in Eric Martin's lucky
directory (emartin). The file names look like:
When you specify the Q's to the NLET GUI you need to have all 4
Q's. To calculate the 4th, you can use a program called:
acis.acisdude:script[123]> Read_FOT_Request_Qs
The Orbit Events File figures heavily in our Load Review
processing. For example they are used in LR programs such as:
So for example DO22192.orp, was created in 2022 and the first
data line in the file is:
2022:192:16:16:00.000 3167 XQF005M PROTON FLUX EXIT FOR ENERGY 0 LEVEL 0 KP 5 MEAN
Inbound ECS measurements start very
close to the time of OORMPDS, and outbound ECS measurements
end very close to OORMPEN. However, OORMPDS (RADMON ENTRY) and OORMPEN (RADMON EXIT) do not
appear in the ORP file. They must be calculated.
To use this program log on as acisdude, execute setloads and
run the program. You can run it as yourself but you have to
know that it lives in:
/data/acis/LoadReviews/script/Get_OORMP_Times.py
And your PYTHONPATH must include:
/data/acis/LoadReviews/script/UTILITIES
Get_OORMP_Times.py:
- Given a path to the directory containing an Orbital Events
File (DO*****.orp) and a full path to an output file,
calculate the OORMPDS and OORMPEN times given the data in
the .orp file, using the rules specified in:
Usage:
Get_OORMP_Times.py --orp_file_path /home/gregg/Desktop --outfile_path /home/gregg/Desktop/my_OORMP_file.dat
Get_OORMP_Times.py --orp_file_path /home/gregg/Desktop
Get_OORMP_Times.py --outfile_path /home/gregg/Desktop/my_OORMP.dat
Get_OORMP_Times.py
The defaults for the two command line arguments are:
Sample output file:
/data/acis/LoadReviews/script/UTILITIES/ORP_File_Class.py
Use of these tools is simplified if you log on as acisdude and
execute a "setload". You can run it as yourself but your
PYTHONPATH must include:
/data/acis/LoadReviews/script/UTILITIES
It is a class so if you wanted to you use it in your Python
code you would import the class and ceate an instance in your
program:
import ORP_File_Class as ofc
These are the method available to you within this class:
Quaternions - Obtaining and Calculating
We need spacecraft quaternions to perform several Load Review
functions.
The most common use is when a Normal Sun Mode or Bright Star Hold
even has occurred and we need to run history files for those
events. When we do that we must supply the present spacecraft
quaternions.
A_Q1TGT_213.fot
...and the contents look like this:
!$Revision$
!$Date 2020:147:02:22$
SCS_CATEGORY, VEHICLE
RTSLOAD,A_QUP,SCS_NUM=213,
Q1=0.647841071555,
Q2=0.510237507002,
Q3=-0.513207790488
Calc_Q4
Given 3 Quaternions, calculate and display the 4th.
You run the program and it will query you for the 3 known
Q's.
It will then calculate and display the 4th:
acis.acisdude:script[120]> Calc_Q4
Please enter Q1: 0.647841071555
Please enter Q2: 0.510237507002
Please enter Q3: -0.513207790488
The 4th Quaternion is: 0.23786003497283528
Read_FOT_Req_Qs
You have the option of copying over the FOT request file to your
local direcory if you wanted to capture it for tracking. The FOT
Request files do not remain in Eric's directory, on lucky, for long.
Once you've copied the file over you can run the following program
which will read the file, capture the 3 Quaternions as well as the
date specified in the file, calculate the 4th Q and display the date
plus all 4 quaternions. Usage and results look like this:
Please enter the full path to the FOT Request file: ORBIT/A_Q1TGT_213.fot
The date of this FOT Request is: 2020:147:02:22
Q1 = 0.647841071555
Q1 = 0.510237507002
Q1 = -0.51320779048
Q4 = 0.23786003499009623
Classes For Your Use
Both Calc_Q4 and Read_FOT_Req_Qs utilize the FOT_Req_Class.py
located in:
/data/acis/LoadReviews/script/ORBIT/FOT_Req_Class.py
This class contains the code for reading the FOT Request file and
calculating the 4th Quaternion. It stores all 4 Qs and various
otehr data from teh FOT Request (e.g. the date) in class
attributes. You can Use this class in other programs.
Back To Top
The Orbit Events (.orp) File
The format of the file name is:
DO[YY][DOY].orp
Where:
DO = Capital "D" capital "O",
YY is the year the file was created and
DOY is the Chandra Day of the first time stamp in the file.
Calculate the times of OORMPDS and OORMPEN From The
ORP File
This program was written when it was necessary to estimate
when inbound ECS measurements could take place during an
August 2022 perigee passage. During this passage, we expected to upload an
ACIS Flight Software Patch. The ORP file containing the
orbital events appears long before the load is available.
Guideline:
https://occweb.cfa.harvard.edu/twiki/bin/view/Constraints/MPGuidelines/Development/GuidelineRadiationSafingWithoutHRC
......and write the resulting array out to the user-specified file.
Date Time Orbit Event Description
2022:194:09:09:59.729 774090668.913 3167 EQF013M 'PROTON FLUX ENTRY FOR ENERGY 0 LEVEL 1 KP 3 MEAN'
2022:194:09:09:59.729 774090668.913 3167 OORMPDS 'RADMON ENTRY'
2022:194:09:58:14.760 774093563.944 3167 EEF1000 'ELECTRON 1 RADIATION ENTRY 0'
2022:194:11:46:48.285 774100077.469 3167 EPERIGEE 'ORBIT PERIGEE'
2022:194:16:37:59.729 774117548.913 3168 XQF013M 'PROTON FLUX EXIT FOR ENERGY 0 LEVEL 1 KP 3 MEAN'
2022:194:16:50:14.760 774118283.944 3168 OORMPEN 'RADMON EXIT'
2022:194:16:50:14.760 774118283.944 3168 XEF1000 'ELECTRON 1 RADIATION EXIT 0'
...................................
Orbital Event Files: DO*****.orp
Since I had to process ORP files for LR, I wrote a set of
Python utilities to read and process the ORP files. These
utilities are available for your use and can be found in:
# Create an instance of the ORP File Class
ofci = ofc.ORP_File_Class()
- You only specify the directory not the full path. This is
because the class was written with our OFLS directory
structure in mind. LR was modified to capture the ORP file
from the load review tarball and place it in the OFLS
directory. So the method expects one ORP file in the
directory. The method glob's the name.
- A numpy array consisting of the columns in the ORP file,
is returned.
(['EQF013M', 'EEF1000', 'EPERIGEE', 'XQF013M', 'XEF1000']