API F/Plan data vs Simbrief

Good day,
I have two requests…

  1. I have been using the API to generate flight plans for my web page and comparing that to the flight plan on the Simbrief portal. in both requests I am using the exact same aircraft and I am not sure if I am once again doing things completely wrong as they both return different figures for trip burn, payload etc. On a few occasions the Simbrief call drops the cargo and / or payload and sometimes both.
    On my own returned flight plan the ‘taxxiout’ has been set to ‘auto’ whereas it was set 20 mins. I know in the tutorial it says that if any of the input field names are incorrect they will be ignored and as had a previous post that was my erroneous input I have checked and double checked and each time for the same flight there are discrepancies.
    I respect Navigraph as being correct and accurate so I am pointing the finger back at myself but just cannot see where I may be going wrong… Can someone point me in the right direction here? I have double-checked together with a professional pilot and we get the same different responses each time.

  2. My second question is this… Is there a developers forum where one can get assistance / tutorial possibly on parsing the data into .pdf as per the Simbrief one correctly? I am pretty new to json and xml and trying to emulate the Simbrief PDF OFP for starters and then use php-to-pdf or similar to generate the pdf eventually.

I am getting there slowly with parsing most objects out to html but I am sitting on trying to parse the maps. i have searched at length for posts where I was hoping someone else had a similar need that I could tag into and learn from that but not finding anything at all… unless of course I am missing something again…
I really appreciate your time and thank you in advance
Gary

Hi Gary,

Here is an example of a recent OFP URL you generated using the API:

/ofp/ofp.loader.api.php?fltnum=500&airline=LA&type=524528_1630222030662&reg=CCC&orig=FACT&dest=EGSS&pax=123&units=Kgs&oew=116611&mtow=232960&mlw=181969&mZfw=169971&contpct=0.2&civalue=0&resvrule=45&stepclimbs=1&notams=1&firnot=1&maps=detail&airline=LA&date=2022-04-01&cargo=0&taxiout=00:05:00&deph=19:00:00&depm=00:00:00&steh=11:00:00readonly> - <input type=&selcal=GR-FS&planformat=lido&acdata={'extrarmk':'OPR\/http://localhost/aircraft'}&fuelfactor=P001&apicode=e626f60e69b18662e050a1d427fd218f&outputpage=flight_plan.php?id=81&timestamp=1633178406

The following parameters are formatted incorrectly:

Incorrect Correct
units=Kgs units=KGS
oew=116611 Weights aren’t specified this way, see below
mtow=232960 Weights aren’t specified this way, see below
mlw=181969 Weights aren’t specified this way, see below
mZfw=169971 Weights aren’t specified this way, see below
civalue=0 If you want this to work, you also need to send the “cruise=CI” parameter
taxiout=00:05:00 This should be sent as “taxiout=05”
deph=19:00:00 This should be sent as “deph=19”
depm=00:00:00 This should be sent as “depm=0”
steh=11:00:00readonly> - <input type= Looks like an error in your HTML code, should be sent as “steh=11”
fuelfactor=P001 Should be sent as “fuelfactor=P01”

To customize the weights, these need to be sent in the “acdata” parameter instead. So you would send:

acdata={"extrarmk":"OPR\/SOME OPERATOR","oew":116.611,"mzfw":169.971,"mtow":232.960,"mlw":181.969}

Note how the weights also need to be in thousands of LBS, hence the added decimal (for mtow, 232960 becomes 232.960).

Please re-read the API thread, along with the specific examples of how all the parameters should be formatted here: The SimBrief API

To create a PDF, I recommend looking into one of the free PHP classes that can accomplish this. For example, TCPDF. I am not aware of any other communities or resources (other than here) for people working with the SimBrief API, unfortunately. Though it might be useful to read through the old discussions on SimBrief’s old forum here: API Support - SimBrief Support Forum.

Best regards,

Hi there and many thanks for your reply. I am getting it now…That ofp that you explain was generated using the ID of a saved air-frame in the Simbrief system. I assumed that it would use the data already saved for that aircraft and I guess not :slight_smile: So should I use a saved air-frame would I be correct in saying that I need not submit aircraft data such as MTOW etc and only user specified “other” items such taxi times, (which I now understand should have been converted to UNIX times before submitting) ,cargo and other .

Thanks for the heads up on the older forums and TCPDF. I will research that.
I appreciate your help and thanks again.
Best regards
Gary

Yes that’s correct, since you were sending a user airframe (type=524528_1630222030662) you don’t need to send the mtow/oew/etc at all, just make sure they are set correctly in your airframe’s options in the My Fleet section.

Also, just a note that the taxi times aren’t UNIX timestamps. Timestamps are expressed in seconds, whereas SimBrief’s taxi time options are set in minutes (so for a taxi-out time of 5 minutes, you would send “taxiout=5”).

Best regards,

Hi again,
Many thanks. I think I am on top of it now and thanks once again for your time.
Best regards
Gary

I don’t think that’s correct thought. It seems API will only accept acdata if it’s in thousands of pounds and ignores units=kgs option.

Here’s an ofp_id - 1634301969_32972223E2. Units are in KGS, but acdata is provided in thousands of LBS. Output is in KGs.

And it seems to work as noted here - Getting crazy weight and fuel numbers B747-8 - SimBrief Support Forum

Lastly - no, we would really dislike the change where ACDATA could accept either as we would need to re-work everything again.

Hi Lukas,

Sorry you’re right, acdata currently only accepts LBS. Still has to be in thousands though. I’ll edit my post above.

There are no immediate plans to change this, though if we do, the acdata units will be controlled separately by an optional “wgtunits” param in the acdata itself, so as not to break existing implementations.

On a related note, in checking this out I noticed that some vAMSYS calls are including weights in KGS and/or not in thousands. Is this because it’s a user/VA entered value that isn’t being validated?

Not a big deal, but I thought I’d let you know. When SimBrief receives out-of-range values like this, it simply ignores them, so if you’re receiving reports of SimBrief ignoring custom weights sent through vAMSYS, this might be why.

Examples:

ofp_id type acdata
1634310003_3AD72CD7F7 A332 {“cat”:“Heavy”,“equip”:null,“transponder”:null,“pbn”:null,“extrarmk”:null,“oew”:“120600”,“mzfw”:“170000”,“mtow”:“242000”,“mlw”:“182000”,“max_fuel”:“109200”,“hexcode”:null,“per”:null,“maxpax”:0}
1634308665_822F6A599E A319 {“cat”:“M”,“equip”:“SDE2E3FGILORWXYZ”,“transponder”:“H”,“pbn”:“A1B1C1D1O1S1S2”,“extrarmk”:“TCAS”,“oew”:“41058”,“mzfw”:“57000”,“mtow”:“68000”,“mlw”:“61000”,“max_fuel”:“19323”,“hexcode”:“3C6586”,“per”:“C”,“maxpax”:138}
1634307656_A702F6BB2F B738 {“cat”:“M”,“equip”:“SDE1E3FGHIRWXYZ”,“transponder”:“LB1”,“pbn”:“A1B1C1D1S1S2”,“extrarmk”:“TCAS%207.1”,“oew”:“41412”,“mzfw”:“62700”,“mtow”:“74300”,“mlw”:“66400”,“max_fuel”:“20800”,“hexcode”:“0200F8”,“per”:“C”,“maxpax”:171}

Best regards,