shiftdsm / Galavanting-Gnome

0 stars 1 forks source link

Add more GPS fields to locations #51

Closed tegandbiscuits closed 5 years ago

tegandbiscuits commented 5 years ago

I moved the location queries to a LocationService object like what was done in #34, and added fields for kph, alt, and heading.

I feel like heading should be trimmed, but I don't know if head would be the right fit. Also I'm not sure if it makes more sense to use kph or just speed. I instinctively want to keep them short to save data, but I also don't have a strong conviction to keep them short if it harms understanding.

Closes #45.

tegandbiscuits commented 5 years ago

Also, the seeds can greatly be trimmed down. A constant drive from Des Moines to NW Washington is ~35 hours, so we only need ~70 records not 193 (assuming we want vaguely realistic).

I'd remove them myself, but I can't think right now how automate it.

I was thinking of doing something like this

const lessLocations = initialLocations.reduce((accum, location, index) => {
  if (index % 3 === 0) {
    return accum.concat(location);
  }
});

Then saving the result of lessLocations. But I'm not sure if that'd be right.

mgerst commented 5 years ago

Can we add a timestamp to this as well? Preferably one set automatically.