Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7dd65b0
Updating CV versions of interleavesound and normalsound for compatibi…
egthomas Aug 20, 2021
3d9845e
Modifying sndwrite.c for QNX6 interleavesound and normalsound control…
egthomas Aug 24, 2021
bf28471
Modifying QNX4 and QNX6 interleavesound and normalsound control progr…
egthomas Aug 26, 2021
8763895
Adding sd_leicester QNX4 subdirectory
egthomas Aug 27, 2021
896ca30
Fixing bug in QNX6 normalsound causing error in calculated def_intt_u…
egthomas Aug 28, 2021
a9001b7
Merge branch 'master' of github.com:superdarn/control_programs into s…
egthomas Aug 28, 2021
bbfe46c
Modifying QNX4 and QNX6 sounding mode integration time for 20-beam ra…
egthomas Aug 28, 2021
c3cd842
Merge branch 'master' of github.com:superdarn/control_programs into s…
egthomas Aug 28, 2021
9b3dce1
Fixing normalsound_cv for site-specific bugs
egthomas Aug 31, 2021
a771780
Fixing normalsound_cv for more site-specific bugs
egthomas Aug 31, 2021
b430645
Updating normalsound and interleavesound code for optimization and mo…
egthomas Aug 31, 2021
c20a35d
Modifying QNX4 and QNX6 sounding code errlog messages to put line bre…
egthomas Sep 7, 2021
0d8bac7
Modifying QNX6 sounding code to remove unused exitpoll checks
egthomas Sep 8, 2021
01d688d
Adding missing if statement bracket
ksterne Sep 13, 2021
ff6ee35
Fixing errors in QNX4 interleavesound and normalsound identified by K…
egthomas Sep 13, 2021
c8592f3
Fixing error introduced in QNX4 normalsound
egthomas Sep 13, 2021
0d827f8
Fixing one more error in QNX4 normalsound
egthomas Sep 13, 2021
af32c68
Fixing error in QNX4 normalsound and interleavesound code identified …
egthomas Sep 13, 2021
28dd120
Modifying QNX4 interleavesound and normalsound to set mpinc after cal…
egthomas Sep 14, 2021
ce64a1c
Updating QNX4 interleavesound.c version number to reflect changes in …
egthomas Sep 16, 2021
2f406a1
Update README.md
egthomas Sep 17, 2021
130ce3d
Adding some extra errlog info about SND frequencies to QNX4 inerleave…
egthomas Sep 18, 2021
670c85c
Modifying QNX4 version of normalsound to add the -lf option for limit…
egthomas Sep 18, 2021
e740278
Merge branch 'master' into sound_fix_range
egthomas Sep 18, 2021
466fe41
Merge pull request #3 from SuperDARN/sound_fix_range
egthomas Sep 18, 2021
6cb4175
Commenting out xcf collection for fhr
ksterne Oct 26, 2021
9e1f91d
Modifying QNX6 interleavesound and normalsound control programs to st…
egthomas Nov 1, 2021
0fb5d48
Returning Kevin's comment about Fort Hays XCF collection to QNX6 norm…
egthomas Nov 1, 2021
7d0b0cc
Merging upstream changes 20211108, keeping vtsuperdarn readme
ksterne Nov 8, 2021
4dfcfa2
Adding older version of normalsound to repo for backup
ksterne Nov 8, 2021
5971d30
Commenting out xcf collection in sounding mode as gbr not able to col…
ksterne Nov 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 46 additions & 24 deletions qnx4/interleavesound.1.00/interleavesound.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@

/*
$Log: interleavesound.c,v $
Revision 1.1 2021/09/15 egthomas
Modification to set number of ranges used for frequency
sounding independently of nrang for the interleaved scan

Revision 1.0 2019/06/14 egthomas
Initial revision from interleavedscan and normalsound

Expand All @@ -57,7 +61,7 @@
#define TASK_NAMES "echo_data","iqwrite","rawacfwrite","fitacfwrite"

char cmdlne[1024];
char progid[80]={"$Id: interleavesound.c,v 1.0 2019/06/14 egthomas Exp $"};
char progid[80]={"$Id: interleavesound.c,v 1.1 2021/09/15 egthomas Exp $"};
char progname[256];
struct TaskID *errlog;

Expand Down Expand Up @@ -120,6 +124,8 @@ int main(int argc,char *argv[]) {
int skip;
int cnt=0;

int def_nrang=0;

unsigned char discretion=0;

/* ---------- Beam sequence for interleavedscan ---------- */
Expand Down Expand Up @@ -176,21 +182,24 @@ int main(int argc,char *argv[]) {
int odd_beams=0;
int snd_freq;
int snd_frqrng=100;
int snd_nrang=75;
float snd_time, snd_intt, time_needed=1.25;
int snd_bms_tot, snd_intt_sc, snd_intt_us;
int fast_intt_sc, fast_intt_us;
unsigned char limit_fswitch=0;

if (num_scans == 16) {
int snd_bms_tot=8;
int fast_intt_sc=3;
int fast_intt_us=0;
int snd_intt_sc=2;
int snd_intt_us=0;
else if (num_scans == 20) {
int snd_bms_tot=10;
int fast_intt_sc=2;
int fast_intt_us=500000;
int snd_intt_sc=1;
int snd_intt_us=500000;
snd_bms_tot=8;
fast_intt_sc=3;
fast_intt_us=0;
snd_intt_sc=2;
snd_intt_us=0;
} else if (num_scans == 20) {
snd_bms_tot=10;
fast_intt_sc=2;
fast_intt_us=400000;
snd_intt_sc=1;
snd_intt_us=500000;
}

snd_intt = snd_intt_sc + snd_intt_us*1e-6;
Expand Down Expand Up @@ -231,21 +240,21 @@ int main(int argc,char *argv[]) {
&dmpinc,&nmpinc,
&frqrng,&xcnt);

SiteStart();

// For 1-min normal scan
cp = 197;
intsc = fast_intt_sc;
intus = fast_intt_us;
mppul = 8;
mplgs = 23;
mpinc = 1500;
dmpinc = 1500;
nmpinc = 1500;
nrang = 75;
rsep = 45;
txpl = 300; /* recalculated below with rsep */
frang = 180;

SiteStart();

#if 1
//maxatten=1; //Chris
//maxatten=2; //Sessai
Expand Down Expand Up @@ -285,6 +294,8 @@ int main(int argc,char *argv[]) {

SiteSetupHardware();

def_nrang = nrang;

// set a negative CPID for discretionary time
if (discretion) cp = -cp;

Expand Down Expand Up @@ -368,7 +379,6 @@ int main(int argc,char *argv[]) {
SiteSetFreq(tfreq);

sprintf(logtxt,"Transmitting on: %d (Noise=%g)",tfreq,noise);

ErrLog(errlog,progname,logtxt);

tsgid=SiteTimeSeq(ptab);
Expand Down Expand Up @@ -426,7 +436,7 @@ int main(int argc,char *argv[]) {
}

} while (1);
ErrLog(errlog,progname,"Waiting for scan boundary.");


if (exitpoll == 0) {
/* In here comes the sounder code */
Expand All @@ -436,14 +446,17 @@ int main(int argc,char *argv[]) {
/* set the xcf variable to do cross-correlations (AOA) */
xcf = 1;

/* set the sounding mode integration time and number of ranges */
intsc = snd_intt_sc;
intus = snd_intt_us;
nrang = snd_nrang;

/* we have time until the end of the minute to do sounding */
/* minus a safety factor given in time_needed */
TimeReadClock(&yr,&mo,&dy,&hr,&mt,&sc,&us);
snd_time = 60.0 - (sc + us*1e-6);

while (snd_time-snd_intt > time_needed) {
intsc = snd_intt_sc;
intus = snd_intt_us;

/* set the beam */
bmnum = snd_bms[snd_bm_cnt] + odd_beams;
Expand All @@ -457,14 +470,17 @@ int main(int argc,char *argv[]) {
ErrLog(errlog,progname,"Setting SND beam.");
SiteSetIntt(intsc,intus);
SiteSetBeam(bmnum);

ErrLog(errlog, progname, "Doing SND clear frequency search.");
sprintf(logtxt,"FRQ: %d %d",snd_freq,snd_frqrng);
ErrLog(errlog,progname,logtxt);
if (SiteFCLR(snd_freq, snd_freq + snd_frqrng)==FREQ_LOCAL)
ErrLog(errlog,progname,"Frequency Synthesizer in local mode.");
SiteSetFreq(tfreq);
/*

sprintf(logtxt,"Transmitting SND on: %d (Noise=%g)",tfreq,noise);
ErrLog(errlog, progname, logtxt);
*/

tsgid = SiteTimeSeq(ptab);
nave = SiteIntegrate(lags);
if (nave < 0) {
Expand Down Expand Up @@ -497,7 +513,7 @@ int main(int argc,char *argv[]) {
/* Only send these to echo_data; otherwise they get written to the data files */
RMsgSndSend(tlist[0], &msg);

sprintf(logtxt, "SBC: %d SFC: %d\n", snd_bm_cnt, snd_freq_cnt);
sprintf(logtxt, "SBC: %d SFC: %d", snd_bm_cnt, snd_freq_cnt);
ErrLog(errlog, progname, logtxt);

/* set the scan variable for the sounding mode data file only */
Expand All @@ -510,12 +526,12 @@ int main(int argc,char *argv[]) {
/* save the sounding mode data */
write_snd_record(progname, &prm, &fit);

ErrLog(errlog, progname, "Polling SND for exit.");
ErrLog(errlog, progname, "Polling SND for exit.\n");
exitpoll=RadarShell(sid,&rstable);
if (exitpoll !=0) break;

if (limit_fswitch) {
/* check for the end of a frequency loop */
/* check for the end of a frequency loop (optional) */
snd_bm_cnt++;
if (snd_bm_cnt >= snd_bms_tot) {
/* reset the beam counter and increment the freq counter */
Expand Down Expand Up @@ -546,8 +562,12 @@ int main(int argc,char *argv[]) {
}

/* now wait for the next interleavescan */
ErrLog(errlog,progname,"Waiting for scan boundary.");

intsc = fast_intt_sc;
intus = fast_intt_us;
nrang = def_nrang;

OpsWaitBoundary(scnsc,scnus);
}

Expand Down Expand Up @@ -606,6 +626,8 @@ void write_snd_record(char *progname, struct RadarParm *prm, struct FitData *fit
status = SndFwrite(out, prm, fit);
if (status == -1) {
ErrLog(errlog,progname,"Error writing sounding record.");
} else {
ErrLog(errlog,progname,"Sounding record succesfully written.");
}

fclose(out);
Expand Down
6 changes: 5 additions & 1 deletion qnx4/interleavesound.1.00/version.info
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# $Log: version.info,v $
#
# Revision 1.1 2021/09/15 egthomas
# Modification to set number of ranges used for frequency
# sounding independently of nrang for the interleaved scan
#
# Revision 1.0 2019/06/14 egthomas
# Initial revision from interleavedscan and normalsound
#
#
interleavesound.c 1.00
interleavesound.c 1.01
sndwrite.c 1.01
sndwrite.h 1.00
2 changes: 2 additions & 0 deletions qnx4/interleavesound_stereo.1.00/interleavesound_stereo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,8 @@ void write_snd_record(char *progname, struct RadarParm *prm, struct FitData *fit
status = SndFwrite(out, prm, fit);
if (status == -1) {
ErrLog(errlog,progname,"Error writing sounding record.");
} else {
ErrLog(errlog,progname,"Sounding record succesfully written.");
}

fclose(out);
Expand Down
45 changes: 45 additions & 0 deletions qnx4/normalsound.2.07/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Makefile for tauscan
# =======================
# by R.J.Barnes
#
#


INCLUDE=-I$(IPATH)/base -I$(IPATH)/general -I$(IPATH)/superdarn \
-I$(IPATH)/radarqnx4 \
-I$(USR_IPATH)/radarqnx4/ops \
-I$(USR_IPATH)/radarqnx4/site.$(SD_RADARCODE)

OBJS = normalsound.o
SRC=normalsound.c
IGNVER=1
OUTPUT = $(USR_BINPATH)/normalsound
SUDO = 1
LIBS=-lsite.${SD_RADARCODE}.1 -lops.1 -lfitacf.1 -lradar.1 -lerrlog.1 \
-lrs.1 -lfreq.1 -liqcopy.1 -lacf.1 -lshmem.1 -ltcpipmsg.1 \
-lrawfeed.1 -ltsg.1 \
-ltaskid.1 -lrmsgsnd.1 -lrtimer.1 -lrtime.1 -lrmath.1 -lopt.1
include $(SITELIB).${SD_RADARCODE}
include $(MAKEBIN)






















Loading