Академический Документы
Профессиональный Документы
Культура Документы
CanSat Kit
Installation
The GPS receiver module requires a few
steps. A second hole in the end of the can
where the parachute is secured needs to be
made. The hole needs to be large enough to
let the connector fit through. Be careful with
the edge of the hole. It is very sharp. covering
the sharp edges with electrical tape will help
protect fingers and the wires of the GPS
receiver cable.
Feed the GPS receiver cable through the hole leaving a couple inches of cable
outside. Connect the other end to the connector on the processor module where
the sensor board connects. Connect the remaining end to the sensor board.
Install the four standoffs to the
mounting plate using four 4-40
screws provide as shown in figure
1. Install the mounting plate with
the one inch 10-24 screw mounted
into the nut where the parachute
eye-bolt went as shown in figure 4.
Place the loops of the parachute
around the standoffs before
mounting the GPS receiver
module. Screw in the GPS receiver
module. Some parachutes have
only three loops. This is OK. The
cansat will be swinging around in
the air and being level is not
important. You may also want to
consider getting a larger parachute
since the GPS receiver adds
weight. A 14 to 16 inch parachute
should work.
The BASICATOM Pro has syntax to make extracting strings easy. The GPS
receiver generates NMEA data through a serial interface at 4800 baud. The data
of interest starts with the characters “$GPGGA.” Refer to the GPS receiver
manual for the NMEA format for all the other data formats.
The “serin” command is used to read data from the GPS receiver. The GPS
receiver serial interface connects to pin P2. The “i4800” parameter tells the
processor that the serial data is at 4800 baud. In the brackets, the variable string
'blk' is specified. The modifier 'waitstr' tells the serin to not complete until the
serial data coming in matches the variable 'blk.' Once there is a match, the
program will continue. If there is never a match, the program is stuck. Just
remember that variable declarations must be made at the top of the program
before any program statements.
Once the match has occurred, the next statement should be to read in the data.
This is accomplished with more 'serin' commands.
Below is the format of the NMEA 0183 message that contains the position data
among other information.
$GPGGA,hhmmss.ss,llll.lll,a,nnnnn.nnn,b,t,uu,v.v,w.w,M,x.x,M,y.y,
zzzz*hh <CR><LF>
To extract the time stamp from the message, use the following instruction.
The command reads in the time tag up to 10 characters until a coma is reached.
The next page shows an example of extracting the position data from the
message stream. There are other messages that may be useful and are
explained in the GPS receiver reference manual on the CD.
You can integrate the software into your existing program. The program on the
next page reads the position data and displays it on the computer display. It is
left up to you to figure out how to send it out the transmitter. Remember that the
transmitter can send out up to 32 characters. You may have to do multiple
transmissions.
blk var byte(7) ' this is the variable for the header to wait
' for
longitude var byte(11) ' variable array to hold the longitude
latitude var byte(10) ' variable array to hold the latitude
timestamp var byte(10) ' variable array to hold the time stamp
alt var byte(8) ' variable array to hold the altitude
qual var byte(2) ' variable that holds the GPS solution quality
dhop var byte(6) '
satel var byte(2) ' variable for the number of satellites in view
diru var byte(2) ' North/South indication
durl var byte(2) ' East/West indication