

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Satelit siaran publik menggunakan titik akhir aliran data (didemodulasi dan diterjemahkan)
<a name="examples.pbs-dataflow-endpoint-demod-decode"></a>

 Contoh ini dibangun dari analisis yang dilakukan di [JPSS-1 - Public broadcast satellite (PBS) - Evaluasi](examples.md#examples.pbs-definition) bagian panduan pengguna. 

 Untuk melengkapi contoh ini, Anda harus mengasumsikan skenario -- Anda ingin menangkap jalur komunikasi HRD sebagai data siaran langsung yang didemodulasi dan diterjemahkan menggunakan titik akhir aliran data. Contoh ini adalah titik awal yang baik jika Anda berencana untuk memproses data menggunakan perangkat lunak NASA Direct Readout Labs (RT-STPS dan IPOPP). 

## Jalur komunikasi
<a name="examples.pbs-dataflow-endpoint-demod-decode.communication-paths"></a>

 Bagian ini [Rencanakan jalur komunikasi aliran data Anda](getting-started.step2.md) mewakili memulai. Untuk contoh ini, Anda akan membuat dua bagian dalam CloudFormation template Anda: bagian Parameter dan Sumber Daya. 

**catatan**  
 Untuk informasi selengkapnya tentang isi CloudFormation template, lihat [bagian Template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html). 

 Untuk bagian Parameter, Anda akan menambahkan parameter berikut. Anda akan menentukan nilai untuk ini saat membuat tumpukan melalui CloudFormation konsol. 

```
Parameters:
  EC2Key:
    Description: The SSH key used to access the EC2 receiver instance. Choose any SSH key if you are not creating an EC2 receiver instance. For instructions on how to create an SSH key see [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html)
    Type: AWS::EC2::KeyPair::KeyName
    ConstraintDescription: must be the name of an existing EC2 KeyPair.

  ReceiverAMI:
    Description: The Ground Station DDX AMI ID you want to use. Please note that AMIs are region specific. For instructions on how to retrieve an AMI see [https://docs.aws.amazon.com/ground-station/latest/ug/dataflows.ec2-configuration.html#dataflows.ec2-configuration.amis](https://docs.aws.amazon.com/ground-station/latest/ug/dataflows.ec2-configuration.html#dataflows.ec2-configuration.amis)
    Type: AWS::EC2::Image::Id
```

**catatan**  
 Anda **perlu** membuat key pair, dan memberikan nama untuk EC2 `EC2Key` parameter Amazon. Lihat [Membuat key pair untuk EC2 instans Amazon Anda](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html).   
 Selain itu, Anda **harus** memberikan ID AMI **spesifik wilayah** yang benar, saat membuat CloudFormation tumpukan. Lihat [AWS Ground Station Gambar Mesin Amazon (AMIs)](dataflows.ec2-configuration.md#dataflows.ec2-configuration.amis). 

 Cuplikan template yang tersisa termasuk dalam bagian Resources dari template. CloudFormation 

```
Resources:
  # Resources that you would like to create should be placed within the resource section.
```

 Mengingat skenario kami untuk mengirimkan jalur komunikasi tunggal ke sebuah EC2 instance, Anda akan memiliki satu jalur pengiriman sinkron. Per [Pengiriman data sinkron](getting-started.step2.md#getting-started.step2.sync-data-delivery) bagian, Anda harus menyiapkan dan mengonfigurasi EC2 instans Amazon dengan aplikasi titik akhir aliran data, dan membuat satu atau beberapa grup titik akhir aliran data. 

```
  # The EC2 instance that will send/receive data to/from your satellite using AWS Ground Station.
  ReceiverInstance:
    Type: AWS::EC2::Instance
    Properties:
      DisableApiTermination: false
      IamInstanceProfile: !Ref GeneralInstanceProfile
      ImageId: !Ref ReceiverAMI
      InstanceType: m5.4xlarge
      KeyName: !Ref EC2Key
      Monitoring: true
      PlacementGroupName: !Ref ClusterPlacementGroup
      SecurityGroupIds:
        - Ref: InstanceSecurityGroup
      SubnetId: !Ref ReceiverSubnet
      BlockDeviceMappings:
        - DeviceName: /dev/xvda
          Ebs:
            VolumeType: gp2
            VolumeSize: 40
      Tags:
        - Key: Name
          Value: !Join [ "-" , [ "Receiver" , !Ref "AWS::StackName" ] ]
      UserData:
        Fn::Base64:
          |
          #!/bin/bash
          exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
          echo `date +'%F %R:%S'` "INFO: Logging Setup" >&2

          GROUND_STATION_DIR="/opt/aws/groundstation"
          GROUND_STATION_BIN_DIR="${GROUND_STATION_DIR}/bin"
          STREAM_CONFIG_PATH="${GROUND_STATION_DIR}/customer_stream_config.json"

          echo "Creating ${STREAM_CONFIG_PATH}"
          cat << STREAM_CONFIG > "${STREAM_CONFIG_PATH}"
          {
            "ddx_streams": [
              {
                "streamName": "Downlink",
                "maximumWanRate": 4000000000,
                "lanConfigDevice": "lo",
                "lanConfigPort": 50000,
                "wanConfigDevice": "eth1",
                "wanConfigPort": 55888,
                "isUplink": false
              }
            ]
          }
          STREAM_CONFIG

          echo "Waiting for dataflow endpoint application to start"
          while netstat -lnt | awk '$4 ~ /:80$/ {exit 1}'; do sleep 10; done

          echo "Configuring dataflow endpoint application streams"
          python "${GROUND_STATION_BIN_DIR}/configure_streams.py" --configFileName "${STREAM_CONFIG_PATH}"
          sleep 2
          python "${GROUND_STATION_BIN_DIR}/save_default_config.py"

          exit 0
```

```
  # The AWS Ground Station Dataflow Endpoint Group that defines the endpoints that AWS Ground
  # Station will use to send/receive data to/from your satellite.
  DataflowEndpointGroup:
    Type: AWS::GroundStation::DataflowEndpointGroup
    Properties:
      ContactPostPassDurationSeconds: 180
      ContactPrePassDurationSeconds: 120
      EndpointDetails:
        - Endpoint:
            Name: !Join [ "-" , [ !Ref "AWS::StackName" , "Downlink" ] ] # needs to match DataflowEndpointConfig name
            Address:
              Name: !GetAtt ReceiverInstanceNetworkInterface.PrimaryPrivateIpAddress
              Port: 55888
          SecurityDetails:
            SecurityGroupIds:
              - Ref: "DataflowEndpointSecurityGroup"
            SubnetIds:
              - !Ref ReceiverSubnet
            RoleArn: !GetAtt DataDeliveryServiceRole.Arn

  # The security group that the ENI created by AWS Ground Station belongs to.
  DataflowEndpointSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: Security Group for AWS Ground Station registration of Dataflow Endpoint Groups
      VpcId: !Ref ReceiverVPC
      SecurityGroupEgress:
        - IpProtocol: udp
          FromPort: 55888
          ToPort: 55888
          CidrIp: 10.0.0.0/8
          Description: "AWS Ground Station Downlink Stream To 10/8"
        - IpProtocol: udp
          FromPort: 55888
          ToPort: 55888
          CidrIp: 172.16.0.0/12
          Description: "AWS Ground Station Downlink Stream To 172.16/12"
        - IpProtocol: udp
          FromPort: 55888
          ToPort: 55888
          CidrIp: 192.168.0.0/16
          Description: "AWS Ground Station Downlink Stream To 192.168/16"

  # The placement group in which your EC2 instance is placed.
  ClusterPlacementGroup:
    Type: AWS::EC2::PlacementGroup
    Properties:
      Strategy: cluster

  # The security group for your EC2 instance.
  InstanceSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: AWS Ground Station receiver instance security group.
      VpcId: !Ref ReceiverVPC
      SecurityGroupIngress:
        # To allow SSH access to the instance, add another rule allowing tcp port 22 from your CidrIp
        - IpProtocol: udp
          FromPort: 55888
          ToPort: 55888
          SourceSecurityGroupId: !Ref DataflowEndpointSecurityGroup
          Description: "AWS Ground Station Downlink Stream"

  ReceiverVPC:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: "10.0.0.0/16"
      Tags:
        - Key: "Name"
          Value: "AWS Ground Station - PBS to dataflow endpoint Demod Decode Example VPC"
        - Key: "Description"
          Value: "VPC for EC2 instance receiving AWS Ground Station data"

  ReceiverSubnet:
    Type: AWS::EC2::Subnet
    Properties:
      CidrBlock: "10.0.0.0/24"
      Tags:
        - Key: "Name"
          Value: "AWS Ground Station - PBS to dataflow endpoint Demod Decode Example Subnet"
        - Key: "Description"
          Value: "Subnet for EC2 instance receiving AWS Ground Station data"
      VpcId: !Ref ReceiverVPC

  # An ENI providing a fixed IP address for AWS Ground Station to connect to.
  ReceiverInstanceNetworkInterface:
    Type: AWS::EC2::NetworkInterface
    Properties:
      Description: Floating network interface providing a fixed IP address for AWS Ground Station to connect to.
      GroupSet:
        - !Ref InstanceSecurityGroup
      SubnetId: !Ref ReceiverSubnet

  # Attach the ENI to the EC2 instance.
  ReceiverInstanceInterfaceAttachment:
    Type: AWS::EC2::NetworkInterfaceAttachment
    Properties:
      DeleteOnTermination: false
      DeviceIndex: "1"
      InstanceId: !Ref ReceiverInstance
      NetworkInterfaceId: !Ref ReceiverInstanceNetworkInterface

  # The instance profile for your EC2 instance.
  GeneralInstanceProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      Roles:
        - !Ref InstanceRole
```

 Anda juga memerlukan kebijakan, peran, dan profil yang sesuai AWS Ground Station untuk memungkinkan Anda membuat elastic network interface (ENI) di akun Anda. 

```
  # AWS Ground Station assumes this role to create/delete ENIs in your account in order to stream data.
  DataDeliveryServiceRole:
    Type: AWS::IAM::Role
    Properties:
      Policies:
        - PolicyDocument:
            Statement:
              - Action:
                  - ec2:CreateNetworkInterface
                  - ec2:DeleteNetworkInterface
                  - ec2:CreateNetworkInterfacePermission
                  - ec2:DeleteNetworkInterfacePermission
                  - ec2:DescribeSubnets
                  - ec2:DescribeVpcs
                  - ec2:DescribeSecurityGroups
                Effect: Allow
                Resource: '*'
            Version: '2012-10-17'
          PolicyName: DataDeliveryServicePolicy
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
              - groundstation.amazonaws.com
            Action:
            - sts:AssumeRole

  # The EC2 instance assumes this role.
  InstanceRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: "2012-10-17"
        Statement:
          - Effect: "Allow"
            Principal:
              Service:
                - "ec2.amazonaws.com"
            Action:
              - "sts:AssumeRole"
      Path: "/"
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
        - arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role
        - arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy
        - arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM
```

## AWS Ground Station konfigurasi
<a name="examples.pbs-dataflow-endpoint-demod-decode.configs"></a>

 Bagian ini [Buat konfigurasi](getting-started.step3.md) mewakili panduan pengguna. 

 Anda memerlukan *konfigurasi pelacakan untuk mengatur preferensi Anda menggunakan autotrack*. Memilih *PREFERRED* sebagai autotrack dapat meningkatkan kualitas sinyal, tetapi tidak diperlukan untuk memenuhi kualitas sinyal karena kualitas ephemeris JPSS-1 yang memadai. 

```
  TrackingConfig:
    Type: AWS::GroundStation::Config
    Properties:
      Name: "JPSS Tracking Config"
      ConfigData:
        TrackingConfig:
          Autotrack: "PREFERRED"
```

 Berdasarkan jalur komunikasi, Anda harus menentukan konfigurasi untuk mewakili bagian satelit, serta *antenna-downlink-demod-decode*konfigurasi *dataflow-endpoint untuk merujuk ke grup titik akhir aliran* data yang mendefinisikan detail titik akhir. 

**catatan**  
 Untuk detail tentang cara mengatur nilai untuk`DemodulationConfig`, dan`DecodeConfig`, silakan lihat[Antena Downlink Demod Decode Config](how-it-works.config.md#how-it-works.config-antenna-downlink-demod-decode). 

```
  # The AWS Ground Station Antenna Downlink Config that defines the frequency spectrum used to
  # downlink data from your satellite.
  JpssDownlinkDemodDecodeAntennaConfig:
    Type: AWS::GroundStation::Config
    Properties:
      Name: "JPSS Downlink Demod Decode Antenna Config"
      ConfigData:
        AntennaDownlinkDemodDecodeConfig:
          SpectrumConfig:
            CenterFrequency:
              Value: 7812
              Units: "MHz"
            Polarization: "RIGHT_HAND"
            Bandwidth:
              Value: 30
              Units: "MHz"
          DemodulationConfig:
            UnvalidatedJSON: '{
              "type":"QPSK",
              "qpsk":{
                "carrierFrequencyRecovery":{
                  "centerFrequency":{
                    "value":7812,
                    "units":"MHz"
                  },
                  "range":{
                    "value":250,
                    "units":"kHz"
                  }
                },
                "symbolTimingRecovery":{
                  "symbolRate":{
                    "value":15,
                    "units":"Msps"
                  },
                  "range":{
                    "value":0.75,
                    "units":"ksps"
                  },
                  "matchedFilter":{
                    "type":"ROOT_RAISED_COSINE",
                    "rolloffFactor":0.5
                  }
                }
              }
            }'
          DecodeConfig:
            UnvalidatedJSON: '{
              "edges":[
                {
                  "from":"I-Ingress",
                  "to":"IQ-Recombiner"
                },
                {
                  "from":"Q-Ingress",
                  "to":"IQ-Recombiner"
                },
                {
                  "from":"IQ-Recombiner",
                  "to":"CcsdsViterbiDecoder"
                },
                {
                  "from":"CcsdsViterbiDecoder",
                  "to":"NrzmDecoder"
                },
                {
                  "from":"NrzmDecoder",
                  "to":"UncodedFramesEgress"
                }
              ],
              "nodeConfigs":{
                "I-Ingress":{
                  "type":"CODED_SYMBOLS_INGRESS",
                  "codedSymbolsIngress":{
                    "source":"I"
                  }
                },
                "Q-Ingress":{
                  "type":"CODED_SYMBOLS_INGRESS",
                  "codedSymbolsIngress":{
                    "source":"Q"
                  }
                },
                "IQ-Recombiner":{
                  "type":"IQ_RECOMBINER"
                },
                "CcsdsViterbiDecoder":{
                  "type":"CCSDS_171_133_VITERBI_DECODER",
                  "ccsds171133ViterbiDecoder":{
                    "codeRate":"ONE_HALF"
                  }
                },
                "NrzmDecoder":{
                  "type":"NRZ_M_DECODER"
                },
                "UncodedFramesEgress":{
                  "type":"UNCODED_FRAMES_EGRESS"
                }
              }
            }'
```

```
  # The AWS Ground Station Dataflow Endpoint Config that defines the endpoint used to downlink data
  # from your satellite.
  DownlinkDemodDecodeEndpointConfig:
    Type: AWS::GroundStation::Config
    Properties:
      Name: "Aqua SNPP JPSS Downlink Demod Decode Endpoint Config"
      ConfigData:
        DataflowEndpointConfig:
          DataflowEndpointName: !Join [ "-" , [ !Ref "AWS::StackName" , "Downlink" ] ]
          DataflowEndpointRegion: !Ref AWS::Region
```

## AWS Ground Station profil misi
<a name="examples.pbs-dataflow-endpoint-demod-decode.mission-profile"></a>

 Bagian ini [Buat profil misi](getting-started.step4.md) mewakili panduan pengguna. 

 Sekarang setelah Anda memiliki konfigurasi terkait, Anda dapat menggunakannya untuk membangun aliran data. Anda akan menggunakan default untuk parameter yang tersisa. 

```
  # The AWS Ground Station Mission Profile that groups the above configurations to define how to
  # uplink and downlink data to your satellite.
  SnppJpssMissionProfile:
    Type: AWS::GroundStation::MissionProfile
    Properties:
      Name: "37849 SNPP And 43013 JPSS"
      ContactPrePassDurationSeconds: 120
      ContactPostPassDurationSeconds: 60
      MinimumViableContactDurationSeconds: 180
      TrackingConfigArn: !Ref TrackingConfig
      DataflowEdges:
        - Source: !Join [ "/", [ !Ref JpssDownlinkDemodDecodeAntennaConfig, "UncodedFramesEgress" ] ]
          Destination: !Ref DownlinkDemodDecodeEndpointConfig
```

## Menyatukannya
<a name="examples.pbs-dataflow-endpoint-demod-decode.putting-it-together"></a>

 Dengan sumber daya di atas, Anda sekarang memiliki kemampuan untuk menjadwalkan kontak JPSS-1 untuk pengiriman data sinkron dari salah satu onboard Anda. AWS Ground Station [AWS Ground Station Lokasi](aws-ground-station-antenna-locations.md) 

 Berikut ini adalah CloudFormation template lengkap yang mencakup semua sumber daya yang dijelaskan dalam bagian ini digabungkan menjadi satu template yang dapat langsung digunakan CloudFormation. 

 CloudFormation Template bernama `AquaSnppJpss.yml` dirancang untuk memberi Anda akses cepat untuk mulai menerima data untuk satelit Aqua, SNPP, dan JPSS-1/NOAA-20. Ini berisi EC2 instans Amazon dan AWS Ground Station sumber daya yang diperlukan untuk menjadwalkan kontak dan menerima data siaran langsung yang didemodulasi dan diterjemahkan. 

 Jika Aqua, SNPP, JPSS-1/NOAA-20, dan Terra tidak masuk ke akun Anda, lihat. [Satelit onboard](getting-started.step1.md) 

**catatan**  
 Anda dapat mengakses template dengan mengakses bucket Amazon S3 yang melakukan onboarding pelanggan menggunakan kredensi yang valid. AWS Tautan di bawah ini menggunakan bucket Amazon S3 regional. Ubah kode `us-west-2` wilayah untuk mewakili wilayah yang sesuai tempat Anda ingin membuat CloudFormation tumpukan.   
 Selain itu, petunjuk berikut menggunakan YAMAL. Namun, template tersedia dalam format YAMAL dan JSON. Untuk menggunakan JSON, ganti ekstensi `.yml` file dengan `.json` saat mengunduh templat. 

 Untuk mengunduh templat menggunakan AWS CLI, gunakan perintah berikut: 

```
aws s3 cp s3://groundstation-cloudformation-templates-us-west-2/AquaSnppJpss.yml .
```

 Anda dapat melihat dan mengunduh templat di konsol dengan menavigasi ke URL berikut di browser Anda: 

```
https://s3.console.aws.amazon.com/s3/object/groundstation-cloudformation-templates-us-west-2/AquaSnppJpss.yml
```

 Anda dapat menentukan template secara langsung CloudFormation menggunakan link berikut: 

```
https://groundstation-cloudformation-templates-us-west-2.s3.us-west-2.amazonaws.com/AquaSnppJpss.yml
```

**Sumber daya tambahan apa yang ditentukan oleh template?**

`AquaSnppJpss`Template mencakup sumber daya tambahan berikut:
+ (Opsional) **CloudWatch Event Triggers** - AWS Lambda Fungsi yang dipicu menggunakan CloudWatch Peristiwa yang dikirim oleh AWS Ground Station sebelum dan sesudah kontak. AWS Lambda Fungsi akan memulai dan secara opsional menghentikan Instance Penerima Anda. 
+ (Opsional) **EC2 Verifikasi untuk Kontak** - Opsi untuk menggunakan Lambda untuk menyiapkan sistem verifikasi EC2 instans Amazon Anda untuk kontak dengan notifikasi SNS. Penting untuk dicatat bahwa ini mungkin dikenakan biaya tergantung pada penggunaan Anda saat ini. 
+  **Ground Station Amazon Machine Image Retrieval Lambda** - Opsi untuk memilih perangkat lunak apa yang diinstal dalam instans Anda dan AMI pilihan Anda. Opsi perangkat lunak termasuk `DDX 2.6.2 Only` dan`DDX 2.6.2 with qRadio 3.6.0`. Jika Anda ingin menggunakan Wideband DiGIF Data Delivery dan Agen, AWS Ground Station silakan lihat. [Satelit siaran publik menggunakan AWS Ground Station Agen (pita lebar)](examples.pbs-agent.md) Opsi ini akan terus berkembang saat pembaruan dan fitur perangkat lunak tambahan dirilis. 
+  **Profil misi tambahan - Profil** misi untuk satelit siaran publik tambahan (Aqua, SNPP, dan Terra). 
+  Konfigurasi **antena-downlink tambahan - Konfigurasi** downlink antena untuk satelit siaran publik tambahan (Aqua, SNPP, dan Terra). 

 Nilai dan parameter untuk satelit dalam template ini sudah terisi. Parameter ini memudahkan Anda untuk AWS Ground Station segera menggunakannya dengan satelit ini. Anda tidak perlu mengkonfigurasi nilai Anda sendiri untuk digunakan AWS Ground Station saat menggunakan template ini. Namun, Anda dapat menyesuaikan nilai untuk membuat template berfungsi untuk kasus penggunaan Anda. 

 **Di mana saya menerima data saya?** 

 Grup titik akhir aliran data diatur untuk menggunakan antarmuka jaringan instance penerima yang dibuat oleh bagian dari template. Instance penerima menggunakan aplikasi titik akhir aliran data untuk menerima aliran data dari AWS Ground Station port yang ditentukan oleh titik akhir aliran data. Setelah diterima, data tersedia untuk konsumsi melalui port UDP 50000 pada adaptor loopback dari instance penerima. Untuk informasi selengkapnya tentang menyiapkan grup titik akhir aliran data, lihat. [ AWS::GroundStation::DataflowEndpointGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-groundstation-dataflowendpointgroup.html) 