Jump to content
Aaryan

Altitude/Speed Graph

Recommended Posts

I'm wondering how to get an altitude and speed chart on pirep_viewreport.php like the one in vataware? I know data can be extracted but dunno the implementation of the code. Any help?

Share this post


Link to post
Share on other sites

Do you have the data in the row of the PIREP?

If so, it should be fairly easy. Check out Chart.js. It's a good library for making all sorts of charts/grahps etc.

Share this post


Link to post
Share on other sites

Hmm. Ofcourse. The data is definitely recorded in ACARS. But yes again I would be stuck with the code. I know how to implement the data to any charts but yes I am not in a knowledge to find or call that data. Just like this VA has done.

https://dfy-va.net/phpvms/pireps/viewreport/721

Edited by Aaryan

Share this post


Link to post
Share on other sites

Take your most recent pirep from the DB. What is in the raw_data column?

If there is data there, you can get it working. Take a look at the exaple Chart.js charts and you'll see the format it requires. It should be a simple JS array format

data = [1,2,3,4] etc.

And then each element of the array should have an associated element in the labels array. But check the docs for this.

A quick solution would be to just generate a script that creates a properly formatted string, and call it inside the .tpl/.php file. I guess the better way would be to perform some sort of AJAX call to get the data then do a $.each() on the array.

 

Did this for a VA.

Take a look at the part of the code

graph.JPGdata.JPG

Edited by Sava

Share this post


Link to post
Share on other sites

You are so good buddy! Thanks for your help. This is the thing I wanted! +1 for you ;)

 

Sincerely

Aaryan Kapoor

Edited by Aaryan

Share this post


Link to post
Share on other sites
On 2017/6/23 at 4:12 AM, Sava said:

Take your most recent pirep from the DB. What is in the raw_data column?

If there is data there, you can get it working. Take a look at the exaple Chart.js charts and you'll see the format it requires. It should be a simple JS array format

data = [1,2,3,4] etc.

And then each element of the array should have an associated element in the labels array. But check the docs for this.

A quick solution would be to just generate a script that creates a properly formatted string, and call it inside the .tpl/.php file. I guess the better way would be to perform some sort of AJAX call to get the data then do a $.each() on the array.

 

Did this for a VA.

Take a look at the part of the code

graph.JPGdata.JPG

This message is great if you can share the code
we need flight map, please share this code to us also
k922365@gmail.com

 

Share this post


Link to post
Share on other sites
On 2017/6/24 at 0:02 AM, Aaryan said:

You are so good buddy! Thanks for your help. This is the thing I wanted! +1 for you ;)

 

Sincerely

Aaryan Kapoor

This message is great if you can share the code
we need flight map, please share this code to us also
 

Share this post


Link to post
Share on other sites
1 hour ago, shakamonkey88 said:

OK, so I now have data in the "rawdata" column.  I need some help creating the altitude and speed graphs. Can anyone give me a hand please?

 

Regards,

 

Pete

How did you get the data in the rawdata column?

Share this post


Link to post
Share on other sites

Just a quick question - does anyone know what page calls the pirep view and route_map on /index.php/pireps/view/XXXX?

I am trying to change the layout but the routemap is being called from somewhere other than pirep_viewreport.php

Share this post


Link to post
Share on other sites

I do not know if this is what you are looking for

in core/modules/pireps/pireps.php find this

$this->render('route_map.tpl');

Edited by RuiMiguel

Share this post


Link to post
Share on other sites
1 hour ago, zacmia said:

Any chance someone can help me out with this? Not very good at coding. 

Do you get rawdata from your ACARS system?

OR

Do you have Flight Position Tracker module by CrazyCreatives?

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.

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...