Index: io/iorx_hh.c =================================================================== RCS file: /home/CVS/panem/io/iorx_hh.c,v retrieving revision 1.1230.2.10 diff -u -r1.1230.2.10 iorx_hh.c --- io/iorx_hh.c 21 Dec 2016 17:00:54 -0000 1.1230.2.10 +++ io/iorx_hh.c 21 Sep 2018 17:28:09 -0000 @@ -18606,6 +18606,19 @@ break; #endif + // This command is used for RF simulator/playback testing + // so it is nice to have in released code. + case 33: + retVal = IoRxNak ; + if (RxControl->RxLength == 5) + { + U16 week = (RxControl->RxBuf[1]<<8) | RxControl->RxBuf[2] ; + S16 epoch = (RxControl->RxBuf[3]<<8) | RxControl->RxBuf[4] ; + st_put_reference_weeknum( week, epoch ) ; + retVal = IoRxAck ; + } + break ; + default: // Unknown subcommand. retVal = IoRxNak ; Index: makefile_settings/novacaine.opts =================================================================== RCS file: /home/CVS/sharedBuildEnv/makefile_settings/novacaine.opts,v retrieving revision 1.20.20.1 diff -u -r1.20.20.1 novacaine.opts --- makefile_settings/novacaine.opts 14 Dec 2016 23:06:58 -0000 1.20.20.1 +++ makefile_settings/novacaine.opts 21 Sep 2018 17:28:09 -0000 @@ -19,7 +19,7 @@ USE_EXT_LOGGING=n USE_DDNS=y USE_T02=y -USE_T04=n +USE_T04=y USE_1050_CSIB=y USE_MPC5121_USB=y USE_AXE=y Index: stinger/app/st_iface.h =================================================================== RCS file: /home/CVS/stinger/app/st_iface.h,v retrieving revision 1.881.4.2 diff -u -r1.881.4.2 st_iface.h --- stinger/app/st_iface.h 14 Sep 2016 17:41:18 -0000 1.881.4.2 +++ stinger/app/st_iface.h 21 Sep 2018 17:28:09 -0000 @@ -6424,6 +6424,7 @@ **********************************************************************/ void st_sband_prod_test(U8 sband_prod_test_cmd); +void st_put_reference_weeknum( U16 week, S16 epoch ) ; /********************************************************************** * st_get_ptr_to_raw_slopes() Index: stinger/auxi/st_iface.c =================================================================== RCS file: /home/CVS/stinger/aux/st_iface.c,v retrieving revision 1.552.4.2 diff -u -r1.552.4.2 st_iface.c --- stinger/auxi/st_iface.c 14 Sep 2016 17:41:18 -0000 1.552.4.2 +++ stinger/auxi/st_iface.c 21 Sep 2018 17:28:09 -0000 @@ -7060,4 +7060,11 @@ #endif } +void st_put_reference_weeknum( U16 week, S16 epoch ) +{ + fe_lock(); + nm_put_reference_weeknum( week, epoch ) ; + fe_unlock(); +} + /* end of file st_iface.c */ Index: stinger/nm/nm.h =================================================================== RCS file: /home/CVS/stinger/nm/nm.h,v retrieving revision 1.241 diff -u -r1.241 nm.h --- stinger/nm/nm.h 1 Jun 2016 15:29:28 -0000 1.241 +++ stinger/nm/nm.h 21 Sep 2018 17:28:09 -0000 @@ -722,5 +722,7 @@ U16 nm_get_week_from_tow( DBL tow ); +void nm_put_reference_weeknum( U16 week, S16 epoch ) ; + #endif /* NM_H */ Index: stinger/nm/nm_dform.c =================================================================== RCS file: /home/CVS/stinger/nm/nm_dform.c,v retrieving revision 1.40.6.1 diff -u -r1.40.6.1 nm_dform.c --- stinger/nm/nm_dform.c 14 Nov 2016 23:45:12 -0000 1.40.6.1 +++ stinger/nm/nm_dform.c 21 Sep 2018 17:28:09 -0000 @@ -72,15 +72,27 @@ */ U16 nm_unwrap_weeknum(U16 weeknum) { - if( weeknum > REFERENCE_WEEKNUM ) + if( nm_ref_epoch >= 0 ) { - /* In 2nd GPS Era (weeks 1024 - 2047) */ - weeknum += 1024; + // For simulator/RF playback testing, allow a different reference + // week & epoch/era. + if( weeknum >= nm_ref_week ) + weeknum += 1024*nm_ref_epoch ; + else + weeknum += 1024*(nm_ref_epoch+1) ; } else { - /* In 3rd GPS Era (weeks 2048 - 3071) */ - weeknum += 2*1024; + if( weeknum >= REFERENCE_WEEKNUM ) + { + /* In 2nd GPS Era (weeks 1024 - 2047) */ + weeknum += 1024; + } + else + { + /* In 3rd GPS Era (weeks 2048 - 3071) */ + weeknum += 2*1024; + } } return weeknum; Index: stinger/nm/nm_getpt.c =================================================================== RCS file: /home/CVS/stinger/nm/nm_getpt.c,v retrieving revision 1.339.6.1 diff -u -r1.339.6.1 nm_getpt.c --- stinger/nm/nm_getpt.c 11 Nov 2016 18:25:21 -0000 1.339.6.1 +++ stinger/nm/nm_getpt.c 21 Sep 2018 17:28:09 -0000 @@ -7094,4 +7094,10 @@ } #endif +void nm_put_reference_weeknum( U16 week, S16 epoch ) +{ + nm_ref_week = week ; + nm_ref_epoch = epoch ; +} + /* end of file nm_getpt.c */ Index: stinger/nm/nm_task.c =================================================================== RCS file: /home/CVS/stinger/nm/nm_task.c,v retrieving revision 1.154.6.1 diff -u -r1.154.6.1 nm_task.c --- stinger/nm/nm_task.c 11 Nov 2016 18:25:21 -0000 1.154.6.1 +++ stinger/nm/nm_task.c 21 Sep 2018 17:28:09 -0000 @@ -555,6 +555,9 @@ U8 i; NAV_INFO *onp; + // Use built-in REFERENCE_WEEKNUM by default + nm_ref_epoch = -1 ; + // Initialise the default UTC leap second parameters nm_init_utc_leap_seconds(); Index: stinger/nm/nmx.h =================================================================== RCS file: /home/CVS/stinger/nm/nmx.h,v retrieving revision 1.150 diff -u -r1.150 nmx.h --- stinger/nm/nmx.h 4 May 2016 15:29:15 -0000 1.150 +++ stinger/nm/nmx.h 21 Sep 2018 17:28:09 -0000 @@ -126,6 +126,9 @@ // raw SBAS data to the application. NMX_EXTERN WAAS_MSG waas_data_packet; +NMX_EXTERN U16 nm_ref_week; +NMX_EXTERN S16 nm_ref_epoch; + #if GLONASS_INSTALLED==TRUE NMX_EXTERN GLONASS_DCOL_INFO glonass_dcol_data[N_CHANNELS]; U8 nm_gln_chk_eph_vs_alm( U8 sv, GLONASS_EPH_INFO *geph, FLT ztime, U16 sv_cno ); Index: su/avro_records/generate_t04_codecs.py =================================================================== RCS file: /home/CVS/emerald/su/avro_records/generate_t04_codecs.py,v retrieving revision 1.8 diff -u -r1.8 generate_t04_codecs.py --- su/avro_records/generate_t04_codecs.py 17 Aug 2016 17:40:09 -0000 1.8 +++ su/avro_records/generate_t04_codecs.py 21 Sep 2018 17:28:09 -0000 @@ -71,7 +71,7 @@ return True if scripts_time < 0: - print "ERROR: Please run from avro_records/ directory" + print("ERROR: Please run from avro_records/ directory") sys.exit(1) if generated_time < this_time \ or generated_time < scripts_time \ @@ -93,14 +93,14 @@ filename]) if VERBOSE or stderrdata: - print stdoutdata + print(stdoutdata) if stderrdata: - print stderrdata - print "*********** Failed t04 codec # %s\n" % l + print(stderrdata) + print("*********** Failed t04 codec # %s\n" % l) sys.exit(1) else: - print "Compiled t04 codec #",l + print("Compiled t04 codec #" + l) def find_latest_python(): """Updates global 'GENERATE_PYTHON'""" @@ -111,21 +111,21 @@ result = stderrdata # If successful, result should be something like "Python 2.7.2" ver = result.split()[1] - # Make sure Python >= 2.6 and <= 3.X - if ver[0] == '2' and int(ver[2]) >= 6: + # Make sure Python >= 2.6 + if (ver[0] == '2' and int(ver[2]) >= 6) or int(ver[0]) >= 3: GENERATE_PYTHON = path break except: pass if GENERATE_PYTHON is None: - print "*********** Couldn't find a python >= 2.6 and < 3.0" - print "Search list is: ",PYTHON_PATH_LIST + print("*********** Couldn't find a python >= 2.6") + print("Search list is: ",PYTHON_PATH_LIST) sys.exit(1) def main(): find_latest_python() if generated_files_are_out_of_date(): - print 'T04 codec generation using python:',GENERATE_PYTHON + print('T04 codec generation using python:' + GENERATE_PYTHON) generate_all_t04_codecs() if __name__ == '__main__': Index: coreBuild.mk =================================================================== RCS file: /vault/CVS/sharedBuildEnv/coreBuild.mk,v retrieving revision 1.69 diff -u -r1.69 coreBuild.mk --- coreBuild.mk 7 Jun 2016 17:58:00 -0000 1.69 +++ coreBuild.mk 4 Oct 2018 15:01:33 -0000 @@ -246,6 +246,13 @@ grep -i 'warning' | grep -v '#warning' | \ grep -v distcc | wc -l`" + +.PHONY: $(TIMG_GEN) +TIMG_SRCS=bin/src/timg/timg.c +$(TIMG_GEN): $(TIMG_SRCS) coreBuild.mk + echo "Building $@" + gcc -m32 -Wall -g -O2 -D__USE_STDINT_H_FOR_TYPES__ -Istinger/app $(TIMG_SRCS) -o $@ + ###################################################################### # new pre_build rule.