Skip to content

Commit

Permalink
refactor: rename old project name references
Browse files Browse the repository at this point in the history
  • Loading branch information
pepperoni505 committed Mar 1, 2024
1 parent 3c51d2a commit 867ae07
Show file tree
Hide file tree
Showing 134 changed files with 3,905 additions and 3,905 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Create env file
run: |
touch .env
echo NAVDATA_SIGNED_URL=${{ secrets.NAVDATA_SIGNED_URL }} >> .env
echo NAVIGATION_DATA_SIGNED_URL=${{ secrets.NAVIGATION_DATA_SIGNED_URL }} >> .env
- name: Build WASM module
run: npm run build:wasm-workflow
Expand All @@ -72,5 +72,5 @@ jobs:
- name: Upload WASM module to GitHub
uses: actions/upload-artifact@v4
with:
name: msfs_navdata_interface.wasm
path: ./out/msfs_navdata_interface.wasm
name: msfs_navigation_data_interface.wasm
path: ./out/msfs_navigation_data_interface.wasm
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Pre-Release
uses: softprops/action-gh-release@v1
with:
files: ./out/msfs_navdata_interface.wasm
files: ./out/msfs_navigation_data_interface.wasm
prerelease: true
generate_release_notes: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./out/msfs_navdata_interface.wasm
files: ./out/msfs_navigation_data_interface.wasm
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ _PackageInt
.rollup.cache
tsconfig.tsbuildinfo
.vs
examples/aircraft/PackageSources/html_ui/Pages/VCockpit/Instruments/Navigraph/NavdataInterfaceSample
examples/aircraft/PackageSources/SimObjects/Airplanes/Navigraph_Navdata_Interface_Aircraft/panel/msfs_navdata_interface.wasm
examples/aircraft/PackageSources/html_ui/Pages/VCockpit/Instruments/Navigraph/NavigationDataInterfaceSample
examples/aircraft/PackageSources/SimObjects/Airplanes/Navigraph_Navigation_Data_Interface_Aircraft/panel/msfs_navigation_data_interface.wasm
out

# Rust
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Navigraph Navdata Interface in MSFS
# Navigraph Navigation Data Interface in MSFS

This is a barebones implementation to be able to download up-to-date Navigraph navdata into MSFS (more specifically into the `work` folder of the aircraft).
This is a barebones implementation to be able to download up-to-date Navigraph navigation data into MSFS (more specifically into the `work` folder of the aircraft).

Documentation on the events used on the CommBus is located [here](/DOCS.md)

Expand All @@ -9,26 +9,26 @@ Documentation on the events used on the CommBus is located [here](/DOCS.md)
Here's an overview on the structure of this repository, which is designed to be as simple as possible to use

- `examples/`
- Contains sample implementations for using the navdata interface
- Contains sample implementations for using the navigation data interface
- `aircraft/` includes a base aircraft to test in the sim
- `gauge/` includes a very simple TypeScript instrument to communicate with the WASM module
- `src/`
- `database` Includes rust source code for interfacing with a DFD sqlite file (not WASM specific)
- `js` Includes source code for the JS interface for using the sdk
- `test` Includes code for testing the JS and Rust code using a Node runtime
- `wasm` includes the Rust source code for the WASM module which handles the downloading of the databse file, and interfacing with the database implementation
- `wasm` includes the Rust source code for the WASM module which handles the downloading of the database file, and interfacing with the database implementation

## Including in Your Aircraft

1. You'll need to either build the WASM module yourself (not recommended, but documented further down) or download it from [the latest release](https://github.com/Navigraph/msfs-navdata-interface/releases) (alternatively you can download it off of a commit by looking at the uploaded artifacts).
1. You'll need to either build the WASM module yourself (not recommended, but documented further down) or download it from [the latest release](https://github.com/Navigraph/msfs-navigation-data-interface/releases) (alternatively you can download it off of a commit by looking at the uploaded artifacts).
2. Add the WASM module into your `panel` folder in `PackageSources`
3. Add the following entry into `panel.cfg` (make sure to replace `NN` with the proper `VCockpit` ID):
```
[VCockpitNN]
size_mm=0,0
pixel_size=0,0
texture=NO_TEXTURE
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=msfs_navdata_interface.wasm&wasm_gauge=navdata_interface,0,0,1,1
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=msfs_navigation_data_interface.wasm&wasm_gauge=navigation_data_interface,0,0,1,1
```
- Note that if you already have a `VCockpit` with `NO_TEXTURE` you can just add another `htmlgauge` to it, while making sure to increase the index

Expand All @@ -41,18 +41,18 @@ Before building, make sure you have properly created and set an `.env` file in `
3. Run `npm i` the first time you build, in order to install dependencies
4. Run `npm run build` to build into the `PackageSources` folder of the aircraft sample (or `npm run dev` to build into the `Packages` folder of the aircraft and listen to changes in the source).
5. Make sure the WASM module is included in the `panel` folder! Look at either [Including in Your Aircraft](#including-in-your-aircraft) or [Building the WASM Module Yourself](#building-the-wasm-module-yourself) for info on that
6. Open the `examples/aircraft/NavdataInterfaceAircraftProject.xml` file in the simulator and build there
6. Open the `examples/aircraft/NavigationDataInterfaceAircraftProject.xml` file in the simulator and build there

## Building the WASM Module Yourself

1. [Download](https://www.docker.com/products/docker-desktop/) Docker Desktop
2. Run `npm run build:wasm` (must be on Windows)
- This will take a while to download and build the first time, but subsequent runs will be quicker
3. The compiled WASM module will be copied to `out` **and** `examples/aircraft/PackageSources/SimObjects/Airplanes/Navigraph_Navdata_Interface_Aircraft/panel`
3. The compiled WASM module will be copied to `out` **and** `examples/aircraft/PackageSources/SimObjects/Airplanes/Navigraph_Navigation_Data_Interface_Aircraft/panel`

## Interfacing with the navdata gauge manually
## Interfacing with the gauge manually

The navdata interface acts as its own WASM gauge in sim, so in order to communicate with it, you must use the [CommBus](https://docs.flightsimulator.com/html/Programming_Tools/WASM/Communication_API/Communication_API.htm).
The navigation data interface acts as its own WASM gauge in sim, so in order to communicate with it, you must use the [CommBus](https://docs.flightsimulator.com/html/Programming_Tools/WASM/Communication_API/Communication_API.htm).

The gauge communicates using the following event names:

Expand Down
6 changes: 3 additions & 3 deletions docs/RFC 001.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Status: Active

## Problem

Accessing Navigraph's navdata in Microsoft Flight Simulator has always been challenging due to the limitations of the JavaScript and Webassembly APIs. However, with the recent addition of the Communications API, allowing different WASM modules and Coherent pages to interact with each other, this has become possible.
Accessing Navigraph's navigation data in Microsoft Flight Simulator has always been challenging due to the limitations of the JavaScript and Webassembly APIs. However, with the recent addition of the Communications API, allowing different WASM modules and Coherent pages to interact with each other, this has become possible.

Navigraph has decided to use an architecture consisting of a wasm module whose job it is to download navdata databases from the internet, and to query them. This means an API must be designed and implemented to best cater to the needs of aircraft developers.
Navigraph has decided to use an architecture consisting of a wasm module whose job it is to download navigation data databases from the internet, and to query them. This means an API must be designed and implemented to best cater to the needs of aircraft developers.

This RFC will outline the following:

Expand All @@ -20,7 +20,7 @@ This RFC will outline the following:

## Anti-Goals

This interface will not be designed for use in parallel with in sim data, it is meant to provide the best experience possible with Navigraph's navdata capabilities. This interface will only be providing data from Navigraph's databases.
This interface will not be designed for use in parallel with in sim data, it is meant to provide the best experience possible with Navigraph's navigation data capabilities. This interface will only be providing data from Navigraph's databases.

This interface is also not designed for use outside of Microsoft Flight Simulator and is not designed (as of now) with anything other than the Flight Management System in mind.

Expand Down
2 changes: 1 addition & 1 deletion env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ declare namespace NodeJS {
interface ProcessEnv {
// For test running
// Must be a client which supports password auth grants
NAVDATA_SIGNED_URL: string
NAVIGATION_DATA_SIGNED_URL: string
}
}
11 changes: 0 additions & 11 deletions examples/aircraft/NavdataInterfaceAircraftProject.xml

This file was deleted.

11 changes: 11 additions & 0 deletions examples/aircraft/NavigationDataInterfaceAircraftProject.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Version="2" Name="NavigationDataInterfaceAircraftProject" FolderName="Packages" PublishingGroupFolderName="PublishingGroupsContent" MetadataFolderName="PackagesMetadata" PublishingGroupMetadataFolderName="PublishingGroupsMetadata">
<OutputDirectory>.</OutputDirectory>
<TemporaryOutputDirectory>_PackageInt</TemporaryOutputDirectory>
<PublishingGroupTemporaryOutputDirectory>_PublishingGroupInt</PublishingGroupTemporaryOutputDirectory>
<Packages>
<Package>PackageDefinitions\navigraph-aircraft-navigation-data-interface-sample.xml</Package>
</Packages>
<PublishingGroups/>
</Project>

Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<AssetPackage Version="0.1.0">
<ItemSettings>
<ContentType>AIRCRAFT</ContentType>
<Title>Navigraph Navdata Interface Sample Aircraft</Title>
<Manufacturer>My Manufacturer</Manufacturer>
<Creator>Navigraph</Creator>
</ItemSettings>
<Flags>
<VisibleInStore>true</VisibleInStore>
<CanBeReferenced>true</CanBeReferenced>
</Flags>
<AssetGroups>
<AssetGroup Name="ContentInfo">
<Type>Copy</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageDefinitions\navigraph-aircraft-navdata-interface-sample\ContentInfo\</AssetDir>
<OutputDir>ContentInfo\navigraph-aircraft-navdata-interface-sample\</OutputDir>
</AssetGroup>
<AssetGroup Name="Data">
<Type>Copy</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageSources\Data\</AssetDir>
<OutputDir>Data\</OutputDir>
</AssetGroup>
<AssetGroup Name="SimObject">
<Type>SimObject</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageSources\SimObjects\Airplanes\Navigraph_Navdata_Interface_Aircraft\</AssetDir>
<OutputDir>SimObjects\Airplanes\Navigraph_Navdata_Interface_Aircraft\</OutputDir>
</AssetGroup>
<AssetGroup Name="html_ui">
<Type>Copy</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageSources\html_ui\</AssetDir>
<OutputDir>html_ui\</OutputDir>
</AssetGroup>
</AssetGroups>
</AssetPackage>

<?xml version="1.0" encoding="utf-8"?>
<AssetPackage Version="0.1.0">
<ItemSettings>
<ContentType>AIRCRAFT</ContentType>
<Title>Navigraph Navigation Data Interface Sample Aircraft</Title>
<Manufacturer>My Manufacturer</Manufacturer>
<Creator>Navigraph</Creator>
</ItemSettings>
<Flags>
<VisibleInStore>true</VisibleInStore>
<CanBeReferenced>true</CanBeReferenced>
</Flags>
<AssetGroups>
<AssetGroup Name="ContentInfo">
<Type>Copy</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageDefinitions\navigraph-aircraft-navigation-data-interface-sample\ContentInfo\</AssetDir>
<OutputDir>ContentInfo\navigraph-aircraft-navigation-data-interface-sample\</OutputDir>
</AssetGroup>
<AssetGroup Name="Data">
<Type>Copy</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageSources\Data\</AssetDir>
<OutputDir>Data\</OutputDir>
</AssetGroup>
<AssetGroup Name="SimObject">
<Type>SimObject</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageSources\SimObjects\Airplanes\Navigraph_Navigation_Data_Interface_Aircraft\</AssetDir>
<OutputDir>SimObjects\Airplanes\Navigraph_Navigation_Data_Interface_Aircraft\</OutputDir>
</AssetGroup>
<AssetGroup Name="html_ui">
<Type>Copy</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageSources\html_ui\</AssetDir>
<OutputDir>html_ui\</OutputDir>
</AssetGroup>
</AssetGroups>
</AssetPackage>

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"PriceInUSD": 0,
"ThirdPartyShortName": "mycompany",
"AccountSellerId": "sellerid",
"UseFirstAvailableReleaseDate": true
}
{
"PriceInUSD": 0,
"ThirdPartyShortName": "mycompany",
"AccountSellerId": "sellerid",
"UseFirstAvailableReleaseDate": true
}
Loading

0 comments on commit 867ae07

Please sign in to comment.