Revert Radians sinec FSUIPC uses Degrees

This commit is contained in:
2022-09-23 22:53:58 +02:00
parent 115e4d9265
commit 488fcb87cc
6 changed files with 35 additions and 29 deletions
+4 -5
View File
@@ -21,7 +21,7 @@ namespace file
{
/*
* Representation of gate
* Center in lat/lon radians
* Center in lat/lon degrees
* Radius in metres
*
* UINT8 | CHAR[] | POINT | UINT8
@@ -52,10 +52,9 @@ namespace file
inline const std::string to_string() const
{
std::ostringstream str;
str << "Gate " << this->designator << " at "
<< geodata::toDegrees(this->center.latitude) << "N "
<< geodata::toDegrees(this->center.longitude) << "E, Radius "
<< (int)this->radius;
str << "Gate " << this->designator << " at " << this->center.latitude
<< "N " << this->center.longitude << "E, Radius "
<< (int)this->radius << "m";
return str.str();
}
+18 -13
View File
@@ -21,19 +21,19 @@ namespace file
{
/*
* Representation of one runway with supplementary information
* Heading in radians true
* Threshold center in lat/lon radians
* Width and length in meters
* Heading in degrees true
* Threshold center in lat/lon degrees
* Width and length in metres
*
* UINT8 | CHAR[] | POINT | UINT8 | UINT16 | DOUBLE
* UINT8 | CHAR[] | BOX | UINT8 | UINT16 | DOUBLE
* -------+------------+--------+-------+--------+-------
* STRLEN | DESIGNATOR | CENTER | WIDTH | LENGTH | TRUHDG
* STRLEN | DESIGNATOR | BOUNDS | WIDTH | LENGTH | TRUHDG
*/
class Runway
{
private:
std::string designator;
struct geodata::point center;
struct geodata::box bounds;
std::uint8_t width;
std::uint16_t length;
double trueHeading;
@@ -48,7 +48,7 @@ namespace file
double width);
// From database
Runway(std::string designator,
struct geodata::point center,
struct geodata::box bounds,
std::uint8_t width,
std::uint16_t length,
double trueHeading);
@@ -58,12 +58,17 @@ namespace file
inline const std::string to_string() const
{
std::ostringstream str;
str << "Runway " << this->designator << " with threshold center "
<< geodata::toDegrees(this->center.latitude) << "N "
<< geodata::toDegrees(this->center.longitude) << "E, Width "
<< (int)this->width << "m, Length " << this->length
<< "m, True Heading " << geodata::toDegrees(this->trueHeading)
<< "°";
str << "Runway " << this->designator << " with bounds "
<< this->bounds.topLeft.latitude << "N "
<< this->bounds.topLeft.longitude << "E, "
<< this->bounds.topRight.latitude << "N "
<< this->bounds.topRight.longitude << "E, "
<< this->bounds.bottomRight.latitude << "N "
<< this->bounds.bottomRight.longitude << "E, "
<< this->bounds.bottomLeft.latitude << "N "
<< this->bounds.bottomLeft.longitude << "E, "
<< "Width " << (int)this->width << "m, Length " << this->length
<< "m, True Heading " << this->trueHeading << "°";
return str.str();
}