Jump to content

phpVMS Custom ACARS *Video Release*


Guest N402KC

Recommended Posts

Hey man, I think the Acars is so sick , will this have a feature to submit the flight to the Airlines website? I would like to see a feature were the pilots will enter the Departure Airport and Arrival and they get all the Routes to follow. Other then that , iam willing to beta test it for you when you need a help.

Link to comment
Share on other sites

Guest CableGuy

Because this acars will Be used in multiple Airlines, their will Be à Small xml encrypted file the Pilot will Download and Place into the Folder, other then that it will have the Same Features As the current acars, plus much More!

Link to comment
Share on other sites

  • Administrators

Well I mean, it has to communicate with phpVMS... so if we can work out a protocol for that, which will make it easy for the both of us, like:

pirep send:

<fsacars>
  <pilotid>VMS001</pilotid>
  <airline>VMS</airline>
  <flightnum>VMS786</flightnum>
  <flighttime>1:05</flighttime>
  <landingrate>-345</landingrate>
  ... etc
</fsacars>

For sending a PIREP, then status updates, etc.

You'd send that (obviously more fields), to some URL (like the fsacars config)

That'll be easy for you to build in vb, and easy for me to parse in php, as long as it's well formed xml (which should be relatively easy)

Link to comment
Share on other sites

  • Administrators

Hmm, Why do that because the acars will send the Report directly into the db

You can't do that. 90% of the time you can't connect to a database remotely (big security risk there). And you don't know the database format (it can change, like it has for phpVMS between releases). XML is the intermediary, you do a POST command to a URL which is in the settings, I take that POST XML data, and translate it into what I need. And it's not one table which it will usually update, I have an internal API, I parse the data into a data structure which I pass to my API, which takes care of extra logic which is needed (triggering events within the system, removing bids, updating pilot and va stats, updating different tables, etc). Especially for submitting PIREPs, it's a complex system.

Link to comment
Share on other sites

Guest CableGuy

Nabeel, My mistake if i confuse you. Their will be PHP Scripts that allow the ACARS To interact with the Database and the site to interact with the ACARS. The only thing the ACARS Will directly connect to is FSUIPC/Flight Sim. Other then that It will connect to a specific PHP File that will do all the work for the acars.

Link to comment
Share on other sites

  • Administrators

Nabeel, My mistake if i confuse you. Their will be PHP Scripts that allow the ACARS To interact with the Database and the site to interact with the ACARS. The only thing the ACARS Will directly connect to is FSUIPC/Flight Sim. Other then that It will connect to a specific PHP File that will do all the work for the acars.

You shouldn't be writing any PHP files, for the database interaction (unless it's an example of how to). In reality, you should just be spitting out XML to a URL specified (a different URL for PIREP, and a different URL for status, basically a different URL you can set for anything which can be updated), and let me (or whatever system it is) handle what to do with it.

Even in your example PHP files, you should be parsing the XML that your application sends (please don't do it the way FSACARS and Xacars do it now, it's such a pain in the ass to parse), XML is the most pain-free way to go. After dealing with 4 systems now, trust me, this is the best way to go

I would even go to say to look at my FSFK XML configuration (he allows you to put the variables in any format you want for a PIREP, unfortunately, you can't for a status update), so I formatted it into XML:

<FLIGHTDATA>
   <PilotID>$@$PilotID$@$</PilotID>
   <PilotName>$@$PilotName$@$</PilotName>
   <AircraftTitle>$@$AircraftTitle$@$</AircraftTitle>
   <AircraftType>$@$AircraftType$@$</AircraftType>
   <AircraftTailNumber>$@$AircraftTailNumber$@$</AircraftTailNumber>
   <AircraftAirline>$@$AircraftAirline$@$</AircraftAirline>
   <FlightNumber>$@$FlightNumber$@$</FlightNumber>
   <FlightLevel>$@$FlightLevel$@$</FlightLevel>
   <FlightType>$@$FlightType$@$</FlightType>~
   <Passenger>$@$Passenger$@$</Passenger>
   <Cargo>$@$Cargo$@$</Cargo>
   <ZFW>$@$ZFW$@$</ZFW>
   <OriginICAO>$@$OriginICAO$@$</OriginICAO>
   <OriginGate>$@$OriginGate$@$</OriginGate>
   <OriginRunway>$@$OriginRunway$@$</OriginRunway>
   <OriginTransitionAltitude>$@$OriginTransitionAltitude$@$</OriginTransitionAltitude>
   <DestinationICAO>$@$DestinationICAO$@$</DestinationICAO>
   <DestinationGate>$@$DestinationGate$@$</DestinationGate>
   <DestinationRunway>$@$DestinationRunway$@$</DestinationRunway>
   <DestinationTransitionAltitude>$@$DestinationTransitionAltitude$@$</DestinationTransitionAltitude>
   <AlternateICAO>$@$AlternateICAO$@$</AlternateICAO>
   <SID>$@$SID$@$</SID>
   <STARS>$@$STAR$@$</STARS>
   <FlightDistance>$@$FlightDistance$@$</FlightDistance>
   <RouteDistance>$@$RouteDistance$@$</RouteDistance>
   <OUTTime>$@$OUTTime$@$</OUTTime>
   <OFFTime>$@$OFFTime$@$</OFFTime>
   <ONTime>$@$ONTime$@$</ONTime>
   <INTime>$@$INTime$@$</INTime>
   <DayFlightTime>$@$DayFlightTime$@$</DayFlightTime>
   <NightFlightTime>$@$NightFlightTime$@$</NightFlightTime>
   <BlockTime>$@$BlockTime$@$</BlockTime>
   <FlightTime>$@$FlightTime$@$</FlightTime>
   <BlockFuel>$@$BlockFuel$@$</BlockFuel>
   <FlightFuel>$@$FlightFuel$@$</FlightFuel>
   <TOIAS>$@$TOIAS$@$</TOIAS>
   <LAIAS>$@$LAIAS$@$</LAIAS>
   <ONVS>$@$ONVS$@$</ONVS>
   <FlightScore>$@$FlightScore$@$</FlightScore>
   <FLIGHTPLAN>
   <![CDATA[
   $@$FlightPlan$@$
   ]]>
   </FLIGHTPLAN>
   <COMMENT>
   <![CDATA[
   $@$Comment$@$
   ]]>
   </COMMENT>
   <FLIGHTCRITIQUE>
   <![CDATA[
   $@$FlightCritique$@$
   ]]>
   </FLIGHTCRITIQUE>
   <FLIGHTMAPS>
      <FlightMapJPG>$@$FlightMapJPG$@$</FlightMapJPG>
      <FlightMapWeatherJPG>$@$FlightMapWeatherJPG$@$</FlightMapWeatherJPG>
      <FlightMapTaxiOutJPG>$@$FlightMapTaxiOutJPG$@$</FlightMapTaxiOutJPG>
      <FlightMapTaxiInJPG>$@$FlightMapTaxiInJPG$@$</FlightMapTaxiInJPG>
      <FlightMapVerticalProfileJPG>$@$FlightMapVerticalProfileJPG$@$</FlightMapVerticalProfileJPG>
      <FlightMapLandingProfileJPG>$@$FlightMapLandingProfileJPG$@$</FlightMapLandingProfileJPG>
   </FLIGHTMAPS>
</FLIGHTDATA>

The code to parse this is all of 2 lines. Any other format it's a nightmare (see FSACARS, Xacars), etc.

To parse that (Assuming the POST data is ?xmldata=[the above string])

<?php
$xml = utf8_encode(trim($_POST['xmldata']));
$xml = simplexml_parse_string($xml);

In fact, if you send that exact FSFK format via POST to the URL, it'll make my life so much easier.

Link to comment
Share on other sites

  • Administrators

Would you mind sending me that video too? I am also working on a custom ACARS program, but am kinda clueless on how to get it to send a pirep and report to the live map.

I had a few posts on that earlier in the thread.

You have to send XML with all the flight information and then write an acars plugin to parse it

Link to comment
Share on other sites

I have finally got FSUIPC communicating with my program....

Just a question CableGuy or whoever else has got it working.....how do you retrieve data (other than the ones in the example in the link below)...how do convert say 0570 to the code VB wants (e.g &H2CC)

The link for the FSUIPC dll is below:

http://forums.simflight.com/viewtopic.php?f=54&t=53255&st=0&sk=t&sd=a

Thanks,

Mitch

Link to comment
Share on other sites

  • 1 month later...
Guest CableGuy

The ACARS Is on Hold. Just this morning i was shoveling snow and a friend of mine was sliding down the driveway on ice and hit me very hard. At the hospital, I was told I will be having surgery in 2 days to fix a shattered Scaphoid Bone in my wrist causing me to have a cast for 1 1/2 months and I also have a broken ulma and radius  bone in my arm on top of that. Therefore my coding will be limited to the max with coding using 1 arm. The ACARS is fully completed, Now im just getting it to interact with phpvms with no bugs. Sorry for the delay, but life is rough right now and i hope you guys can understand.

Link to comment
Share on other sites

The ACARS Is on Hold. Just this morning i was shoveling snow and a friend of mine was sliding down the driveway on ice and hit me very hard. At the hospital, I was told I will be having surgery in 2 days to fix a shattered Scaphoid Bone in my wrist causing me to have a cast for 1 1/2 months and I also have a broken ulma and radius  bone in my arm on top of that. Therefore my coding will be limited to the max with coding using 1 arm. The ACARS is fully completed, Now im just getting it to interact with phpvms with no bugs. Sorry for the delay, but life is rough right now and i hope you guys can understand.

take you time and recover first  8)

Link to comment
Share on other sites

Guest CableGuy

Ok I believed the Scaphoid Bone thing, but the ulma AND radius too?!  C'mon who's kidding who here!  ;D

Well no one is kidding no one. If your 6'2 and 180 and you get knocked hard down onto ice and land first on your wrist and then you body falls on your arm, I think it mite cause injury. Monday i will see if I can get a copy of the x-rays and I will be more then happy to send them to you.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...