What are you proposing to do?
I want to eliminate such negative or error of device from the reports. As it gives wrong picture of software, user doesn’t understand hardware error.
I'm obviously asking how you want to do it.
I want to ignore those values where speed and distance is negative while generating the report.
Are incorrect values reported by the device? Or is it what's calculated on the server?
I m not sure what is causing this negative values, but it should give clean data in reports, not which is practically not relevant in the real world
I recommend investigating the root cause first.
I agree, but this issue has been discussed no. of times and it lands up to be the device issue one way or the other. Please try to see as an end customer. End user will not understand this. He will feel that our application is not working properly.
I request if some internal mechanism can be designed to avoid such data or at least do not consider the same in reports.
Just an idea. What about letting the trip report model return distance as an absolute value?
That idea makes no sense to me. Return incorrect, but positive value? Why would anyone need that? Maybe I'm missing something?
After reading through forums on this issue I've noted that most of the time its due to the device sending data in an 'incorrect' order, due to whatever reasons. This means that the data is still correct just sent in an order not expected. Not much can be done on the hardware bit, especially if its already installed and operating remotely. It may help with clients who may think that the system is faulty by covering up the mistake, until a better method is found.
Distance is also always expected to be a positive value, making it absolute will only negate the negative value.
In my opinion it's better to show obviously wrong value instead of showing a wrong value that might look reasonable and misleading people.
We understand that many time negative values are found in the distance and speed due to device issue. Is there any mechanism to ignore such device faults. Lot of members have found this. And device replacement is not possible as they are remote and cost may be applicable for the same.
Many time entire report goes for toss when have such negative values.
If need be PR can be generated in GIT.