Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

Commit

Permalink
initial dcs radio station implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
rkusa committed Jan 17, 2019
1 parent 644a4f6 commit cd43a5f
Show file tree
Hide file tree
Showing 35 changed files with 489 additions and 1,650 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
target
**/*.rs.bk
Cargo.lock
/mod/Mods/tech/DATIS/bin/datis.dll
example
62 changes: 0 additions & 62 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,3 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Added radio information to the initial SRS sync message #10

## [0.6.0] - 2018-12-04
### Changed
- Reduced logging output (to started, stopped and error messages)

## [0.5.0] - 2018-11-28
### Added
- Added QFE in inHg and hPa to the ATIS report remarks

### Fixed
- Fixed reading runways with a _L_ or _R_ suffix

## [0.4.4] - 2018-11-21
### Fixed
- Properly rotate and normalize the DCS reported wind direction

## [0.4.3] - 2018-11-11
### Fixed
- Fixed active runway calculation

## [0.4.2] - 2018-11-07
### Fixed
- Pressure and temperature readings should now also work when the server does not hit the "Briefing" button
- SRS broadcasts should now always be stopped when the mission is stopped

## [0.4.1] - 2018-11-04
### Fixed
- Properly handle and report Gcloud TTS API errors (the previous error message was not useful at all, see #8)

## [0.4.0] - 2018-11-03
### Added
- Added option to setup ATIS stations by [adding static units](https://github.com/rkusa/DATIS#mission-setup) with a specific naming scheme to the mission
- Possibility to use a different voice per station

### Fixed
- TTS should now properly read ZERO and not "o"
- Pressure and temperature readings fixed for multiplayer servers (was only working correctly in SP)

### Changed
- Added "Cloud conditions" in front of the cloud report
- Added longer breaks between the different report parts
- Skip the "DECIMAL" when calling out the altimeter setting

## [0.3.0] - 2018-10-24
### Changed
- Extracted Google Cloud Access Key into "DCS ATIS" option specials menu

## [0.2.1] - 2018-10-12
### Fixed
- reverted most phonetic number replacements (TTL handles normal numbers fine)

## [0.2.0] - 2018-10-12
### Added
- visibility report
- clouds report

### Fixed
- QNH properly read at ground level
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[workspace]
members = [
"datis",
"drs-module",
"drs-player",
"drs-cmd",
]
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2018 Markus Ast
Copyright (c) 2019 Markus Ast

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
13 changes: 0 additions & 13 deletions Makefile

This file was deleted.

104 changes: 17 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,28 @@
# DATIS
# DCS Radio Station

DCS World Automatic Terminal Information Service (ATIS) broadcasted though [Simple Radio Standalone](https://github.com/ciribob/DCS-SimpleRadioStandalone).
Broadcast audio files (ogg/opus) to DCS World's [Simple Radio Standalone](https://github.com/ciribob/DCS-SimpleRadioStandalone).

**Features:** Automatically starts within DCS, extracts weather information from the currently running mission, generates an ATIS report, converts it to speech (using Google's Text-to-Speech cloud service) and broadcasts it through SRS.
[Changelog](./CHANGELOG.md) | [Prebuild Releases](https://github.com/rkusa/dcs-radio-station/releases)

[Changelog](./CHANGELOG.md) | [Prebuild Releases](https://github.com/rkusa/DATIS/releases)
## Sub-Projects

Example Report:
- [**drs-cmd**](./drs-cmd) - a command line tool to start a radio station from outside DCS

Example Usage:

```bash
.\dcs-radio-station.exe .\audio-files
```

> This is Batumi information Alpha.
> Runway in use is 3 1.
> Wind ZERO 4 1 at 8 knots.
> Visibility 4 3.
> Cloud conditions scattered ZERO, rain.
> Temperature 2 3 celcius.
> ALTIMETER 2 NINER 5 3.
> REMARKS 1 ZERO ZERO ZERO hectopascal.
> End information Alpha.
- [**drs-module**](./drs) - a Lua module that can be loaded from DCS to start a station from inside a mission (not ready yet)
- [**drs-player**](./drs-player) - the actual functionality, which is used by the sub-projects above

## Audio Format

## Installation
**Audio files have to be of the format OGG/OPUS (not OGG/VORBIS)!**

_Before you start, be aware that this mod requires a Google Cloud account._

Either [build it](#build) yourself and use the content inside the `mod` directory or use the prebuild mod from one of the [releases](https://github.com/rkusa/DATIS/releases).

1. Copy the content (`Mods` and `Scripts` directory) into `Saved Games\DCS.openbeta\`.
2. Go to https://console.cloud.google.com/apis/credentials and create an API key and restrict API access to Google Text-to-Speech
3. Open DCS go to OPTIONS -> SPECIAL -> DCS ATIS, enter the API key into "Google Cloud Access Key" textfield and save

Once you start a mission that contains a pattern as described in the next section, DATIS runs automatically (expects a SRS server to run locally on the default SRS ports).

If the ATIS is not working, you might find some helpful information in the log file at `DCS.openbeta\Logs\DATIS.log`.

## Mission Setup

There are two methods to add an ATIS station. The first method is easier to setup, but the second one will get more configuration options in the future.

### Mission Situation

The first method is to add the following text pattern as often to the mission situation as you like.

```
ATIS {Airfield} {ATIS Frequency}
```

Examples:

```
ATIS Kutaisi 251.000
ATIS Batumi 131.5
ATIS Senaki-Kolkhi 145
```

If you want the ATIS station's report to also include a traffic frequency, add it with the following pattern to the mission briefing as well.

```
TRAFFIC {Airfield} {Traffic Frequency}
```

### Using Static Units

The second method is to add one static unit per ATIS station to the mission. A could fit could be something like a communication tower. The key to get ATIS working, is to name the static unit using the following pattern:

(`{}` denotes a part that has to be replaced with a proper value and `[]` denotes an optional part)

```
ATIS {Airfield} {ATIS Frequency}[, TRAFFIC {TRAFFIC Frequency}][, VOICE {VOICE NAME}]
```

Available voices are: `en-US-Standard-B`, `en-US-Standard-C` (current default), `en-US-Standard-D`, `en-US-Standard-E`, `en-US-Wavenet-A`, `en-US-Wavenet-B`, `en-US-Wavenet-C`, `en-US-Wavenet-D`, `en-US-Wavenet-E`, `en-US-Wavenet-F` _(a bit down [on this page](https://cloud.google.com/text-to-speech/) is a widget where the different voices can easily be tested)_

Keep in mind that `en-US-Wavenet-*` voices come with a smaller free quota (see [Gcloud TTS pricing](https://cloud.google.com/text-to-speech/pricing)).

Examples:

```
ATIS Batumi 131.5
ATIS Kutaisi 251.000, TRAFFIC 252.000
ATIS Kutaisi 251.000, VOICE en-US-Standard-E
ATIS Kutaisi 251.000, TRAFFIC 252.000, VOICE en-US-Standard-E
```

![Example](./docs/static.jpg)

## Build

Instead of building you can also use the prebuild mod from one of the [releases](https://github.com/rkusa/DATIS/releases).

Build with [Rust nightly](https://rustup.rs/):

```
make release
```
Instructions to convert audio files to OGG/OPUS:
- [using VLC](./docs/convert-with-vlc.md)

## License

Expand Down
Loading

0 comments on commit cd43a5f

Please sign in to comment.