Skip to content

Commit

Permalink
Merge pull request #1065 from rouault/helmert_with_t_huge_val
Browse files Browse the repository at this point in the history
Helmert: consider that xyzt.t == HUGE_VAL means t_epoch
  • Loading branch information
rouault authored Jul 7, 2018
2 parents d9fac5f + 31c6914 commit aad7ff1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/PJ_helmert.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,9 @@ static PJ_COORD helmert_forward_4d (PJ_COORD point, PJ *P) {

/* We only need to rebuild the rotation matrix if the
* observation time is different from the last call */
if (point.xyzt.t != Q->t_obs) {
Q->t_obs = point.xyzt.t;
double t_obs = (point.xyzt.t == HUGE_VAL) ? Q->t_epoch : point.xyzt.t;
if (t_obs != Q->t_obs) {
Q->t_obs = t_obs;
update_parameters(P);
build_rot_matrix(P);
}
Expand All @@ -448,8 +449,9 @@ static PJ_COORD helmert_reverse_4d (PJ_COORD point, PJ *P) {

/* We only need to rebuild the rotation matrix if the
* observation time is different from the last call */
if (point.xyzt.t != Q->t_obs) {
Q->t_obs = point.xyzt.t;
double t_obs = (point.xyzt.t == HUGE_VAL) ? Q->t_epoch : point.xyzt.t;
if (t_obs != Q->t_obs) {
Q->t_obs = t_obs;
update_parameters(P);
build_rot_matrix(P);
}
Expand Down

0 comments on commit aad7ff1

Please sign in to comment.