Jump to content

Creating a connection to a telnet server via php


Alex

Recommended Posts

Caling all ACARS afficianadoes!!

The flight simulator i use is FlightGear, an open source flight sim sharing many similarities and processes with Xplane.

I'm trying to create an ACARS system similar to the KACARS or XACARS.

Within Flightgear i can specify the sim to output to a telnet socket. as shown here.

sockets.jpg

I create a protocol file to output the information i want to collect from the program a snippet is here. (iits an xml file)

<?xml version="1.0"?>
<PropertyList>
<generic>

 <output>
  <binary_mode>false</binary_mode>
  <var_separator> </var_separator>
  <line_separator>\n</line_separator>
  <preamble>register FlightGear</preamble>

  <chunk>
   <type>string</type>
   <format>put</format>
  </chunk>

  <chunk>
   <name>lat</name>
   <type>float</type>
   <node>/position/latitude-deg</node>
   <format>lat %f</format>
  </chunk>

  <chunk>
   <name>lon</name>
   <type>float</type>
   <node>/position/longitude-deg</node>
   <format>lon %f</format>
  </chunk>

  <chunk>
   <name>alt</name>
   <type>int</type>
   <node>/position/altitude-ft</node>
   <format>alt %d</format>
  </chunk>

  <chunk>
   <name>ground speed</name>
   <type>int</type>
   <node>/velocities/groundspeed-kt</node>
   <format>gnd %d</format>
  </chunk>

  <chunk>
   <name>heading</name>
   <type>int</type>
   <node>/orientation/heading-deg</node>
   <format>hdg %d</format>
   <factor>10</factor>
  </chunk>

I was hoping someone with better knowledge than i with PHP and creating an ACARS system would be able to assist?

It would be a great benefit to me if possible.

Cheers

Alex

Link to comment
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
×
×
  • Create New...