Add flight route map; algorithm for picking from multiple nav points; some tests

This commit is contained in:
Nabeel Shahzad
2017-12-20 19:12:39 -06:00
parent 8d1281d6e3
commit 6c546b5094
18 changed files with 418 additions and 221 deletions

View File

@@ -28,7 +28,8 @@ class Airport extends Model
];
protected $casts = [
'lat' => 'float',
'lon' => 'float',
];
/**

View File

@@ -61,11 +61,15 @@ class Flight extends Model
/**
* Get the flight ident, e.,g JBU1900
* @param $value
*/
public function getIdentAttribute()
{
$flight_id = $this->airline->code;
$flight_id .= $this->flight_number;
# TODO: Add in code/leg if set
return $flight_id;
}
/**

View File

@@ -20,7 +20,9 @@ class Navdata extends Model
];
public $casts = [
'id' => 'string',
'type' => 'integer',
'id' => 'string',
'type' => 'integer',
'lat' => 'float',
'lon' => 'float',
];
}