Skip to content

Commit

Permalink
B-plane partials finalized
Browse files Browse the repository at this point in the history
  • Loading branch information
rahil-makadia committed Aug 23, 2024
1 parent 2e68b78 commit 8aa3b51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion grss/fit/fit_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@ def print_summary(self, iter_idx=-1, out_stream=sys.stdout):
str_to_print += f"{key}\t\t\t{init_val:.11e}\t\t{init_unc:.11e}"
str_to_print += f"\t\t{final_val:.11e}\t\t{final_unc:.11e}"
str_to_print += f"\t\t{final_val-init_val:+.11e}"
str_to_print += f"\t\t{(final_val-init_val)/init_unc:+.3f}\n"
str_to_print += f"\t\t{(final_val-init_val)/final_unc:+.3f}\n"
print(str_to_print, file=out_stream)
return None

Expand Down
15 changes: 10 additions & 5 deletions src/approach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,13 +777,18 @@ void CloseApproachParameters::get_ca_parameters(PropSimulation *propSim, const r
real **partial_xiHat = new real*[6];
for (size_t k = 0; k < 6; k++) {
partial_xiHat[k] = new real[3];
vcross(partial_vel_planet[k], sHat, temp1Vec);
/* the variation from changing planet velocity comes from
opikTotalDerivTerm2, so we dont need the below cross product */
// vcross(partial_vel_planet[k], sHat, temp1Vec);
vcross(vCentralBodyHelio, partial_sHat[k], temp2Vec);
temp1 = xiHat[0] * (temp1Vec[0] + temp2Vec[0]) +
xiHat[1] * (temp1Vec[1] + temp2Vec[1]) +
xiHat[2] * (temp1Vec[2] + temp2Vec[2]);
// temp1 = xiHat[0] * (temp1Vec[0] + temp2Vec[0]) +
// xiHat[1] * (temp1Vec[1] + temp2Vec[1]) +
// xiHat[2] * (temp1Vec[2] + temp2Vec[2]);
temp1 = xiHat[0] * temp2Vec[0] + xiHat[1] * temp2Vec[1] +
xiHat[2] * temp2Vec[2];
for (size_t k2 = 0; k2 < 3; k2++) {
partial_xiHat[k][k2] = (temp1Vec[k2] + temp2Vec[k2] - temp1*xiHat[k2])/vPlanetCrossSHat;
// partial_xiHat[k][k2] = (temp1Vec[k2] + temp2Vec[k2] - temp1*xiHat[k2])/vPlanetCrossSHat;
partial_xiHat[k][k2] = (temp2Vec[k2] - temp1*xiHat[k2])/vPlanetCrossSHat;
}
}
real **partial_zetaHat = new real*[6];
Expand Down

0 comments on commit 8aa3b51

Please sign in to comment.