Opened 14 years ago

Closed 14 years ago

#229 closed defect (fixed)

Bug in ropp_pp_internal_navbit

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: normal Milestone: 5.0
Component: ropp_pp Version: 4.1
Keywords: open loop navigation bits Cc:

Description

Kjartan Kinch (DMI) has identified a bug in the open loop processing routine ropp_pp/preprocess/ropp_pp_openloop.f90. This contains the subroutine ropp_pp_internal_navbit which calculates

TGM(:) = MODULO(time(:), GPSFL)

TGI(:) = INT(time(:)/GPSFL)

Unfortunately, this doesn't quite work:

time = -2.50000000000000 -1.50000000000000 -0.500000000000000

0.500000000000000 1.50000000000000 2.50000000000000

MODULO(time, gpsfl) = 0.500000000000000 0.500000000000000

0.500000000000000 0.500000000000000 0.500000000000000 0.500000000000000

INT(time/gpsfl) = -2 -1 0 0 1 2

Note the double zero in INT.

Problem solved by using FLOOR instead:

FLOOR(time/gpsfl) = -3 -2 -1 0 1 2

TGM+TGI then reconstructs the original time variable correctly.

This fixes some of Kjartan's difficulties in rationalising OCC and ROPP. It has been put right in ROPP5.0.

Change history (1)

comment:1 by Ian Culverwell, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.