Skip to content

Commit

Permalink
* v0.37 release candidate
Browse files Browse the repository at this point in the history
* Changed the TOD output string to show UNABLE in the UI.
* Changed the TOD output string in the exported flightplan to show also
nautical miles.
* Changed the menu for better look, and added a KLN90B export/import
function which defaults to directoy with KLN90B FMS files.
* Some other test code, not called or used for now, which can show
runways of airports from topdown view.
  • Loading branch information
Vantskruv committed Jun 17, 2017
1 parent 20e5f16 commit 556f934
Show file tree
Hide file tree
Showing 9 changed files with 354 additions and 878 deletions.
13 changes: 13 additions & 0 deletions LMATH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@ bool LMATH::GetLineIntersection(const CPoint& A, const CPoint & B, const CPoint&
return true;
}

//Converting lat/lon coordinates to ???????? But it looks flat and nice on screen
void LMATH::latlonToScreen(CPoint& _p)
{
CPoint p = _p;
p = p*M_PI/180.0;
//WORKS NICLEY!!! SIMPLE CODE!!! 536 MILLION HOURS TO SUCCEED!
p.y = p.y;
p.x = log(tan(M_PI*0.25 + p.x*0.5));
//ROTATION!
_p.x = p.y;
_p.y = -p.x;
}

//p is any point relative to vector, v is the vector. Returns the point on vector closest to p
//I.e. what is the nearest point one line A-B to point P?
//d = GetClosestPointOnVector(P - A, B - A)
Expand Down
3 changes: 2 additions & 1 deletion LMATH.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ namespace LMATH
static double meterToFeet(double f){ return f/0.3048;}
static const int KM_RADIUS = 6371.009;
bool GetLineIntersection(const CPoint& A, const CPoint & B, const CPoint& C, const CPoint& D, double& mua);
double GetClosestPointOnVector(const CPoint& _p, const CPoint& _v);
void latlonToScreen(CPoint& _p);
double GetClosestPointOnVector(const CPoint& _p, const CPoint& _v);
CPoint latlonToVector(const CPoint& p);
CPoint vectorToLatlon(const CPoint& p);
CPoint bearingToVector(const CPoint& p, const double& b);
Expand Down
11 changes: 0 additions & 11 deletions XFMS_DATA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,17 +372,6 @@ QString XFMS_DATA::getRoute(const QString& _qstr, std::vector<NVUPOINT*>& _route
if(okA == false || okB == false)
{
sError = "Route: Waypoint [" + wp->name + "] cannot join airway [" + awyA->name + "] and [" + awyB->name + "].";

QString sA = "A: ";
QTextStream ssA(&sA);
for(unsigned int j=0; j<awyA->lATS.size(); j++) ssA << "[" << awyA->lATS[j]->name << "]";
QString sB = "B: ";
QTextStream ssB(&sB);
for(unsigned int j=0; j<awyB->lATS.size(); j++) ssB << "[" << awyB->lATS[j]->name << "]";
qDebug() << sA;
qDebug() << sB;


goto rError;
}

Expand Down
Loading

0 comments on commit 556f934

Please sign in to comment.