23#include "../urcHandler.h"
41 unsigned long uncertainty = 0;
43 int latH = 0, lonH = 0, alt = 0;
44 unsigned int speedU = 0, cogU = 0;
45 char latL[10], lonL[10];
46 int dateStore[5] = {0, 0, 0, 0, 0};
47 unsigned int year = 0, ms = 0;
49 memset(&clck, 0,
sizeof(clck));
50 memset(&gps, 0,
sizeof(gps));
51 memset(&spd, 0,
sizeof(spd));
54 scanNum = sscanf(params,
55 "%d/%d/%u,%d:%d:%d.%u,%d.%9[^,],%d.%9[^,],%d,%lu,%u,%u,%*s",
56 &dateStore[0], &dateStore[1], &year,
57 &dateStore[2], &dateStore[3], &dateStore[4], &ms,
58 &latH, latL, &lonH, lonL, &alt, &uncertainty,
75 gps.
lat = (float)latH + ((
float)atol(latL) / pow(10, strlen(latL)));
77 gps.
lat = (float)latH - ((
float)atol(latL) / pow(10, strlen(latL)));
79 gps.
lon = (float)lonH + ((
float)atol(lonL) / pow(10, strlen(lonL)));
81 gps.
lon = (float)lonH - ((
float)atol(lonL) / pow(10, strlen(lonL)));
85 spd.
speed = (float)speedU;
86 spd.
cog = (float)cogU;
const char IRIDIUM_9604_GNSS_REQUEST_LOCATION_URC[]
[Not documented for the 9604]
Definition: Iridium_9604_AT_commands.h:150
void debugPrintln(const char *message, bool important=false)
Print a debug message followed by a newline, if debugging is enabled.
Definition: sfe_debug.cpp:76
The base class for the URC handlers. See the file description for how to add a new URC.
Definition: urcHandler.h:92
urcCallback_t _callbackPtr[URC_MAX_CALLBACKS]
The user's callbacks, stored generically.
Definition: urcHandler.h:168
void addURC(const char *urcPrefix, bool keepInBacklog=true)
Register this handler's identity. Called once, from the subclass's own constructor.
Definition: urcHandler.h:108
urcHandlerInterface: the services DevIridium9604 provides to the URC handlers. DevIridium9604 inherit...
Definition: urcHandler.h:70
virtual SfeDebugPrint & urcDebug(void)=0
The debug printer.
The URC handler for +UULOC: - Localization information (CellLocate and hybrid positioning)....
Definition: urcUULOC.h:30
urcUULOC(void)
Definition: urcUULOC.h:34
void(* callback_t)(ClockData, PositionData, SpeedData, unsigned long)
The callback signature. See the file description.
Definition: urcUULOC.h:32
bool process(urcHandlerInterface &device, const char *params)
Parse the URC parameters and act on them.
Definition: urcUULOC.h:36
Definition: nmeaMessage.h:30
The date and time.
Definition: Iridium_9604_typedefs.h:186
struct TimeData time
The time.
Definition: Iridium_9604_typedefs.h:188
struct DateData date
The date.
Definition: Iridium_9604_typedefs.h:187
uint8_t month
Month.
Definition: Iridium_9604_typedefs.h:169
uint8_t day
Day.
Definition: Iridium_9604_typedefs.h:168
unsigned int year
Year.
Definition: Iridium_9604_typedefs.h:170
A position.
Definition: Iridium_9604_typedefs.h:193
float alt
Altitude.
Definition: Iridium_9604_typedefs.h:197
float lat
Degrees: +/- 90.
Definition: Iridium_9604_typedefs.h:195
float lon
Degrees: +/- 180.
Definition: Iridium_9604_typedefs.h:196
A speed and course.
Definition: Iridium_9604_typedefs.h:204
float speed
m/s
Definition: Iridium_9604_typedefs.h:205
float cog
Degrees.
Definition: Iridium_9604_typedefs.h:206
uint8_t second
Second.
Definition: Iridium_9604_typedefs.h:178
unsigned int ms
Milliseconds.
Definition: Iridium_9604_typedefs.h:179
uint8_t hour
Hour.
Definition: Iridium_9604_typedefs.h:176
uint8_t minute
Minute.
Definition: Iridium_9604_typedefs.h:177
#define urcRegisterHandler(kHandler)
Declare a file-scope static builder that self-registers a URC handler class.
Definition: urcHandler.h:238