QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSProtocolMath.cc File Reference
#include "GPSProtocolMath.h"
#include <chrono>
#include <cmath>
#include <iomanip>
#include <limits>
#include <locale>
#include <sstream>
#include <GeographicLib/Geocentric.hpp>
+ Include dependency graph for GPSProtocolMath.cc:

Go to the source code of this file.

Namespaces

namespace  GPSProtocolMath
 Unit conversions and geodesy shared by receiver families and their callers.
 

Functions

Ecef GPSProtocolMath::toEcef (const GPSEllipsoidPosition &position)
 
GPSEllipsoidPosition GPSProtocolMath::fromEcef (const Ecef &position)
 
bool GPSProtocolMath::nearEarthSurface (const Ecef &position)
 
uint64_t GPSProtocolMath::utcMicroseconds (int year, int month, int day, int hour, int minute, int second, int32_t nsec)
 
QByteArray gpsFixedDecimal (double value, int decimals)
 

Function Documentation

◆ gpsFixedDecimal()

QByteArray gpsFixedDecimal ( double  value,
int  decimals 
)

Formats value as printf's "%.<decimals>f" does in the C locale: exact binary ties round to even and a negative zero keeps its sign. QByteArray::number() does neither, and would change the command bytes for such values.

Definition at line 65 of file GPSProtocolMath.cc.

Referenced by SBF::Plan::base(), Femto::Plan::fixedBase(), Unicore::Plan::fixedBase(), Ashtech::Plan::fixedPosition(), and Quectel::Plan::writeBase().