GPS/GNSS UBX library for UART
Dependencies: Vector3
Diff: GPSUBX_UART.cpp
- Revision:
- 21:712076ece407
- Parent:
- 20:efa07b922ba7
--- a/GPSUBX_UART.cpp Thu Mar 31 02:15:19 2022 +0000 +++ b/GPSUBX_UART.cpp Tue Jun 21 04:59:05 2022 +0000 @@ -208,12 +208,18 @@ //twelite.printf("%f %f %f \r\n",_n,_e,_d); } -void GPSUBX_UART::Calculate() +void GPSUBX_UART::Calculate(float& posN,float& posE,float& posD,float& velN,float& velE,float& velD) { UniversalPosition = ToUniversal(); Vector3 relative = UniversalPosition - UniversalZeroPosition; Vector3 _position(relative % UniversalZeroUnitN, relative % UniversalZeroUnitE, relative % UniversalZeroUnitD); PositionNED = _position; + posN = _position.x; + posE = _position.y; + posD = _position.z; + velN = VelocityNED.x; + velE = VelocityNED.y; + velD = VelocityNED.z; } Vector3 GPSUBX_UART::Calculate(Vector3 position)