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
@@ -25,6 +25,7 @@ class CreateNavdataTables extends Migration
$table->float('lon', 7, 4)->default(0.0);
$table->string('freq', 7)->nullable();
$table->primary(['id', 'name']);
$table->index('id');
$table->index('name');
});
@@ -13,13 +13,9 @@ class CreateAcarsTables extends Migration
*/
public function up()
{
/**
* See for defs, modify/update based on this
* https://github.com/skiselkov/openfmc/blob/master/airac.h
*/
Schema::create('acars', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('acars_id', 12);
$table->string('pirep_id', 12);
$table->string('name', 10)->nullable();
$table->float('lat', 7, 4)->default(0.0);
$table->float('lon', 7, 4)->default(0.0);
@@ -29,8 +25,8 @@ class CreateAcarsTables extends Migration
# polymorphic relation columns.
# parent_type can be flight, pirep or acars
# once
$table->unsignedBigInteger('parent_id');
$table->string('parent_type');
#$table->unsignedBigInteger('parent_id');
#$table->string('parent_type');
$table->timestamps();