Skip to content

Commit

Permalink
commented speed saved in units of MPH
Browse files Browse the repository at this point in the history
  • Loading branch information
barry-ha committed May 9, 2023
1 parent 282989c commit d3b0196
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class Location {
char recordType[4]; // GPS, power-up, first valid time, etc
PointGPS loc; // has-a lat/long, degrees
time_t timestamp; // has-a GMT time
uint8_t numSatellites; // number of satellites in view
uint8_t numSatellites; // number of satellites in use (not the same as in view)
float speed; // current speed over ground in MPH
float direction; // direction of travel, degrees from true north
float altitude; // altitude, meters above MSL
Expand Down
6 changes: 3 additions & 3 deletions model_breadcrumbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
If the controller tells us to save to file, don't tell the "model" to do anything.
When should the controller should remember a new breadcrumb?
1. Every five minutes
1. Every ten minutes
2. When we drive a visible distance on the screen
3. When we drive into a new 6-digit grid square (todo)
4. When we turn a sharp corner (todo)
Expand Down Expand Up @@ -190,9 +190,9 @@ class Breadcrumbs {
}
}

void rememberGPS(PointGPS vLoc, time_t vTime, uint8_t vSats, float vSpeed, float vDirection, float vAltitudeMeters) {
void rememberGPS(PointGPS vLoc, time_t vTime, uint8_t vSats, float vSpeedMPH, float vDirection, float vAltitudeMeters) {
time_t cutoff = makeTime(GRIDUINO_FIRST_RELEASE);
Location gps{rGPS, vLoc, vTime, vSats, vSpeed, vDirection, vAltitudeMeters};
Location gps{rGPS, vLoc, vTime, vSats, vSpeedMPH, vDirection, vAltitudeMeters};
if (vTime > cutoff) {
remember(gps);
} else {
Expand Down

0 comments on commit d3b0196

Please sign in to comment.