Add flight route map; algorithm for picking from multiple nav points; some tests
This commit is contained in:
@@ -28,7 +28,8 @@ class Airport extends Model
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
|
||||
'lat' => 'float',
|
||||
'lon' => 'float',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,9 @@ class Navdata extends Model
|
||||
];
|
||||
|
||||
public $casts = [
|
||||
'id' => 'string',
|
||||
'type' => 'integer',
|
||||
'id' => 'string',
|
||||
'type' => 'integer',
|
||||
'lat' => 'float',
|
||||
'lon' => 'float',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user