turbofandude

PACX Development and Asset Creation Guide

Recommended Posts

PACX Integration Guide

 

Overview

There are four ways to extend the functionality of PACX. The first, and easiest, is outlined below.

 

Adding Data

The "Assets" folder inside the PACX installation folder contains the airports, aircraft, flight comments, passenger names, and vocal mapping files. Each of these files can be edited to add custom data. The easiest way to add more data is to copy the format from an existing entry and modify it to your needs.

 

Using the PACX File IO System

PACX will read and write several files to allow other applications to interact with it easily. There are currently three files supported by this system. They exist in the %localappdata%\PACX\IO folder.

 FlightConfiguration.xml

When this file is written to, it can be used to pre-populate the Start Flight popup in PACX. This can be done either before PACX is opened or while it is running (PACX will detect the change in the file and re-load it). This information can also be saved to this file by pressing CTRL+S on the Start Flight popup.

Manifest.xml

The Manifest.xml file is written by PACX when a flight begins. It will contain all passenger information, as well as the flight itinerary.

FlightReport.xml

The FlightReport.xml file is written after a flight is completed. This can be used to gather information about the result of the flight (such as satisfaction or events that occurred).

 

Using the PACX Web XML System

When a flight is submitted to our server, the original XML version is stored as well. Adding "/xml" to the flight report URL will cause the system to serve the report in raw XML form. For example, if the report was https://pacx.online/flight/TEST123, you could access the XML format of that flight by requesting https://pacx.online/flight/TEST123/xml.

 

Using the PACX Network API

PACX also hosts a server that allows for two-way, real-time communication. By default, it is hosted on port 9000. To simply usage of this system, we have provided a C++ and C# wrapper class. The class will attempt to read the Settings.xml file to determine the address and port of the PACX server and manages the socket code for you. You will provide two event handler functions, one for connection change notifications, and one for data receipt. The classes are below.

C#

PACXConnection.cs

C++

PACXConnection.h

PACXConnection.cpp

A breakdown of the network commands and responses are below.

The get commands will return an XML structure for the requested information.

get manifest
get events
get event <eventid>
get report

The subscription commands begin or end receipt of a particular data stream. The data will be provided in XML format once the appropriate event has occurred in PACX.

subscription <add/remove> <newevent/flightinformation/flightreport/usermessage/manifest>

The invoke commands allow a network client to call various PACX functions/features. This feature is what we use to allow in-cockpit controls to begin vocal interaction on PACX.

invoke <activatevocalinteraction/openinteractionmenu/summon>

Below is the list of different event types and parameters for each event.

PACX Event Types and Parameters.txt

 

  • Like 1

Share this post


Link to post
Share on other sites

Can you develop a little bit more this aspect.

For exaple, can you write here how to add, let's say, a penalty and passenger anxiety for a flight above 14000ft without a proper cabin pressure?

Or more easy (but not related with passengers) how to add a comment of the copilot if you forget to turn off the lights above 10k ft?

Share this post


Link to post
Share on other sites

We have to be careful about door simulation, as they don't always report properly from third party aircraft. That said, we can add the cabin pressure issue natively. The API doesn't currently allow the creation of events, but we could add that. Is that a feature you see yourself using?

Share this post


Link to post
Share on other sites

Yes, of course. I miss a lot, I think like a lot of people using XPlane, FSCaptain that computed a lot of variables like: Time Schedule delay for take off and landing, proper use of lights, taxi speeds...etc. I would love a software that monitor every aspect of an airline SOP. 

Share this post


Link to post
Share on other sites
On 10/11/2019 at 11:52 AM, Dj_Evola said:

Yes, of course. I miss a lot, I think like a lot of people using XPlane, FSCaptain that computed a lot of variables like: Time Schedule delay for take off and landing, proper use of lights, taxi speeds...etc. I would love a software that monitor every aspect of an airline SOP. 

I've got the cabin pressure item on the to-do list and we will be expanding the API soon. I will include the ability to generate events via the API.

Share this post


Link to post
Share on other sites

Hi, I'm not a developer but i'd like to buy pcx as user. So, i have two questions:

1. does it work with zibo's 738 on x-plane 11.36 and 11.40?

2. Does pcx affect fps?

 

Share this post


Link to post
Share on other sites

1.) It should work fine - you may have to manually adjust the seatbelt sign in PACX (or use auto-mode), but that's the only "issue" I can imagine.

2.) No, it should have little to no impact.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.