History Files


  1. Background
  2. Files
  3. File Locations
  4. ACE-update.pl
  5. history-files.pl
  6. Examples
  7. Recovery after an incorrect run of history-files.pl

HELP! I'm in a hurry! Do I run history-files.pl or ACE-update.pl?

Run history-files.pl if:

Otherwise, run ACE-update.pl for nominal weekly loads


BACKGROUND

ACIS Ops maintains a set of state files to record the state of the spacecraft operations that pertain to ACIS. The files indicate the time of the state change and the item recorded. The files are collectively referred to as "History Files".

The ACIS realtime webpages for hardware monitoring use these files to determine the state of the spacecraft at the real time contacts. If the information in the history files does not match the spacecraft telemetry, an alert is sent.

We update these files once a command load is approved for flight with ACE_update.pl or when there is a need to interrupt the current plan with history-files.pl.

FILE NAMES

FILE LOCATIONS

The base files (master copies) are stored in: /proj/sot/acis/FLU-MON.
All processing is done on the base files and then copied to the real-time processing locations.

Those four real-time processing locations are:

For historical reasons, copies are also maintained here:

Other File Locations

History files now places entries, in the Non-Load Event Tracking file, of these non-load events:
SCS-107's, Full Stops, TOO's and go's.

The location of the NLET file is:
/data/acis/LoadReviews/NonLoadTrackedEvents.txt
This is the "For Score" version and must be correct for good thermal model performance.
When history-files.pl is run in the test mode (-test -satest), no history files are modified and nothing is written to the R/T machines or the NLET file.

history-files also creates a set of history files which covers only the time range of the load under review. These files are stored in the directory of the load week under review.

ACE-update.pl

During normal weeks, the way to update the history files is to run ACE-update.pl once the FOT Mission Planners announce the loads are approved by the flight director. The script is stored in the /data/acis/LoadReviews/scripts directory and the user must be acisdude. The script will check and fail if the user is not acisdude to protect the write permissions on the files.

ACE-update.pl will check the file: /data/acis/LoadReviews/current_load.txt. This file was populated with the last load to be passed through the load review process. You will be asked if this is the load to approve. Enter either Y or N and follow instructions on the screen.

In an interrupt situation, you would run history-files.pl instead. ACE-update.pl is called from within history-files.pl. So, there is no need to call ACE-update.pl directly. Follow the directions in the history-files.pl section.

In rare occasions, the new load approved starts seconds or minutes before the last load ends. These are really not an issue, but can make the history files look like they run backwards in time for that time frame. To prevent this, ACE-update.pl does a time check and will present a question to the user.

 
Checking mission file times...

GRATHIST-2001.dat: 2012:219:01:29:35.494 to be replaced by 2012:219:01:27:00.00
DITHHIST.dat: 2012:219:01:29:35.494 to be replaced by 2012:219:01:27:00.00
FPHIST-2001.dat: 2012:219:01:29:35.494 to be replaced by 2012:219:01:27:00.00
OBSHIST.dat: 2012:219:01:29:35.494 to be replaced by 2012:219:01:27:00.00
TLMHIST.data: 2012:219:01:29:35.494 to be replaced by 2012:219:01:27:00.00

Do you wish to replace the mission history starting at time
2012:219:01:27:00.0?[Y/N]

The answer is almost always yes. If you are unsure, type N and the code will exit. Then go back to the mission history files and the load and confirm the times are reasonable.

history-files.pl

During any type of interrupt situation, history-files.pl must be called to modify the set of history files. Interrupt situations include:

Safing Modes and Safing Actions

Safing modes:

From SOP_SAFE_MODE_RESPONSE_CONTINGENCY:
The best indication that a Safe Mode has been triggered is that OBC-A is halted.
Backup OBC comes up in Safe Mode and the reconfiguration SCS in the Backup OBC
repeats time critical safing actions
Example: NSM

Safing Action:

OBC or ground based actions to safe spacecraft components and/or functions.
Examples: Bright Star Holds and SCS-107 (Ground or spacecraft initiated) runs.
Non-Safe Mode Safing Actions, which can perform any or all of the following:

For more information, see: Course EN114 - Safing/Safe Mode Overview

Here are the following ways to use the history-files.pl script

  1. If loads have been stopped for a SCS107-only execution and you need to update the history files to indicate that the observational loads have stopped, run:

    history-files.pl -s107 [time of load stop] [current state]

  2. If loads stop due to any other safing action and you need to update the history files to indicate all loads have stopped, run:

    history-files.pl -stop [time of load stop] [current state]

  3. If new replan loads have been created and approved after either an SCS107-only
    or Full Stop safing action has stopped the loads, YOU MUST run:

    history-files.pl [-go]

  4. A fast TOO has been approved and you need to update the history files to replace the information already placed in the files, run:

    history-files.pl -too [time of load interrupt] [current state]

  5. A maneuver load has been created and approved during an SCS-107 or other safing action stoppage and you need to update the history files to reflect this, run:

    history-files.pl [-man]

What does history-files do?

The goal of history-files.pl is to edit the history files when a change from the nominal weekly load occurs.
There are basically 6 cases:

  1. SCS-107 is executed (not a Full Stop).

    An SCS-107 alone will stop the observational/science loads. Vehicle loads will continue.
    So you need to use the -s107 option with history-files. The history files containing observational
    load items will be truncated to the latest time prior to the STOP. Followed by a line containing the
    stop time you specified in your history-files command, followed by the the pertinent spacecraft
    element you specified in the history-files command.
    Lastly a line with the time stamp set to 9999:999:99:99:99.999 is appended.

    These are modified:
    FPHIST-2001.dat
    GRATHIST-2001.dat
    OBSHIST.dat
    TSCHIST.dat
    These are not modified:
    DITHHIST.dat
    TLMHIST.dat
    SCS155HIST.dat

  2. A Full Stop safing action is executed.

    If a Safing Action occurs, both the observational and vehicle loads will be stopped.
    In this case, use the -STOP option when running history files. All history files will be
    truncated to the latest time prior to the STOP. Then a line is appended containing the
    stop time you specified in your history-files command, followed by the the pertinent spacecraft
    element you specified in the history-files command.
    Lastly a line with the time stamp set to 9999:999:99:99:99.999 is appended.

  3. Resumption of science load is approved.

    Unlike a normal weekly load, where ACE-update.pl is executed, execute the command:

    history-files.pl -go.
    This removes the 9999:999:99:99:99.999 lines and runs ACE-update.pl to append the resumption
    load information to the history files.

  4. Maneuver-Only load or only the vehicle portion of a full load is to be uplinked.
    Or a full load is uplinked but only the vehicle SCS's are enabled.

    • After any safing action, there is a chance the spacecraft needs a maneuver-only load. It does not matter if it is an SCS-107 or other safing action. In these cases, a maneuver load requires special handling. The -man option runs ACE-update.pl with the maneuver load information and then appends the 9999:999:99:99:99.999 status line to the end of the history files.

    • In the case where it is not safe to resume science, but a full load was built and reviewed, the flight director may choose to only uplink the vehicle portion. At this point, you run history-files.pl with the -man option to update the vehicle portions of the history files without updating the observing portions, even if you reviewed the entire load.

    • It was quickly discovered that a return to science load could be run with only the vehicle SCS's enabled. The -man option now allows for this. Executing history-files.pl with the -man option will record the current observing SCS histories, append the resumption load information and then truncate the observing histories with the original information, allowing the vehicle loads to continue. The 9999:999:99:99:99.999 status line to the end of all history files.

  5. TOO interrupt.

    A target of opportunity (TOO) may cause the mission planners to interrupt a planned week and uplink a new load. The -too option will replace the already planned information with the status at the time of the interrupt and then execute ACE-update.pl to append the new load information onto the history files. After a too is approved, history-files.pl should be run instead of ACE-update.pl

EXAMPLES:

  1. This option removes all observing history after the stop time and inserts '9999' line with current status. Load stopped at 2002:090:01:43:57.095. Obtain the status vector from the loads, replacing the instrument position with HRC-S and the radiation monitor status with OORMPDS.

    history-files.pl -s107 2002:090:01:43:57.095 HRC-S,HETG-OUT,LETG-OUT,2118,OORMPDS,CSELFMT2,ENAB

  2. This option removes all history after the stop time and inserts '9999' line with current status. Load stopped at 2002:090:01:43:57.095

    history-files.pl -stop 2002:090:01:43:57.095 HRC-S,HETG-OUT,LETG-OUT,2118,OORMPDS,CSELFMT2,ENAB

  3. This option runs ACE-update.pl to update history files and then removes the extra '9999' line in each history file.

    history-files.pl -go

  4. This option cuts the history files at the point of load interruption and then runs ACE-update.pl to update the new load history.

    history-files.pl -too 2002:281:01:43:57.095 HRC-S,HETG-OUT,LETG-OUT,2118,OORMPDS,CSELFMT2,ENAB

  5. This option runs ACE-update.pl to append maneuver load history, then moves the '9999' line to the bottom of each history file to preserve the history.

    history-files.pl -man

Recovery after an incorrect run of history-files.pl

We all make mistakes running history files and it's important to know how to recover from them.
Mistakes include using the wrong switch (e.g. -stop instead of -s107) or placing an incorrect
value in the status line.

Regardless of the mistake the primary thing to recognize is that BEFORE you do ANYTHING else,
you must FIRST clean up some files before you run history-files again.

Here are the steps:

  1. Remove the entry just added to the NLET file: /data/acis/LoadReviews/NonLoadTrackedEvents.txt
  2. Copy all the /proj/sot/acis/FLU-MON/*HIST*-temp.dat files back into the *HIST*.dat files
  3. Re-run history-files with the correct parameters

If you DON'T do things in that order you have just made your life far more complicated.
Recall that when you run history files, one of the first things it does is take whatever is in
the *HIST*.dat files and copies them into the /proj/sot/acis/FLU-MON/*HIST*-temp.dat files.

This is your safety net.

Then it proceeds to modify some or all of the *HIST*.dat files. Were you to run history-files
a second time without first restoring the *HIST*.dat files, the program will take the
already-incorrectly-modified *HIST*.dat files and copy them to the *HIST*-temp.dat's
thusly clobbering the last correct copy you had of the history files.

And if you don't clean out the NLET file then the thermal models will give you some very
interesting and quite incorrect results.

Always remember that the history for just the load under review is stored in the OFLS directory.
So if you need to reconstruct one or more history files you can use the -temp.dat files, or the files
you may have copied, and the history files within each review load OFLS directory - going back as far
as you need to in order to get to uncorrupted history.

Last updated by Gregg Germain: 02/28/23