📄 dispfun.c
字号:
}
irow = (dispsv-1)%12;
icol = (dispsv-1)/12;
OutputString(2+icol*26,7+irow,buff);
}
OutputString(2+2*26,7+9,ionoutc.vflg? "IONO/UTC":" ");
}
/****************************************************************************
* Function: void F5_Display(void)
*
* The display obtained by pressing key F5.
*
* Input: None.
*
* Output: None.
*
* Return Value: None.
****************************************************************************/
void F5_Display(void)
{
char buff[90];
sprintf(buff,"Processing Status");
OutputString(30,6,buff);
sprintf(buff,"Accumulations Max Pending: %5u Missed: %5u",
MaxAccumPending,missa);
OutputString(3,8,buff);
sprintf(buff,"Measurements Missed: %5u",
missm);
OutputString(3,9,buff);
sprintf(buff,"Observations Max Pending: %5u Missed: %5u",
MaxObsPending,misso);
OutputString(3,10,buff);
sprintf(buff,"Subframes Max Pending: %5u Missed: %5u",
MaxSfPending,misssf);
OutputString(3,11,buff);
sprintf(buff,"Compiler version: %4X Instruction Set: %5u-bit",__BORLANDC__,INSTRMODE);
OutputString(3,13,buff);
sprintf(buff,"Remaining conventional memory available (bytes): %9lu",
farcoreleft());
OutputString(3,14,buff);
if(_8087)
OutputString(3,15,"Coprocessor Present");
else
OutputString(3,15,"Coprocessor Absent ");
sprintf(buff,"Channels allocated: %2d Channels in use: %2d",
MAXCHANNELS,ActiveChannels);
OutputString(3,16,buff);
}
/****************************************************************************
* Function: void F6_Display(void)
*
* The display obtained by pressing key F6.
*
* Input: None.
*
* Output: None.
*
* Return Value: None.
****************************************************************************/
void F6_Display(void)
{
int i,itemp;
char latstr[14],lonstr[14],buff[90];
beacstruc Beacon;
OutputString(18,6,"U.S. Coast Guard/IALA Beacon Input Status");
if(BeacPort==0)
{
sprintf(buff,"Beacon input port: Inactive");
OutputString(3,7,buff);
}
else
{
PROTECT++; /* Ensure indivisible access to BEAC */
Beacon = BEAC;
PROTECT--;
sprintf(buff,"Beacon input port: COM%d "
"9600 baud, 8 bits, no parity",BeacPort);
OutputString(3,7,buff);
sprintf(buff,"Beacon frequency : %5.1lf kHz "
"Bit rate : %3d Sync: %c",
Beacon.RptFreq,Beacon.RptBrate,Beacon.sync? 'Y': 'N');
OutputString(3,8,buff);
sprintf(buff,"Signal Strength : %5d dB uV "
"SNR : %3d dB",Beacon.RptSS,
Beacon.RptSNR);
OutputString(3,9,buff);
sprintf(buff,"Last Frame Type :%6d",Beacon.typ);
OutputString(3,10,buff);
sprintf(buff,"Frame Seq. Number:%6d",Beacon.frm);
OutputString(38,10,buff);
sprintf(buff,"Beacon Health :%6d",Beacon.hlth);
OutputString(3,11,buff);
sprintf(buff,"Beacon Station ID:%6d",Beacon.id);
OutputString(38,11,buff);
if(Beacon.pos==0)
{
sprintf(buff,"Reference Pos'n : Unknown ");
OutputString(3,12,buff);
}
else
{
LatLonToDegMin(Beacon.lat,Beacon.lon,latstr,lonstr);
sprintf(buff,"Reference Pos'n : %13s %13s %8.1lf",
latstr,lonstr,Beacon.hgt);
OutputString(3,12,buff);
}
sprintf(buff,"Text Message :");
OutputString(3,13,buff);
if(Beacon.msg[0]==0)
OutputString(26,13,"NONE");
else
{
itemp=0; /* Set to 1 if end of string is encountered */
for(i=0; i<45; ++i)
{
buff[i] = Beacon.msg[i];
if(buff[i]==0)
{
itemp=1;
break;
}
}
buff[45] = 0;
OutputString(26,13,buff);
if(itemp==0)
{
/* More message on the next line */
for(i=45; i<90; ++i)
buff[i-45] = Beacon.msg[i];
buff[45] = 0;
OutputString(26,14,buff);
}
}
}
OutputString(3,16,"Commands pertaining to external DGPS beacon "
"receivers:");
OutputString(3,17," DC n enables RTCM-104 input on COM1 (n=1) or "
"COM2 (n=2), DC 0 disables");
OutputString(3,18," BR f,b tunes beacon receiver to f kHz and b bits/sec");
}
/****************************************************************************
* Function: void F7_Display(void)
*
* The display obtained by pressing key F7.
*
* Input: None.
*
* Output: None.
*
* Return Value: None.
****************************************************************************/
void F7_Display(void)
{
char buff[90];
OutputString(22,6,"RINEX2 Geodetic Data Collection Status");
if((Rx2N==NULL)||(Rx2O==NULL))
OutputString(3,8,"RINEX2 Data Collection: Inactive");
else
{
OutputString(3,8,"RINEX2 Data Collection: Active");
PROTECT++; /* Ensure indivisible access to 32-bit variables */
sprintf(buff,"Navigation data : RINEX2.N Records: %lu",
Rx2NRecs);
PROTECT--;
OutputString(3,9,buff);
PROTECT++; /* Ensure indivisible access to 32-bit variables */
sprintf(buff,"Observation data : RINEX2.O Records: %lu",
Rx2ORecs);
PROTECT--;
OutputString(3,10,buff);
OutputString(3,11,"Meteorological data : None");
sprintf(buff,"Collection interval : %d sec",Rx2Interval);
OutputString(3,12,buff);
}
OutputString(3,15,"Commands pertaining to RINEX2 geodetic data "
"collection:");
OutputString(3,16," RN n starts/restarts RINEX2 data collection, "
"recording interval n seconds");
OutputString(3,17," RN 0 closes any open RINEX2 data files and stops "
"collection");
OutputString(3,18," RC text inserts comment text into RINEX2 data files");
}
/****************************************************************************
* Function: void F8_Display(void)
*
* The display obtained by pressing key F8.
*
* Input: None.
*
* Output: None.
*
* Return Value: None.
****************************************************************************/
void F8_Display(void)
{
char buff[90],latstr[15],lonstr[15];
int current_track_mode,y,m,d,hh,mm,gwk,LeapSecWeek,current_leap_seconds;
unsigned long ctic;
double dtemp,gsec;
OutputString(25,6,"Current Operating Parameters");
PROTECT++;
sprintf(buff,"Altitude Aiding : %s",
(AltitudeAided==FALSE)?"OFF ":"AUTO");
PROTECT--;
OutputString(3,7,buff);
PROTECT++;
sprintf(buff,"Fixed Position : %s",(DontMove==FALSE)?"OFF":"ON ");
PROTECT--;
OutputString(3,8,buff);
PROTECT++;
sprintf(buff,"Elevation Mask : %5.1lf degrees",ElvMask);
PROTECT--;
OutputString(3,9,buff);
PROTECT++;
sprintf(buff,"GDOP Mask : %5.1lf",GdopMask);
PROTECT--;
OutputString(3,10,buff);
PROTECT++;
sprintf(buff,"Integrated Carrier : %s",
(IntegratedCarrier==FALSE)?"OFF":"ON ");
PROTECT--;
OutputString(3,11,buff);
PROTECT++;
sprintf(buff,"Coasting Interval : %2d seconds",Coast/1000);
PROTECT--;
OutputString(3,12,buff);
PROTECT++;
sprintf(buff,"Receiver ID : %1.1d",ReceiverID);
PROTECT--;
OutputString(3,13,buff);
PROTECT++;
current_track_mode = TrackMode;
PROTECT--;
switch(current_track_mode)
{
case HIGHEST_ELEVATIONS:
sprintf(buff,"Track Mode : %1.1d (Highest Elevation "
"Satellites)",HIGHEST_ELEVATIONS);
break;
case SELECT_SATELLITES:
sprintf(buff,"Track Mode : %1.1d (Manual Selection of "
"Satellites)",SELECT_SATELLITES);
break;
case COLD_START:
sprintf(buff,"Track Mode : %1.1d (Cold Start)",
COLD_START);
break;
default:
sprintf(buff,"Track Mode : Unrecognised mode");
break;
}
OutputString(3,14,buff);
sprintf(buff,"Time Zone : %3d hours",TimeZone);
OutputString(3,15,buff);
PROTECT++;
LatLonToDegMin(reflat,reflon,latstr,lonstr);
sprintf(buff,"Reference pos : %s %s %7.1lfm",latstr,lonstr,refhgt);
PROTECT--;
OutputString(3,16,buff);
if(ionoutc.vflg)
{
CurrentTIC(&ctic);
TICToGpsTime(ctic,&gwk,&gsec);
PROTECT++;
current_leap_seconds = ionoutc.dtls;
LeapSecWeek = gwk + (int)(ionoutc.wnlsf - (gwk&0xFF));
if((gwk-LeapSecWeek)>127) LeapSecWeek += 256;
if((gwk-LeapSecWeek)<(-127)) LeapSecWeek -= 256;
GpsTimeToUTCDate(LeapSecWeek,ionoutc.dn*86400.0-43200.0,&y,&m,&d,&hh,&mm,&dtemp);
PROTECT--;
sprintf(buff,"Leap Second : %02d/%02d/%02d",m,d,y%100);
OutputString(3,17,buff);
sprintf(buff,"Leap Seconds Now : %2.2d",current_leap_seconds);
OutputString(3,18,buff);
}
else
OutputString(3,17,"Leap Second : Unknown ");
}
/****************************************************************************
* Function: void F9_Display(void)
*
* The display obtained by pressing key F9.
*
* Input: None.
*
* Output: None.
*
* Return Value: None.
****************************************************************************/
void F9_Display(void)
{
char buff[90];
int i;
unsigned RemainingSuspendInterval[10],TotalSuspendTics,StkUsagePct;
sprintf(buff,"Task Statuses");
OutputString(32,6,buff);
if(_8087)
OutputString(55,6,"Coprocessor Present");
else
OutputString(55,6,"Coprocessor Absent ");
OutputString(3,7,"ID TASK PROCEDURE CHKPT ACTIV DELAY "
"SLICES STK COMMENT");
/* Go through the suspend list and calculate the remaining suspend
intervals for each task */
for(i=0; i<10; ++i)
RemainingSuspendInterval[i] = 0;
i = SuspTask;
TotalSuspendTics = 0;
PROTECT++; /* To ensure indivisible access to the suspend list */
while(i != -1)
{
TotalSuspendTics += TCB[i].SuspTics;
RemainingSuspendInterval[i] = TotalSuspendTics;
i = TCB[i].NxtSusp;
}
PROTECT--;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -