

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Trasmissione satellitare pubblica che utilizza un endpoint di flusso di dati (demodulato e decodificato)
<a name="examples.pbs-dataflow-endpoint-demod-decode"></a>

 Questo esempio si basa sull'analisi effettuata nella sezione della guida per l'utente. [JPSS-1 - Trasmissione pubblica via satellite (PBS) - Valutazione](examples.md#examples.pbs-definition) 

 Per completare questo esempio, è necessario ipotizzare uno scenario: si desidera acquisire il percorso di comunicazione HRD come dati di trasmissione diretta demodulati e decodificati utilizzando un endpoint di flusso di dati. Questo esempio è un buon punto di partenza se prevedi di elaborare i dati utilizzando il software NASA Direct Readout Labs (RT-STPS e IPOPP). 

## Percorsi di comunicazione
<a name="examples.pbs-dataflow-endpoint-demod-decode.communication-paths"></a>

 Questa sezione rappresenta una [Pianifica i percorsi di comunicazione del flusso di dati](getting-started.step2.md) guida introduttiva. Per questo esempio, creerai due sezioni nel tuo CloudFormation modello: le sezioni Parametri e Risorse. 

**Nota**  
 Per ulteriori informazioni sul contenuto di un CloudFormation modello, consulta [Sezioni relative ai modelli](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html). 

 Nella sezione Parametri, aggiungerai i seguenti parametri. Specificherai i valori per questi quando creerai lo stack tramite la CloudFormation console. 

```
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
```

**Nota**  
 **Devi** creare una key pair e fornire il nome per il EC2 `EC2Key` parametro Amazon. Vedi [Creare una coppia di key pair per la tua EC2 istanza Amazon](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html).   
 Inoltre, **dovrai** fornire l'ID AMI **specifico della regione** corretto al momento della creazione dello CloudFormation stack. Per informazioni, consulta [AWS Ground Station Immagini di macchine Amazon (AMIs)](dataflows.ec2-configuration.md#dataflows.ec2-configuration.amis). 

 I frammenti di modello rimanenti appartengono alla sezione Risorse del modello. CloudFormation 

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

 Considerando lo scenario in cui prevediamo di fornire un unico percorso di comunicazione a un' EC2 istanza, disporrete di un unico percorso di consegna sincrono. [Distribuzione sincrona dei dati](getting-started.step2.md#getting-started.step2.sync-data-delivery)In base alla sezione, devi configurare un' EC2 istanza Amazon con un'applicazione endpoint dataflow e creare uno o più gruppi di endpoint dataflow. 

```
  # 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
```

 Avrai anche bisogno delle politiche, dei ruoli e dei profili appropriati AWS Ground Station per consentire la creazione di un'elastic network interface (ENI) nel tuo account. 

```
  # 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 configurazioni
<a name="examples.pbs-dataflow-endpoint-demod-decode.configs"></a>

 Questa sezione rappresenta la [Crea configurazioni](getting-started.step3.md) guida per l'utente. 

 Avrai bisogno di un *tracking-config* per impostare le tue preferenze sull'uso dell'autotrack. La selezione di *PREFERRED* come autotrack può migliorare la qualità del segnale, ma non è necessario soddisfare la qualità del segnale perché la qualità delle effemeridi JPSS-1 è sufficiente. 

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

 In base al percorso di comunicazione, è necessario definire una configurazione per rappresentare la parte satellitare, nonché una *antenna-downlink-demod-decode*configurazione *dataflow-endpoint per fare riferimento al gruppo di endpoint del flusso di dati che definisce i dettagli dell'endpoint*. 

**Nota**  
 Per i dettagli su come impostare i valori per e, consulta. `DemodulationConfig` `DecodeConfig` [Config di decodifica demodulazione downlink antenna](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 profilo della missione
<a name="examples.pbs-dataflow-endpoint-demod-decode.mission-profile"></a>

 Questa sezione rappresenta [Crea un profilo di missione](getting-started.step4.md) la guida per l'utente. 

 Ora che hai le configurazioni associate, puoi usarle per costruire il flusso di dati. Utilizzerai le impostazioni predefinite per i parametri rimanenti. 

```
  # 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
```

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

 Con le risorse di cui sopra, ora avete la possibilità di pianificare i contatti JPSS-1 per la consegna sincrona dei dati da qualsiasi dispositivo integrato. AWS Ground Station [AWS Ground Station Sedi](aws-ground-station-antenna-locations.md) 

 Di seguito è riportato un CloudFormation modello completo che include tutte le risorse descritte in questa sezione combinate in un unico modello che può essere utilizzato direttamente. CloudFormation

 Il CloudFormation modello denominato `AquaSnppJpss.yml` è progettato per darti un accesso rapido per iniziare a ricevere dati per i satelliti Aqua, SNPP e JPSS-1/NOAA-20. Contiene un' EC2 istanza Amazon e le AWS Ground Station risorse necessarie per pianificare i contatti e ricevere dati di trasmissione diretta demodulati e decodificati. 

 Se Aqua, SNPP, JPSS-1/NOAA-20 e Terra non sono presenti nel tuo account, consulta. [Satellite a bordo](getting-started.step1.md) 

**Nota**  
 Puoi accedere al modello accedendo al bucket Amazon S3 per l'onboarding del cliente utilizzando credenziali valide. AWS I collegamenti seguenti utilizzano un bucket Amazon S3 regionale. Modifica il codice `us-west-2` regionale per rappresentare la regione corrispondente in cui desideri creare lo CloudFormation stack.   
 Inoltre, le seguenti istruzioni utilizzano YAML. Tuttavia, i modelli sono disponibili sia in formato YAML che JSON. Per usare JSON, sostituisci l'estensione del `.yml` file con `.json` quando scarichi il modello. 

 Per scaricare il modello utilizzando AWS CLI, usa il seguente comando: 

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

 È possibile scaricare e visualizzare il modello nella console spostandosi all’URL seguente nel browser: 

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

 È possibile specificare il modello direttamente CloudFormation utilizzando il seguente link: 

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

**Quali risorse aggiuntive definisce il modello?**

Il `AquaSnppJpss` modello include le seguenti risorse aggiuntive:
+ (Facoltativo) **CloudWatch Event Triggers**: AWS Lambda funzione che viene attivata utilizzando CloudWatch gli eventi inviati AWS Ground Station prima e dopo un contatto. La AWS Lambda funzione avvierà e, facoltativamente, interromperà l'istanza del ricevitore. 
+ (Facoltativo) **EC2 Verifica per i contatti**: l'opzione di utilizzare Lambda per configurare un sistema di verifica delle EC2 istanze Amazon per i contatti con notifica SNS. È importante notare che ciò potrebbe comportare costi a seconda dell'utilizzo corrente. 
+  **Ground Station Amazon Machine Image Retrieval Lambda**: l'opzione per selezionare il software installato nell'istanza e l'AMI preferita. Le opzioni software includono e. `DDX 2.6.2 Only` `DDX 2.6.2 with qRadio 3.6.0` Se desideri utilizzare DigiF Data Delivery a banda larga e l' AWS Ground Station agente, consulta. [Trasmissione pubblica via satellite che utilizza AWS Ground Station Agent (banda larga)](examples.pbs-agent.md) Queste opzioni continueranno ad espandersi man mano che verranno rilasciati aggiornamenti e funzionalità software aggiuntivi. 
+  Profili di **missione aggiuntivi: profili** di missione per altri satelliti di trasmissione pubblica (Aqua, SNPP e Terra). 
+  **Configurazioni antenna-downlink aggiuntive - Configurazioni downlink** dell'antenna per altri satelliti di trasmissione pubblica (Aqua, SNPP e Terra). 

 I valori e i parametri per i satelliti in questo modello sono già popolati. Questi parametri ne facilitano l'uso immediato con questi satelliti. AWS Ground Station Non è necessario configurare i propri valori per utilizzarli AWS Ground Station quando si utilizza questo modello. Tuttavia, è possibile personalizzare i valori in modo che il modello funzioni per il caso d'uso. 

 **Dove ricevo i miei dati?** 

 Il gruppo endpoint del flusso di dati è configurato per utilizzare l'interfaccia di rete dell'istanza del ricevitore creata come parte del modello. L'istanza del ricevitore utilizza un'applicazione dataflow endpoint per ricevere il flusso di dati dalla AWS Ground Station porta definita dall'endpoint dataflow. Una volta ricevuti, i dati sono disponibili per il consumo tramite la porta UDP 50000 sull'adattatore di loopback dell'istanza del ricevitore. Per ulteriori informazioni sulla configurazione di un gruppo di endpoint dataflow, consulta. [ AWS::GroundStation::DataflowEndpointGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-groundstation-dataflowendpointgroup.html) 