Import navigation data from Navigraph files

This commit is contained in:
Nabeel Shahzad
2017-12-20 16:34:52 -06:00
parent 3f8073e552
commit 17093e9fe9
9 changed files with 289 additions and 53 deletions

View File

@@ -17,21 +17,16 @@ class CreateNavdataTables extends Migration
* See for defs, modify/update based on this
* https://github.com/skiselkov/openfmc/blob/master/airac.h
*/
Schema::create('navpoints', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 10);
$table->string('title', 25);
$table->string('airway', 7)->nullable();
$table->string('airway_type', 1)->nullable();
$table->bigInteger('seq')->nullable();
$table->string('loc', 4)->nullable();
Schema::create('navdata', function (Blueprint $table) {
$table->string('id', 4);
$table->string('name', 24);
$table->unsignedInteger('type');
$table->float('lat', 7, 4)->default(0.0);
$table->float('lon', 7, 4)->default(0.0);
$table->string('freq', 7);
$table->integer('type');
$table->string('freq', 7)->nullable();
$table->index('id');
$table->index('name');
$table->index('airway');
});
}
@@ -42,6 +37,6 @@ class CreateNavdataTables extends Migration
*/
public function down()
{
Schema::dropIfExists('navpoints');
Schema::dropIfExists('navdata');
}
}