Cansat 2010 Comms Guide revC

Embed Size (px)

Citation preview

  • 8/7/2019 Cansat 2010 Comms Guide revC

    1/20

    52424415.doc

    Rev C

    2010 Communications Guide

    Revision C

    Prepared by: Eric Arlington

    1/12/2010 6:49:00 a1/p1 1 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    2/20

    52424415.doc

    Rev C

    REVISION HISTORY

    REV DATE REASON FOR CHANGE/CHANGESECTION(s)AFFECTED

    - 1/12/10 Initial Release AllA 1/17/10 Fixed typo in command to enter AT mode Section 2.3.1

    B 5/18/10 Updated ground station section to for versionB of the ground control station software.

    Section 5.2

    C 5/19/10 Updated ground station section for release ofversion 1.0 of software. Includes updates ofcommanding tab and accelerometer datatransfer.

    Section 5.2,5.3

    1/12/2010 6:49:00 a1/p1 2 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    3/20

    52424415.doc

    Rev C

    Table of ContentsTable of Contents ................................................................................................................ 3

    Tables .................................................................................................................................. 3Figures ................................................................................................................................. 3

    1. Introduction ..................................................................................................................... 41.1 Purpose and Scope ..................................................................................................... 4

    2. Communications Overview ............................................................................................. 52.1 Mission Phases ........................................................................................................... 5

    2.2 Ground Station Architecture ...................................................................................... 6

    2.3 Radio Description ...................................................................................................... 62.3.1 Radio Configuration ............................................................................................ 7

    2.3.2 Laird API Packets ............................................................................................... 7

    3. Launch and Descent Telemetry ....................................................................................... 94. Command and Data Packets .......................................................................................... 10

    4.1 Image Command ...................................................................................................... 10

    4.2 Image Data Transmission ........................................................................................ 104.3 Accelerometer Data Transmission ........................................................................... 114.4 Cease Transmission Command ................................................................................ 12

    5. Ground Control Station .................................................................................................. 13

    5.1 Hardware ................................................................................................................. 135.2 Software ................................................................................................................... 13

    5.2.1 Configuration .................................................................................................... 13

    5.2.2 Descent Telemetry ............................................................................................ 155.2.3 Bonus Mission Commanding ............................................................................ 16

    5.2.4 Log File ............................................................................................................. 20

    TablesTable 1 - API Transmit Packet Formatting..........................................................................8Table 2 - API Receive Packet Formatting...........................................................................8

    Table 3 - Descent Telemetry Packet....................................................................................9

    Table 4 - Image Acquisition Commands...........................................................................10Table 5 - Ground Control Software Build Schedule..........................................................13

    Figures

    Figure 1 - Communications Phase 1 Descent Telemetry.....................................................5Figure 2 Communications Phase 2 Image Acquisition and Data Playback......................6

    Figure 3 - Ground Station Radio........................................................................................13Figure 4 - Ground Control Software Configuration Tab...................................................14

    Figure 5 - Ground Control Software Descent Telemetry Tab...........................................16

    Figure 6 Bonus Mission Commanding...........................................................................17Figure 7 Image Transfer..................................................................................................18

    Figure 8Accelerometer data file.........................................................................................19

    1/12/2010 6:49:00 a1/p1 3 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    4/20

    52424415.doc

    Rev C

    Figure 9 - Ground Control Software Log File Tab............................................................20

    1. IntroductionThe Cansat competition is a design-build-fly competition that providesteams with an opportunity to experience the design life-cycle of an

    aerospace system. The Cansat competition is designed to reflect on asmall scale a typical aerospace program. The competition includes allaspects of an aerospace program from the preliminary design reviewto post mission review. The mission and its requirements are designedto reflect various aspects of real world missions including telemetryrequirements, communications, and autonomous operations. Eachteam is scored throughout the competition on real-world deliverableitems such as design reviews and demonstration flights. Details of thecompetition and the specific mission requirements can be found in theCansat 2010 Competition Guide.

    1.1 Purpose and Scope

    The purpose of this document is to describe communications protocol for the 2010

    Cansat competition. This document will provide the following details:

    1/12/2010 6:49:00 a1/p1 4 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    5/20

    52424415.doc

    Rev C

    2. Communications Overview

    2.1 Mission Phases

    The Cansat mission is broken into 2 communications phases. During phase 1,each Cansat shall transmit the descent telemetry packet every 5 seconds fromlaunch through detection of landing. Phase 1 is required for the base mission.The Cansat shall cease autonomous transmission of the descent telemetrypacket upon detection of landing. If a team is attempting one of the bonusmission objectives, the Cansat will then transition into phase 2. During phase 2,the Cansat shall detect image and data commands and respond with theappropriate data packets. At the completion of phase 2, a command will be sentto the Cansat to disable further transmission.

    Figure 1 - Communications Phase 1 Descent Telemetry

    Cansat 4Cansat

    Cansat 2

    Data RelayBalloon

    DATA1

    DATA2

    DATA3

    DATA4

    D1:D2:D3:D

    4:

    1/12/2010 6:49:00 a1/p1 5 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    6/20

    52424415.doc

    Rev C

    Figure 2 Communications Phase 2 Image Acquisition and Data Playback

    Data Relay

    Balloon

    CMD

    CMD

    DATA

    DATA

    2.2 Ground Station Architecture

    The overall communications architecture is composed of 3 major elements, theCansat, the data relay balloon, and the ground terminal. The Cansat will becomposed of the team designed structure, electronics and a communicationradio. The Cansat shall transmit descent telemetry and data packets to andreceive commands from the relay balloon. The data relay balloon shall consist ofa tethered balloon, the relay electronics and a communication radio. The datarelay balloon shall receive radio packets from either the ground terminal or aCansat and retransmit the packet. The ground terminal shall receive and archivetransmitted descent telemetry, generate commands, and process data packets.The end to end data flow is shown in the following figures.

    2.3 Radio Description

    The Cansat competition has selected the Laird AC4790-200 radio for use in theCansat, data relay balloon, and the ground terminal. Details of the interfacingwith and operating the radios can be found in the AC4790 User Manual, revision1.8, found on the Laird website. The Cansat competition will be utilizing the APIpacket mode for both transmit and receive. Under no circumstances shall teamsoperate the radios in broadcast mode or transmit to MAC 0xFF 0xFF 0xFF in APImode.

    1/12/2010 6:49:00 a1/p1 6 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    7/20

    52424415.doc

    Rev C

    2.3.1 Radio Configuration

    All radios used during for the Cansat competition shall be configured for APIcommunications. Commands are provided below to configure the radio from thefactory default configuration to that used for the competition. During power up,the following serial commands shall be sent to configure the AC4790-200 radio

    for API communication. The factory default serial communications protocol is:57600, 8, 1, none. Additional information can be found in the AC47900 UserManual.

    Command Number: 1Function: Enter AT Command ModeRadio Command: 0x41 0x54 0x2B 0x2B 0x2B 0x0DRadio Response: 0xCC 0x43 0x4F 0x4D

    Command Number: 2Function: Configure for API Control

    Radio Command: 0xCC 0x17 0x13Radio Response: 0xCC 0x13

    Command Number: 3Function: EEPROM Write Control 1 ByteRadio Command: 0xCC 0xC1 0x56 0x01 0x41Radio Response: 0x56 0x01 0x41

    Command Number: 4Function: Exit AT Command ModeRadio Command: 0xCC 0x41 0x54 0x4F 0x0D

    Radio Response: 0xCC 0x44 0x41 0x54

    2.3.2 Laird API Packets

    All radios used during the competition must use properly formatted API packetsas defined in the AC4790 users manual (API Control page 11) for transmittingdata. Table 1 shows API transmit data packet that is used to transmit data fromthe Cansat to the data relay balloon or ground station radio. It is important tonote that the data length field must be set correctly for the number of bytes in thedata field. Sending a malformed packet to the radio will result in a broadcasttransmission to all available radios. The data field is capped 120 bytes. The

    remaining available bytes are used as part of the communication between therelay balloon and the ground terminal. For teams attempting the bonus mission,there is an API receive packet that will contain the command, shown in Table 2.

    1/12/2010 6:49:00 a1/p1 7 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    8/20

    52424415.doc

    Rev C

    Table 1 - API Transmit Packet Formatting

    Packet Element Value Size (Bytes) Description

    API Start 0x81 1This byte is a fixed header. Does not

    change

    Data Length 0x01 0x78 1 This byte is set based on the number ofbytes in the data field

    Session Count Refresh 0x08 1 Byte is a fixed value

    Transmit Retries/Broadcast Attempts

    0x04 1 Byte is a fixed value

    Ground Station MAC , , 3

    This is the MAC address of the groundstation or relay radio that the data packet isto sent to. These values will be provided

    prior to the competition.

    Data 0x01 0x78Descent Telemetry, Image Packets, or

    Impact Data Packets.

    Table 2 - API Receive Packet Formatting

    Packet Element Value Size (Bytes) Description

    API Start 0x81 1This byte is a fixed header. Does not

    change

    Data Length 1This byte is set based on the number of

    bytes in the data field

    RSSI 0xFF 1The RSSI is how strong the remote

    transceiver heard the local transceiver (Notvalid in this configuration).

    RSSI* 1The RSSI* is how strong the local

    transceiver heard the remote transceiver

    Source MAC , , 3This is the MAC address of the ground

    station or relay radio that the transmissionwas received from.

    Data 0x01 0x78Descent Telemetry, Image Packets, or

    Impact Data Packets.

    1/12/2010 6:49:00 a1/p1 8 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    9/20

    52424415.doc

    Rev C

    3. Launch and Descent TelemetryDuring the launch and descent phase, each Cansat shall transmit the followingcomma delimited descent telemetry packet. A comma should be included at theend of the data packet to terminate the sequence.

    Table 3 - Descent Telemetry Packet

    Element Description

    GPS Time GPS time to 1 second resolution

    GPS Latitude Copy Direct from NMEA message, include N/S

    GPS Longitude Copy Direct from NMEA message, include E/W

    GPS Altitude Copy from NMEA message

    Number of Satellites being tracked Copy direct from NMEA message

    Altitude via non GPS sensor or data toderive altitude

    Specify in meters or notify competition ground team ifsending unprocessed sensor data.

    Air Temperature Units in C to 1 degree resolution

    Battery Voltage Unit in volts to 0.1 volt resolution

    Example:

    161229,3723.2475N,12158.3146W,3120.3,7,3109.4,29,8.4,

    1/12/2010 6:49:00 a1/p1 9 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    10/20

    52424415.doc

    Rev C

    4. Command and Data Packets

    4.1 Image Command

    The commands for initiating and image acquisition will text string and are listed inTable 4. Upon receipt of the command, the command shall acquire the selectedimage and store the data in the jpeg format. After the image acquisition iscomplete, the Cansat will respond with text string RDY to indicate that the imagehas been captured and is ready for transmission.

    Table 4 - Image Acquisition Commands

    Command Description

    JPN Acquire an image in the north direction

    JPS Acquire an image in the south direction

    JPE Acquire an image in the east direction

    JPW Acquire an image in the west direction

    JPZ Acquire and image of the egg

    4.2 Image Data Transmission

    The acquired image will be transmitted in 100 byte blocks with the exception ofthe final block. The binary jpeg data will be sent to ground station utilizing APIpackets and a simple hand shaking routine. In the event of a dropped block, the

    hand shaking routine will allow the ground station to request a specific data blockby number. The steps for transmitting the image data are described below anddo not include the API header:

    Step 1: The ground station will send the following command to request thenumber of data blocks.

    JPG,0 {number 0},

    Step 2: The Cansat will send the following response indicating the number ofdata blocks to be sent

    JPD,,

    Step 3: The ground station will request a block by number

    JPG,,

    1/12/2010 6:49:00 a1/p1 10 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    11/20

    52424415.doc

    Rev C

    Step 4: The Cansat will respond with the requested 100 byte data block of binaryjpeg data. Note that there is a comma after the data block number to indicate thestart of binary data.

    JPD,,

    At the completion of the data transfer, the image will be stored as a jpeg file anddisplayed on the ground station software.

    4.3 Accelerometer Data Transmission

    The accelerometer data will be transmitted in a similar manner as the imagedata. The stored impact accelerometer data will be transmitted in blocks of data.The steps for transmitting the accelerometer data are described below and donot include the API header.

    Step 1: The ground station will send the following command to request thenumber of data blocks.

    ACL,0 {number 0}

    Step 2: The Cansat will send the following response indicating the number ofdata blocks to be sent

    ACD,

    Step 3: The ground station will request a block by number

    ACL,

    Step 4: The Cansat will respond with the requested data block not to exceed 100bytes in length. The data block will consist of ascii formatted comma delimitednumbers with a comma after the last number as follows:

    ACD,,,< sample 1>,,, ,

    time stamp integer number of ms from start of data.sample accelerometer measurement in m/s^2 to 2 decimal places.

    At the completion of the data transfer, the data will be stored in a text file andmade available to the team.

    1/12/2010 6:49:00 a1/p1 11 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    12/20

    52424415.doc

    Rev C

    4.4 Cease Transmission Command

    At the completion of bonus mission commanding, the following command will besent to terminate radio transmissions. Upon receipt of the command, the Cansat

    shall terminate processing of commands

    Step 1: Ground station sends terminating command

    OFF

    Step 2: Cansat responds with an acknowledgement and ceases to respond tocommands or powers down.

    OFF

    1/12/2010 6:49:00 a1/p1 12 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    13/20

    52424415.doc

    Rev C

    5. Ground Control Station

    5.1 Hardware

    The ground station will be made up of a laptop running Windows XP and a Laird

    4790-200 radio, part number, CL4790-200-05-ND. The radio is packaged such that itcan connect to the computers USB port and to a wall outlet utilizing a power converter.

    Figure 3 - Ground Station Radio

    5.2 Software

    The Cansat ground control station software has been written in Microsoft VisualC# 2008 .net Framework. The software is currently in the development phase.The major build schedule is shown in Table 5. Intermediate builds will bereleased to fix issues as required.

    Table 5 - Ground Control Software Build Schedule

    ReleaseVersion

    Functionality Date

    A.0 Descent Telemetry Processing 1/31/10

    B.0 Bonus Mission Command and Processing 5/18/10

    1.0 Version to be used during competition 5/19/10

    2.0 Additional Updates as needed N/A

    5.2.1 ConfigurationWhen the ground control software first starts up, it should default to theConfiguration tab.

    1/12/2010 6:49:00 a1/p1 13 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    14/20

    52424415.doc

    Rev C

    Figure 4 - Ground Control Software Configuration Tab

    The following steps are required to setup up the

    Step 1: Load the team configuration file. Press the Load Button and select thefile team_Config.xml. The Team Configuration table should populate with teamnames and radio MAC addresses.

    Step 2: Update the radio MAC address for your teams radio. Position themouse over the MAC address and double click. This should allow you to deletethe default value and update with the correct value. The MAC address should beentered as 6 hex digits with no spaces.

    Step 3: Save the updated configuration file. Pres the Save button and enter anew file name or save over the existing team configuration file.

    Step 4: Select your team in the Team 1 drop down combo box.

    Step 5: Select the COM Port and data rate for your ground station radio and

    press the Open button. The default values of COM 1 and 57600 should work.A status message should indicate that the serial port was successfully opened.

    Step 6: Press the Radio Button. This will send commands listed in section2.3.1to the ground station radio to configure it to be used for the Cansat groundstation.

    1/12/2010 6:49:00 a1/p1 14 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    15/20

    52424415.doc

    Rev C

    Step 7: Select a directory for the log file to be saved in. Press the button andselect a directory for the log file to be saved in. The text box should display theselected directory.

    Step 8: If the Cansat is going to communicate directly to the ground station and

    not through a relay radio and its associated electronics, deselect the Relay Linkcheck box. If a relay link is to be used, leave this alone and set the Relay RadioID to the MAC address of the relay radio.

    The ground control software should now be configured.

    5.2.2 Descent Telemetry

    The Descent Telemetry tab contains descent telemetry for up to four selectedteams, the controls required to start and stop the data flow, and the data flowstatus. This page should only be used after successfully completing all

    configuration steps listed in section 5.2.1. Press the Start button to startcollecting and processing data from the ground station radio. Data collection canbe started prior to, or after the Cansat has been powered up. The software willcollect all data coming into the serial port and will search for valid API frames inthe data. The total number of processed frames will be displayed in the FramesReceived box. All packets received when descent telemetry collection is activewill be displayed on the log file page and saved to a log file. Pressing the restbutton will clear this page.

    1/12/2010 6:49:00 a1/p1 15 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    16/20

    52424415.doc

    Rev C

    Figure 5 - Ground Control Software Descent Telemetry Tab

    5.2.3 Bonus Mission Commanding

    Bonus mission commanding is managed on the Commander tab. The steps to sendbonus mission commands are as follows:

    Step 1: Verify that descent telemetry collection is no longer active from any Cansat.

    Step 2: Stop decent telemetry data collection.

    Step 3: Select the Cansat team that you wish to command from the Select Team pull

    down menu.

    Step 4: Select the appropriate command from the desired command from the SelectCommand pull down menu.

    Step 5: Press the Send button.

    Step 6: View the command log tab to verify command execution.

    1/12/2010 6:49:00 a1/p1 16 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    17/20

    52424415.doc

    Rev C

    Figure 6 Bonus Mission Commanding

    5.2.3.1 Image Transfer Command

    The following steps should be performed to command a Cansat to acquire an image and

    to transfer it to the ground station.

    Step 1: Select Team from the pull down menu

    Step 2: Select the appropriate image command: Image North, South, East, West, or Egg

    Step 3: Press the SEND command button

    Step 4: Verify command execution on the command log tab.

    2010.05.18,14:54:31, Sending Command to Transfer Image: City College of New York,

    2010.05.18,14:54:31, Radio MAC: 371926, Command: JPW,2010.05.18,14:54:32, Cansat MAC: 371926 Cansat Response: RDY,

    Step 5: Select the Transfer Image command from the command menu.

    Step 6: Press the SEND command button.

    1/12/2010 6:49:00 a1/p1 17 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    18/20

    52424415.doc

    Rev C

    Figure 7 Image Transfer

    The commander tab contains the following telemetry points to monitor C

    commanding: transfer status, link quality, total number of packets to transfer, last packettransferred, number of retries attempted. At the completion of an image transfer, the

    image will be saved to a jpeg file and will be displayed on the ground control stationsoftware. The software will automatically stop data transfer after 10 failed packets. Theimage and data transfer telemetry can be cleared with the RESET button.

    5.2.3.2 Accelerometer Data Transfer Command

    The accelerometer data transfer command will function in a similar manner to the imagetransfer commanding. The operator selects the Cansat Team and Accel Data. The

    accelerometer data will be displayed in the command log window and saved to an ascii

    text file. The text file will be formatted as follows:

    1/12/2010 6:49:00 a1/p1 18 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    19/20

    52424415.doc

    Rev C

    Figure 8Accelerometer data file

    1/12/2010 6:49:00 a1/p1 19 of 20

  • 8/7/2019 Cansat 2010 Comms Guide revC

    20/20

    52424415.doc

    Rev C

    5.2.4 Log File

    The log file tab will contain a list of all of the frames captured by the descenttelemetry page. The log file will contain all received frames, not just those

    displayed on the descent telemetry page. The log file will be saved in the userselected directory. The file name will be__ complete_log.txt. Thedata will be comma delimited and displayed in the following format:

    .. ::,MAC,RSSI*,,

    Figure 9 - Ground Control Software Log File Tab

    1/12/2010 6 49 00 1/ 1 20 f 20