Skip to content
uvsqsat.ksy 49.9 KiB
Newer Older
---
meta:
  id: uvsqsat
  endian: be
doc: |
xtof's avatar
xtof committed
  : UVSQsat telemetry description file 
xtof's avatar
xtof committed
  : Version 0.2.8
xtof's avatar
xtof committed
  : reference documentation 
  :      UVSQsat-Beacon description for web site 
  :  
  : This ksy file is used for different automatic code generation 
  :    - ksy file to programming language thanks o ksy compiler 
       - ksy file to graphwiz document thnaks to ksy compiler 
       - Ksy file to java textual display files thanks to JOSAST GeneratePOJOfromKSY tool (experimental)
       - Ksy file to FXML files and associated java files file thanks to JOSAST GeneratePOJOfromKSY tool (experimental)
       
  : Writing rules should be respected (see JOSAST project)
  :   - for interpreted value, variable should finish with 
  :      _raw if no interpretation is done 
  :      _c, _ma _v _dbm _mw according to the interpreted value 
  :   - the name of the interpreted value should be close to the displaed name (to limit rework)
  :      _c, _ma _v _dbm _mw are automaticaly converted to (C) (mA) (dbm) (mW)
  :
  :field dest_callsign: ax25_frame.ax25_header.dest_callsign_raw.callsign_ror.callsign
  :field src_callsign: ax25_frame.ax25_header.src_callsign_raw.callsign_ror.callsign
  :field src_ssid: ax25_frame.ax25_header.src_ssid_raw.ssid
  :field dest_ssid: ax25_frame.ax25_header.dest_ssid_raw.ssid
  :field ctl: ax25_frame.ax25_header.ctl
  :field pid: ax25_frame.payload.pid
  
xtof's avatar
xtof committed
  

seq:
  - id: ax25_frame
    type: ax25_frame
    doc-ref: 'https://www.tapr.org/pub_ax25.html'

types:
  ax25_frame:
    seq:
      - id: ax25_header
        type: ax25_header
      - id: payload
        type:
          switch-on: ax25_header.ctl & 0x13
          cases:
            0x03: ui_frame
            0x13: ui_frame
            0x00: i_frame
            0x02: i_frame
            0x10: i_frame
            0x12: i_frame
xtof's avatar
xtof committed
            _: i_frame
            # 0x11: s_frame

  ax25_header:
    seq:
      - id: dest_callsign_raw
        type: callsign_raw
      - id: dest_ssid_raw
        type: ssid_mask
      - id: src_callsign_raw
        type: callsign_raw
      - id: src_ssid_raw
        type: ssid_mask
      - id: ctl
        type: u1

  callsign_raw:
    seq:
      - id: callsign_ror
        process: ror(1)
        size: 6
        type: callsign

  callsign:
    seq:
      - id: callsign
        type: str
        encoding: ASCII
        size: 6

  ssid_mask:
    seq:
      - id: ssid_mask
        type: u1
    instances:
      ssid:
        value: (ssid_mask & 0x0f) >> 1

  i_frame:
    seq:
      - id: pid
        type: u1
      - id: ax25_info
        size-eos: true

  ui_frame:
    seq:
      - id: pid
        type: u1
      - id: packet_primary_header
        type: packet_primary_header
      - id: packet_secondary_header
        type: packet_secondary_header
      - id: tlm
        type:
          switch-on: packet_secondary_header.sid
          cases:
            0x0E: amsat_ascii
            0x0F: beacon
            0x10: ants_hk
            0x11: obc_status
xtof's avatar
xtof committed
            0x12: obc_hk
            0x13: mainboard_all_science
            0x14: mainboard_hk
xtof's avatar
xtof committed
            0x15: ieps_hk_status
xtof's avatar
xtof committed
            0x17: imtq_hk 
            0x18: trxvutx_hk
xtof's avatar
xtof committed
            _: msg_or_unknow
            
      - id: ax25_info
        size-eos: true
xtof's avatar
xtof committed
# for command status and other message not recognised  
  msg_or_unknow:
    seq:
      - id: data
        size-eos: true
xtof's avatar
xtof committed
    instances:
     data_byte:
      value: data
xtof's avatar
xtof committed
        
# CCDS - primary packet header 
  packet_primary_header:
    seq:
      - id: packet_version_number
        type: b3
      - id: packet_id_packet_type
        type: b1
      - id: packet_id_secondary_header_flag
        type: b1
      - id: packet_id_application_process_id
        type: b11 
      - id: packet_sequence_control_secquence_flag
        type: b2
      - id: packet_sequence_control_count_or_name
        type: b14
      - id: packet_data_length
        type: u2
xtof's avatar
xtof committed
        
# CCDS - secondary  packet header 
  packet_secondary_header:
    seq:
      - id:  tm_packet_pus_version_number
        type: b4
      - id: spacecraft_time_reference_status
        type: b4
      - id: service_type_id
        type: u1
      - id: message_subtype_id
        type: u1
      - id: message_type_counter
        type: u2
      - id: destination_id
        type: u2
      - id: time
        type: u4
      - id: dummy1 # to verify 
      - id: dummy2 # to verify 
xtof's avatar
xtof committed
      - id: sid # used to identify the frame type
xtof's avatar
xtof committed
################################################################################
#
#   Ants Hk
#
################################################################################
  ants_hk:
    seq:
      - id: side_a_ants_temperature
        type: u2
      - id: side_a_ants_deployment_status
        type: u2
      - id: side_a_ants_uptime
        type: u4
      - id: side_a_deployment_count_antenna_1
        type: u1
      - id: side_a_deployment_count_antenna_2
        type: u1
      - id: side_a_deployment_count_antenna_3
        type: u1
      - id: side_a_deployment_count_antenna_4
        type: u1
      - id: side_a_deployment_time_antenna_1
        type: u2
      - id: side_a_deployment_time_antenna_2
        type: u2
Loading full blame...