Oil Log Analysis - 21/03/2017 08:48 EDT

Completado Publicado hace 7 años Pagado a la entrega
Completado Pagado a la entrega

We have a sensor that is monitoring usage of oil from a tank. Once every 10 seconds, we are told by this sensor whether oil is being consumed, or not being consumed. This is binary, and is actually the current voltage on a particular wire. When field5 in the attached goes minus, oil is being consumed. When field5 is not negative; oil is not being consumed.

We want to be able to do this:

Example1:

$ php ./[url removed, login to view] /* defaults to yesterday, and /var/log/httpd/access_log */

11/04/2017 usage 1.24 liters, 0.74 hours, 0.50 euro

Example2:

$ php ./[url removed, login to view] -day yesterday -file /var/log/httpd/access_log /* same as example one but no defaults */

11/04/2017 usage 1.31 liters, 0.74 hours, 0.51 euro

Example3:

$ php ./[url removed, login to view] -day today -file /var/log/httpd/access_log

12/04/2017 usage 1.31 liters, 0.74 hours, 0.00 euro

Example4:

$ php ./[url removed, login to view] -from "11:04:2017" -to "13:04:2017" -file /var/log/httpd/access_log

11/04/2017 usage 1.31 liters, 0.73 hours, 1.53 euro

12/04/2017 usage 1.31 liters, 0.75 hours, 0.00 euro

13/04/2017 usage 1.31 liters, 0.71 hours, 0.52 euro

total: 1.31 liters, 1.71 hours, 2.52 euro

Eg in the access_log_example, oil burning started at 12/Mar/2017:15:37:17 and ended at 12/Mar/2017:15:50:27, so the usage would be 13 minutes and 10 seconds or 13.016 minutes or 0.2169 hours.

Settings in /etc/[url removed, login to view]:

- Oil consumed per hour: 2.2 liters /* when the usage is "on" this is the amount of oil consumed per hour

- Oil cost per liter: 69c /* this is the cost to purchase oil.

- Currency: euro /* this is the currency for display purposes */

Note that it must take count of the following:

- That the oil can be switched on and off many times on an individual day

- That for the day in question; oil is already "on" at midight on the start of that day.

- That for the day in question; oil remains "on" at midight at the end of that day.

PHP Arquitectura de software

Nº del proyecto: #13473327

Sobre el proyecto

4 propuestas Proyecto remoto Activo hace 7 años

Adjudicado a:

€150 EUR en 3 días
(7 comentarios)
4.4

4 freelancers están ofertando un promedio de €143 por este trabajo

graphicaa

I am analysing & preparing reply to you & will send details with in 10 minutes ---------------------- Greetings, This is GOPAL for STALLIONi, Let me assist in this. Best results & optimum cost guaranteed here. Más

€263 EUR en 30 días
(466 comentarios)
8.5