As seen here…
And here…
And the map…
Our new LoRa Notecard project is using an MCU with external GPS, as described in this thread.
We are successfully receiving the GPS lat/lon in the body of our upstream notefiles, however the location fields within the Device and Events pages in Notehub are not populating. We are pushing the GPS data to the notecard using the following code (and requesting it back from the notecard to verify it’s been set), however the data still isn’t making it into those fields.
// Send GPS coordinates to Notecard
J *req = NoteNewRequest("card.location.mode");
JAddStringToObject(req, "mode", "fixed");
JAddNumberToObject(req, "lat", GPS.latitudeDegrees);
JAddNumberToObject(req, "lon", GPS.longitudeDegrees);
NoteRequest(req);
// Get GPS coordinates from Notecard and print
J *req = notecard.newRequest("card.location");
J *rsp = notecard.requestAndResponse(req);
Serial.print("Latitude: "); Serial.println(JGetNumber(rsp, "lat"), 6);
Serial.print("Longitude: "); Serial.println(JGetNumber(rsp, "lon"), 6);
I assume this is happening because the templated LoRa notes are of the “compact” format and therefore discard the typical metadata that Notehub uses to populate these fields?
If that’s the case, then how do we go about getting our GPS coordinates from the body of our notefile into Notehub’s native location fields? We’d really like to be able to see/manage our device locations within the aforementioned Notehub screens.