For conversions… I suck at these…
// Convert units from gallons to lbs
if(self::$unit == 'lbs')
{
$result->jeta = $result->jeta / 6.4; // 6.4 pounds per gallon
$result->lowlead = $result->lowlead / 6.4;
}
elseif(self::$unit == 'kg' || self::$unit == 'kgs')
{
$result->jeta = ($result->jeta / 6.4) * .45359;
$result->lowlead = ($result->lowlead / 6.4) * .45359;
}
Basically I start with the fuel price, per gallon. Then to convert to price per lb, divide by 6.4. To KG, I convert to lbs, then multiply by .45 to get to kg.
This correct, seems right?