Electronic Filing
|
MB E-Filing Site
These FCC/MB forms MUST be electronically filed:
FCC Forms 301, 301-CA, 302-CA, 302-FM, 302-DTV, 302-TV, 303-S, 314,
315, 316, 318, 319, 323, 323-E, 337, 340, 346, 347, 349,
350, 381
EEO Forms 395-A and 395-B have been suspended by
Commission Order FCC 01-34.
CDBS Users Guide or call (202)-418-2662
CDBS System Status
Call Sign Reservations & Authorizations
for broadcast
station call signs
Antenna Structure Registration via ULS
|
|
Easy, one-stop access to all online U.S. Federal Government resources
www.USA.gov
|
|
|
Doppler Shift
A Fortran GET + POST CGI example
The program computes the Doppler shift upward or downwards in frequency caused by
constant motion toward or away from a radio source. Three elements must be entered --
the frequency in Megahertz, the velocity, and a choice of metric or English units.
The numbers here represent double precision, real, and integer numbers.
Parsing the name=value pairs is performed by a DO loop which searches along the input
string for the names;
actual parsing is performed by the "char2" subroutines -- char2double, char2real, and
char2int.
Metric Units (POST method submission)
|
English Units (GET method submission)
|
The source code for this program (HTML and Fortran CGI) is available for
download. If the HTML form uses the GET method to send data, the program
reads the input string from the environment variable QUERY_STRING using the intrinsic
routine getenv. If the form submits the data via the POST method,
the input data appears at the standard input (STDIN) and we use the READ
command to retrieve the input character string. The character
string is subsequently parsed to retrieve the name=value
data pairs sent by the form. In a GET method string, the QUERY_STRING string
consists of everything to the right of the input URL, e.g. input=8CDC5F in
http://www.fcc.gov/fcc-bin/colorit?input=8cdc6f.
FORTRAN:
- The QUERY_STRING or is a character string. If numbers are
contained in the string, they are ASCII characters and must be
converted to numbers before use.
- In this example,
the HTML output is established by the statements
write(6,55)
55 Format("Content-type: text/html"//)
This code must be placed before any HTML statements are written
to output. (Yes, you can change the Format statement number.)
The two // are VERY IMPORTANT! Also, note the placement of the "
quotation marks. Compare to the corrsponding C language statement
printf("Content-type: text/html\n\n");
- For HTML OUTPUT, the HTML tags are contained inside
Format statements, as shown in the example Fortran code.
BE SURE to have the usual HTML ending tags, or you may not see
any HTML output or receive an execution error code.
- Carefully watch use of ' and " in Format statements:
it's too easy to miss one ' or " or add too many.
- When generating output, statements must be no longer
than the 72 character limit in Fortran 77. Another Format
statement or a continuation character in Column 6 may be
used for longer statements.
- A CGI can output a new HTML form, or call a CGI.
The Fortran program can also incorporate subroutines, called in
the usual manner, although none are needed for this example.
- Fortran carriage control characters are unneeded when
generating HTML output. Use the HTML tags to perform this function.
However, to keep the browsers' source code view tidy, you can include
returns at the end of HTML lines:
write(6,111)
111 format(" HTML text here! " /)
- The program has not been optimized. There certainly
are better ways to do some of the tasks or changes
which could be made to reduce the code,
but it's not necessary for this simple example. Please note that no
Fortran or CGI library functions were used in the preparation or
execution of this example. The program was designed as a
stand-alone CGI.
- A POST method CGI example (AMwave)
and a GET example (COLORIT
are also available for your review.
Dale Bickel
Senior Electronics Engineer
Audio Division, Media Bureau
Original page October 2000; revised March 25, 2002
|
|