Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed LoopTicker GPSUBX_UART
Revision 4:d9f72376aaa2, committed 2021-11-12
- Comitter:
- NaotoMorita
- Date:
- Fri Nov 12 06:47:57 2021 +0000
- Parent:
- 3:3db7371d08f1
- Child:
- 5:4343afa690fd
- Commit message:
- get status
Changed in this revision
| GPSUBX_UART.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/GPSUBX_UART.lib Mon Nov 01 16:19:04 2021 +0000 +++ b/GPSUBX_UART.lib Fri Nov 12 06:47:57 2021 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/teams/HAPSRG/code/GPSUBX_UART/#a90d07e4c34d +https://os.mbed.com/teams/HAPSRG/code/GPSUBX_UART/#1ed344c662d2
--- a/main.cpp Mon Nov 01 16:19:04 2021 +0000
+++ b/main.cpp Fri Nov 12 06:47:57 2021 +0000
@@ -3,7 +3,8 @@
#include "LoopTicker.hpp"
Serial pc(USBTX, USBRX, 115200);
-GPSUBX_UART gps(PD_1, PD_0);
+I2C i2c(PB_9, PB_8);
+GPSUBX_UART gps(PE_8, PE_7);
LoopTicker gps_ticker;
@@ -11,8 +12,11 @@
{
pc.printf("POSLLH: %d, %f, %f, %f\r\n", gps.iTOW_POSLLH, gps.Longitude, gps.Latitude, gps.Height);
pc.printf("VELNED: %d, %f, %f, %f\r\n", gps.iTOW_VELNED, gps.VelocityNED.x, gps.VelocityNED.y, gps.VelocityNED.z);
- pc.printf("RELPOSNED: %d, %d, %f, %f, %f\r\n", gps.iTOW_RELPOSNED, gps.RefStationID, gps.RelPosNED.x, gps.RelPosNED.y, gps.RelPosNED.z);
+ pc.printf("gpsfix: %d, %d\r\n", gps.iTOW_STATUS, gps.gpsFix);
pc.printf("TIMEUTC: %4d/%2d/%2d %2d:%2d %2d\r\n", gps.Year, gps.Month, gps.Day, gps.Hours, gps.Minutes, gps.Seconds);
+ if(gps.gpsFix== 0x02 ||gps.gpsFix== 0x03){
+ pc.printf("Fixed\r\n");
+ }
}
int main()