Neha Nehru Shadab Ambat BEACON & TELEMETRY Neha Nehru Shadab Ambat
Objective Periodically send current status information of the satellite to the ground station Send satellite telemetry information upon user request
Requirements Beacon Telemetry Data packet must be APRS compatible Must be sent periodically. Telemetry Must be KCOM encoded before transmission. Data should be sent only upon user request.
Beacon Data Packet (34 bytes) Byte No Data Unit/Label Bytes 1 Data type identifier T 2 Sequence Number Hash # 3 Sequence No. 6 Delimiter , 7 Analog Values Solar Cell Voltage mV 10 11 Solar Cell Current mA 14 15 Battery Voltage 18 19 Battery Temp. DegC 22 23 Processor Temp. 26 27 Digital Solar Cell Channel 2 Values(1/0) 1-true 0-false 8 28 Solar Cell Channel 1 29 Solar Cell Channel 0 30 Audio File Played 31 Picture Taken 32 Autonomously Executed Commands 33 Battery Charger On 34 Battery Heater On
Telemetry Data Packet 1 (42 bytes) Byte No Data Unit/Label Bytes 1 Hard State Data Solar Cell Voltage 1 mV 2 3 Solar Cell Voltage 2 5 Solar Cell Voltage 3 7 Solar Cell Voltage 4 9 Solar Cell Voltage 5 11 Solar Cell Voltage 6 13 Solar Cell Current 1 mA 15 Solar Cell Current 2 17 Solar Cell Current 3 19 Solar Cell Current 5 21 Solar Cell Current 6 23 Bus Voltage 1 25 Bus Voltage 2 27 Bus Current 1 29 Bus Current 2 31 Soft State Data Rx VHF packets 33 Sent UHF Packets 35 DTMF Command Rx 38 Rx S-band Packets 41 Sent S-band Packets
Telemetry Data Packet 2 (40 bytes) Byte No Data Unit/Label Bytes 1 Hard State Data Solar Cell Temp 1 DegC 2 3 Solar Cell Temp 2 5 Solar Cell Temp 3 7 Solar Cell Temp 4 9 Solar Cell Temp 5 11 Solar Cell Temp 6 13 Sec Battery Voltage mV 15 Temp 17 Charger Current mA 19 Camera Temp 21 VHF Current 23 UHF Current 25 Processor temp 27 Soft State Data Audio Files Played 29 CW Beacons Sent 31 Digibeacons Sent 33 Seconds Passed 35 Pictures Taken 37 Battery Heater Duty Cycle 39 No. of Autonomously Executed Commands
Design
Code Beacon Input array structure consists of 5 Analog values and an 8-bit Digital value Functions/Macros void BeaconTask(void); // Beacon Task TRY_BCN_PERIOD(unsigned char* period /* Minutes */, unsigned char bcn_interval /* OSTicks */); Waits for a beacon period. Period automatically set to new value if command received from Command_Parse send_tx_bcn(unsigned char *data, unsigned char num_bytes); Sends packet to Packet_Tx for transmission void toAsciiDigit(unsigned int value, ubyte *packet_index; Takes the desired value that is to be converted to ASCII (sequence number/analog values/digital values) and the beacon packet index as arguments Extracts each digit and converts it to ASCII. Each value is converted to ASCII Delimiters (,) are added to distinguish different fields Sequence nos. incremented for each packet Sends final APRS encoded packet to Packet_Tx for transmission
Code Telemetry Defined by 2 packet types Functions/Macros void TelemetryTask(void); // Telemetry Task GET_TLM_CMD(unsigned char* cmd, unsigned char* data, unsigned char* num_bytes); Waits until TELEMETRY_REQUEST command received from Command_Parse *data specifies the packet type (Packet1 or Packet2) send_tx_raw( unsigned char cmd, unsigned char* data, unsigned char num_bytes ); Sends raw unencoded packet to Packet_Tx for KCOM encoding and transmission
Code Array Manager Allows other tasks to read/write values from the Beacon and Telemetry memory arrays Functions/Macros ubyte SetBcnArray(ubyte field, ubyte *value); Sets specified field to *value in Beacon memory array Can either set individual fields in the buffer or the entire array in one function call using BLOCK_SET. Returns UPDATE_NOERR if update successful else returns UPDATE_ERR ubyte GetBcnArray (ubyte field, ubyte *bcn_ptr); Gets the current value of the corresponding field from the Beacon memory buffer Stores it to the address specified by the user (bcn_ptr) Option of getting a single field or the entire memory array (BLOCK_TRANSFER) Returns TRANSFER_NOERR on success else returns TRANSFER_ERR ubyte SetTlmArray (ubyte field, int *value); Similar to SetBcnArray except *value is a 2 byte integer. Used to set fields in global Telemetry buffer ubyte GetTlmArray (ubyte field, int *tlm_ptr); Telemetry counterpart of GetBcnArray. Difference - *tlm_ptr is an int instead of a ubyte
Testing Packet formats and com links tested Debugging mainly done using the library function kysat_printf to compare the packet formats to the required one
Future Goals Status Goals Achieved Beacon packet format and com link between Beacon and Packet_TX functioning. Com link between Telemetry and Packet_TX tested and working. Com link between Command_Parse and Telemetry tested and working. Functions for the Array_Manager complete (untested) Future Goals RTCGetTime function from Cmd_Parse still needs to be tested. Need to test if Array_Manager functions working correctly