aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/PJ_helmert.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/PJ_helmert.c b/src/PJ_helmert.c
index 8ba955bb..490bc2c4 100644
--- a/src/PJ_helmert.c
+++ b/src/PJ_helmert.c
@@ -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);
}
@@ -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);
}