PHP code example of rabollig / density-altitude

1. Go to this page and download the library: Download rabollig/density-altitude library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rabollig / density-altitude example snippets


$calculator = new DensityAltitude();
$calculator->altitudeInFeet(998.4);
$calculator->temperatureInC(27);
$calculator->dewpointInC(14);
$calculator->altimeterPressureInInchesHg(30.28);
$calculator->DANGERthisClassNotIntendedForSafetyCriticalUses('understood');
echo round($calculator->calculateDensityAltitude()); // 2225