aerofly-missions
Version:
The Aerofly Missionsgerät converts simulator flight plan files for Aerofly FS 4, Microsoft Flight Simulator, X-Plane, GeoFS, and Garmin / Infinite Flight flight plan files. It also imports SimBrief flight plans.
24 lines (20 loc) • 859 B
text/typescript
import { Test } from "../Cli/Test.js";
import { Gpx } from "../Import/Gpx.js";
import * as fs from "node:fs";
export class GpxTest extends Test {
constructor(protected process: NodeJS.Process, protected dieOnError = false) {
super(process, dieOnError);
this.group(Gpx.name);
{
const gpl = new Gpx(fs.readFileSync("./src/Tests/fixtures/EGOV.gpx", "utf8"));
this.assertEquals(gpl.waypoints.length, 13);
this.assertEquals(gpl.waypoints[0].identifier, "EGOV");
this.assertEquals(gpl.waypoints[0].type, "AIRPORT");
this.assertEquals(gpl.waypoints[1].type, "USER WAYPOINT");
this.assertEquals(gpl.waypoints[12].type, "AIRPORT");
this.assertEquals(gpl.waypoints[1].lat, 52.716667);
this.assertEquals(gpl.waypoints[4].lon, -3.883333);
this.assertEquals(gpl.cruisingAltFt, undefined);
}
}
}