Skip to content

Commit

Permalink
Use maneuver angle instead of time-calc man angle unless different
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanconn committed Dec 21, 2023
1 parent fca9ff1 commit 9086da3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions starcheck/src/lib/Ska/Starcheck/Obsid.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2945,12 +2945,24 @@ sub proseco_args {

my $man_angle_data = call_python("state_checks.get_obs_man_angle",
[ $targ_cmd->{tstop}, $self->{backstop} ]);
my $man_angle = $man_angle_data->{'angle'};
$targ_cmd->{man_angle_calc} = $man_angle;
$targ_cmd->{man_angle_calc} = $man_angle_data->{'angle'};

if (defined $man_angle_data->{'warn'}){
push @{$self->{warn}}, $man_angle_data->{'warn'};
}

# Set a maneuver angle to be used by the proseco acquisition probability calculation.
# Here the goal is to be conservative and use the angle that is derived from the
# time in NMM before acquisition (the man_angle_calc from state_checks.get_obs_man_angle)
# if needed but not introduce spurious warnings for cases where the angle as derived
# from the time in NMM is in a neighboring bin for proseco maneuver error probabilities.
# To satisfy those goals, use the derived-from-NMM-time angle if it is more than 5 degrees
# different from the actual maneuver angle. Otherwise use the actual maneuver angle.
# This also lines up with what is printed in the starcheck maneuver output.
my $man_angle = (abs($targ_cmd->{man_angle_calc} - $targ_cmd->{angle}) > 5)
? $targ_cmd->{man_angle_calc} : $targ_cmd->{angle};


# Use a default SI and offset for ERs (no effect without fid lights)
my $is_OR = $self->{obsid} < $ER_MIN_OBSID;
my $si = $is_OR ? $self->{SI} : 'ACIS-S';
Expand Down

0 comments on commit 9086da3

Please sign in to comment.