Opened 14 years ago
Closed 13 years ago
#226 closed defect (fixed)
ropp_pp_openloop wrong handling of negative time values for finding internal navbits — at Version 4
Reported by: | kmk | Owned by: | Ian Culverwell |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | ropp_pp | Version: | 4.1 |
Keywords: | Cc: | kmk@… |
Description (last modified by )
ropp_pp_openloop line 350:
TGI(:) = INT(time(:)/GPSFL)
The time variable is negative for the first few (about 30) time steps and then becomes positive. The above line does not handle the change from negative to positive correctly. As an example. If time/GPSFL goes:
.... -2.5, -1.5, -0.5, 0.5, 1.5, 2.5 ....
TGI goes:
.... -2, -1, 0, 0, 1, 2 ....
(note the two zeroes)
In this case TGI should rightly increment by 1 for every step.
This could either be handled directly or indirectly by adding a positive constant to time (the latter is essentially what happens in OCC).
Change history (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Milestone: | → 6.0 |
---|
comment:3 by , 13 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 13 years ago
Description: | modified (diff) |
---|---|
Milestone: | 6.0 → 5.1 |
Resolution: | → fixed |
Status: | assigned → closed |
It turns out that a change from
TGI(:) = INT(time(:)/GPSFL)
to
TGI(:) = FLOOR(time(:)/GPSFL)
(ie using Kjartan's suggestion) was implemented in ROPP5.0. Apologies for not documenting this. Closing ticket.
Simplest and best fix is to use FLOOR instead of INT