Jump to content

ALT&GS data


st852

Recommended Posts

Guest lorathon
$res = @unserialize($pirep->rawdata);

if (is_array($pirep->rawdata['points']))
{	
    foreach($pirep->rawdata['points'] as $point)
    {
		$altitude = $point['alt'];
		$groudspeed = $point['gs'];
	}
}

 

Hope this helps.

Link to comment
Share on other sites

  • 3 weeks later...

Hello 

works but instead of appearing the altitude appears  the numbers  of points

'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '3', '9', '11', '9', '5', '141', '241', '244', '244', '246', '246', '246', '246', '244', '246', '246', '244', '241', '237', '229', '103', '93', '73', '25', '5', '9', '0', '0', '0', '0', '0',

 

 
Link to comment
Share on other sites

<script type="text/javascript">

Highcharts.chart('container', {
    chart: {
        type: 'line'
    },
    title: {
        text: 'Altitude'
    },
  
    xAxis: {
        categories: [<?php $res = @unserialize($pirep->rawdata);
               if (is_array($pirep->rawdata["points"])){    
               foreach
               ($pirep->rawdata['points'] as $point)
               {
               ?>
               '<?php echo $altitude = $point['alt'] ?>',
<?php        
}
}?>]
    },
    yAxis: {
        title: {
            text: 'Altitude'
        }
    },
    plotOptions: {
        line: {
            dataLabels: {
                enabled: true
            },
            enableMouseTracking: false
        }
    },
    series: [{
        name: 'Altitude',
        data: [<?php $res = @unserialize($pirep->rawdata);
               if (is_array($pirep->rawdata["points"])){    
               foreach
               ($pirep->rawdata['points'] as $point)
               {
               ?>
               '<?php echo $altitude = $point['alt'] ?>',
<?php        
}
}?>]
    }]
});
        </script>

Link to comment
Share on other sites

  • 3 months later...

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