Passive GPS Tracker

TL;DR
I want to track freight trucks through GPS and have the data sent over wifi to a server, once they come in for the night.
Am I doing it right? Is there a better way?

Hello, everyone.
I am a Arduino newbie, as I have only just ordered a couple of UNO's from the store to get started on. Now, I've done some research and consider myself slightly above "clueless" in terms of electrical knowledge, as well as programming knowledge. My idea is to create a passive GPS tracker that would be fixed on each of a fleet of freight trucks. These are smaller trucks - International 4900 series -. They come and go every day from the same loading docks. I set up the wifi here and have access to the router and server.
The process would go as follows:
Each arduino would be one of the ARDUINO UNO WIFI REV2 versions, attached with a

https://www.amazon.com/gp/product/B075DD5746/ref=ox_sc_act_title_1?smid=A1N6DLY3NQK2VM&psc=1
(It is a "MakerFocus GPS Module 51 Microcontroller Ublox GPS Compatible NEO-6M STM32 Arduino Navigation Satellite Positioning GT-U7")

Along with an SD card module and a 9v battery. The GPS would need to ping location ideally every 1 minute or so and write to a text file.
What follows is that the Arduino would save these as logs on the sd card, organized by day. When the truck comes into the docking bay, the Arduino would connect to the WLAN, and dump the file for the day onto the waiting server machine.

I am reading a lot about setting up the code for the Arduino that reads the GPS module, parses it and records the data in a text file (csv maybe?) and with some work, it can be made to do what I want, I think.

It gets a little complicated from there and I'm sure the software side of it will take some work to get to a robust enough state to present these lat/long markers through the Google Maps API.

I am curious to know if you, as experts, see any glaring flaws with the flow of this process or know of an easier way to go about this process of passively tracking the fleet of trucks.

What I want for the idea is to create a solution whereby a manager could open a Map that shows where the truck was at, at which times of the day, given that the truck has come in.

Thank you very much for getting through all of that.

I used a Particle Electron to build a very similar project. It has built in GPRS, so it could send data from almost anywhere in the USA to a single server. Paired with IFTTT, it could handle making the Google Maps link automagically. It worked great to let my family track me on my 4 week vacation a couple of years ago.

Not an Arduino solution, I know, but much simpler.

One question. Is it legal to trace an employee in that way? You know, privacy, personal integrety...

Of cource the suggestion from PaulS is greate, it has proved to work. If You want a solution that works, and that kind of data result, go for it.

Your idea, to use a GPS, veryfy the function, log data on an SD card, verify the function and later transmit the data looks clever. Making the controller and the GPS work first, then adding the SD card and finaly adding the transmission sounds like a good way to build up the final device.

Railroader:
One question. Is it legal to trace an employee in that way? You know, privacy, personal integrety...

This is not something I had stopped to consider. Legally, it should be ok as this is a small company in Belize, Central America. Morally, I'm not sure about that since this was a task assigned to me by a director of the company and I'm just trying to solve it. I will ask him if he is prepared for these questions.

I do appreciate the thought-provoking question...

Railroader:
Your idea, to use a GPS, veryfy the function, log data on an SD card, verify the function and later transmit the data looks clever. Making the controller and the GPS work first, then adding the SD card and finaly adding the transmission sounds like a good way to build up the final device.

I'm guessing the last part is so troubleshooting is more manageable? I hadn't thought of it that way, thanks for that.

As for the Particle Electron, unfortunately I don't think it would work in my country. In general, I am trying to avoid GPRS and the monthly billing that could come from it, although I will have to look into how IFTTT might help me with the location data + Google Maps.

Thanks for the replies!

Size of company has no bearing on legality.

And unless the director is very up front about he use, I'd be very, very careful about this assignment.
(Read: CYA. Cover Your A$$. Document everything, get every instruction in writing or mail. Keep copies of papers at home, and keep a mail archive that you can access even if they suddenly kick you out with no time to even log off. Actually, make it so that it can't be touched by anyone even if your PC is left logged in. Possibly by copying to a thumb drive as and when you get something, then unplug immediately and keep in a pocket. Keep quiet abotu this. )

There are already quite a few 'fleet tracker' solutions available, some are even 'offline'.
So why is he 'reinventing the wheel'?
And yes, they're cheaper unless you're seriously underpaid.

There's very few reasons for an 'offline' tracker that makes sense.
One would be to make it easier to 'separate out' private trips, as these can bee considered a taxable fringe benefit in some countries.
Another would be optimisation of routes based on averaging data of previous trips.
Maintenance may be changed depending on routes, and knowing how far it has driven since the last could be used to trigger messages to alert manager that a new service is imminent, so they can plan for it well in advance.

If it also logged fuel consumption(requires a lot of fiddling) it would be able to do a few more things.

You may actually want to ask him what it's for since that could influence exactly what kind of data you're logging.

t's a pretty big task for your first real project, but as long as you split it up into manageable chunks it should be doable.
And having more than one UNO will let you try out different parts at the same time.

Do you have a LCD?
If not, get a 2x20 char (or even just a 2x16 char) LCD and hook up. It's great for diagnostic texts.

Along with an SD card module and a 9v battery.

Is the battery to power it or just for back up? I can't imagine a 9v battery of any size lasting very long.

I would look into a 'Passthrough' powerbank.
(They can deliver power while being charged)

PerryBebbington:
Is the battery to power it or just for back up? I can't imagine a 9v battery of any size lasting very long.

I am considering two options. A "passthrough power bank", as Gadgetman was describing or simply hooking up the Arduino to the ignition relay, limiting tracking to only when the truck engine is on.

Gadgetman:
Size of company has no bearing on legality.

And unless the director is very up front about he use, I'd be very, very careful about this assignment.
(Read: CYA. Cover Your A$$. Document everything, get every instruction in writing or mail. Keep copies of papers at home, and keep a mail archive that you can access even if they suddenly kick you out with no time to even log off. Actually, make it so that it can't be touched by anyone even if your PC is left logged in. Possibly by copying to a thumb drive as and when you get something, then unplug immediately and keep in a pocket. Keep quiet abotu this. )

Back to the legal aspect of this project.
You're right that I can't be certain unless I investigate the matter myself, but my employer is insisting that everything is above water and no such privacy laws exist in my country regarding employers tracking a truck that is being driven by an employee. The employee is on the clock and paid for every hour that he driving. However, I will certainly cover my butt moving forward with this project.

Gadgetman:
There are already quite a few 'fleet tracker' solutions available, some are even 'offline'.
So why is he 'reinventing the wheel'?
And yes, they're cheaper unless you're seriously underpaid.

There have been some services in my small country that sell tracking services. The cheapest we were able to find was a service that was offering live tracking along with the GPS device for $50/truck/month. As you can imagine, this would amount to hundreds of dollars a month, forever. Turning the focus towards passive tracking, there are some amazon products such as:

https://www.amazon.com/LandAirSea-LAS-1505-Tracking-Vehicle-System/dp/B000H9E9UG

But the user reviews aren't encouraging, especially regarding the software. My implementation of an Arduino would mean it could be troubleshooted directly and also has the option for expandability.

Gadgetman:
There's very few reasons for an 'offline' tracker that makes sense.
One would be to make it easier to 'separate out' private trips, as these can bee considered a taxable fringe benefit in some countries.
Another would be optimisation of routes based on averaging data of previous trips.
Maintenance may be changed depending on routes, and knowing how far it has driven since the last could be used to trigger messages to alert manager that a new service is imminent, so they can plan for it well in advance.

If it also logged fuel consumption(requires a lot of fiddling) it would be able to do a few more things.

You may actually want to ask him what it's for since that could influence exactly what kind of data you're logging.

The original implementation is to keep a closer reign on the fleet, using the information to better manage the routes, as you described above. The hope is that this implementation of an Arduino based GPS tracker will be robust enough to pass on to the sister companies of this company.
My hope and excitement as the project head is to add more functionality down the road. Your fuel consumption suggestion is definitely in the plans for the future.

Gadgetman:
It's a pretty big task for your first real project, but as long as you split it up into manageable chunks it should be doable.
And having more than one UNO will let you try out different parts at the same time.

Do you have a LCD?
If not, get a 2x20 char (or even just a 2x16 char) LCD and hook up. It's great for diagnostic texts.

I have an LCD screen lying around that will definitely use for this. I hadn't included that in this project either. Thanks for that!

This has given me a lot to chew on and add to my project plans. Thank you all again.

In the USA, commercial trucking companies do this real time, but store the data, until necessary to look at it.

A very few years ago, a trucker in Eastern ORegon left the freeway to take a short cut as shown on his GPS. When the load did not arrive at it's destination, the company began to review the tracking data and it showed the the truck leaving the assigned route, but stopped short of showing the current location.

Searches were begun, but about a week later, the driver walked out of the mountains and made contact with the company. He had gotten stuck and was not able to continue.

I guess someone got the truck out. The driver didn't work for the company anymore.

So, your project is really way behind the state of the art!

Paul