Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Howto limit pushpin when duplicate lat/long

Help
hi-end
2012-01-06
2013-10-24
  • hi-end
    hi-end
    2012-01-06

    Hello everybody,
    i'm newbie in opengts.I just install and connect device to opengts success,
    when device in stay  01 point (not move), it's still report to server (i set in device 60s report to server 01 time), so that too many pushpin in 01 point (and around) , its lat/long is same.
    so, how to server auto remove event when it's duplicate lat/lon?

    Thanks

     
  • Eduardo Robles
    Eduardo Robles
    2012-01-06

    Hello hi-end,

    This can be done in the communication server, by reading the last event stored in the database and compare the lat/lon information with the new event. If the lat/lon data is the same (or very close to it, at your will) you can, for example, discard the new event, or update the old event with the actual date, or whatever you need to do.

    This, of course, requires tweaking the TrackClientPacketHandler of your DCS (Device Communication Server).

    Cheers,
    Eduardo.

     
  • hi-end
    hi-end
    2012-01-07

    thanks erobles,

    can you help me solve this problem in details?
    i'm not a programmer, so that i feel too difficult to do that.
    my email : sofitcenter@yahoo.com

    Thanks

     
  • trung
    trung
    2012-01-07

    Hi hi-end
    You are lucky because the solution is already in private.xml, put this line in MapProvider section:

           <Property key="map.minProximity">50</Property>         <!- minimum meters between adjacent events ->

    Another problem I'm facing now is maximal distance between 2 events. Sometime I turned device off and next day turn on in another place, but OpenGTS alway draw a straight line between these two points. It should be off ( no line) if the distance is greater than 500-1000m

     
  • hi-end
    hi-end
    2012-01-08

    Hi trungvt,

    thanks for your support, i do it now and report soon,

    Thanks

     
  • hi-end
    hi-end
    2012-01-08

    <-----------thanks erobles,

    can you help me solve this problem in details?
    i'm not a programmer, so that i feel too difficult to do that.
    my email : sofitcenter@yahoo.com

    Thanks----------->

    sorry about that, my email : softitcenter@yahoo.com

     
  • hi-end
    hi-end
    2012-01-10

    thanks trungvt,

    it's so cool.thanks for your support

    Thanks

     
  • tea4two
    tea4two
    2012-01-11

    Hello Eduardo,
    if you have a little bit of time, please add some instruction in the PowerOpenGTS wiki.

    For edit  access write a PM to me.

    Best regards
    - Pierluigi

     
  • Yonhmaikel
    Yonhmaikel
    2012-04-20

    i have a problem with fix this parameter

    <Property key="map.minProximity">50</Property> <!- minimum meters between adjacent events ->

    this work fantastic, but if gps device don't move, in map don't show me the last location if he don't move….the best solution will be if show me the last location..

     
  • madhusudhana
    madhusudhana
    2012-08-07

    Hi All,

    <Property key="map.minProximity">50</Property> <!- minimum meters between adjacent events -> this is working fine for only Map part. If same thing for Reports means how we can able to do. Please suggest on this.

    Regards,
    Madhu

     
  • trung
    trung
    2012-08-08

    We can build a solution together. Even you are not a programer but you can help to clarify what you need or what users need.
    Beside lat/long info, OpenGTS also works with other value like temperature, voltage, input values. If you don't want duplicated pushpins on map, do you want to have it in some specific reports and some other reports not? Do you still want to have it store in database or just store last event and delete all previous events with the same location?
    Tks
    VTT

     
  • madhusudhana
    madhusudhana
    2012-08-09

    Hi trungvt ,

    My question is " If vehicle is in same place (Sending same Lat/Lon) then that records should be override of the previous record, to reduce the events in the data base". Please suggest me to do this.

    Regards,
    Madhu

     
  • trung
    trung
    2012-08-09

    Understand your question.
    Pls think about vehicle status. For ex:
    10:00:00 car's door is open
    10:00:30 car's door is closed
    10:01:00 ignition turned ON
    10:02:00 battery 14V
    10:04:00 temperature 30 degree

    10:10:00 temperature 65 degree
    10:12:00 fire alarm

    All above events with the same lat/long
    Which event you want to keep in database?
    Which event want to appear in report?
    Tks

     
  • madhusudhana
    madhusudhana
    2012-08-09

    Hi trungvt ,

    Thanks for response, i need to insert the event when it's stopped, and if it stays long time then override the existing event in the database(If same lat/lon).

    Regards,
    Madhu

     
  • madhusudhana
    madhusudhana
    2013-03-26

    Hi All,

    when device in stay 01 point (not move), it's still report to server (i set in device 60s report to server 01 time), so that too many recordsin 01 point (and around) , its lat/long is same and speed is zero. so, how to server auto remove event when it's stop in the eventdetail reort.

    Regards,
    Madhu

     
  • trung
    trung
    2013-03-31

    Hi Madhu,
    I have forgot this thread.

    You pay attention only in lat/long and want to reject all other valuable events like door open/closed.
    Imagine you car stays fixed for long time. You are not there. Someone open car's door and steal your CD player.
    System is able to send events that someone breaches your car but look like you want to refuse it. Lat/long means all for you?

     
  • madhusudhana
    madhusudhana
    2013-04-01

    Thanks for reply, Now i need on reports part.

    My requirement is if vehicle is in stop for long time, i want to show only one stop in reports side.
    ex: if vehicle is on stop for 09:00 to 11:00, in between this lot of records will be there in database. Now i want to display only one stop event on reports side. Please let me know step by step. I am waiting for your reply. Please share your mail id.. mine is (madhusudhana.akula@gmail.com)

    Warm Regards,
    Madhu

     
  • madhusudhana
    madhusudhana
    2013-04-03

    Hi All,

    If we don't want to insert events in database, If vehicle is in idle position for long time then place the bellow code in TrackClientPacketHandler.java

    /* insert event */

            GeoPoint geoPoint = new GeoPoint(latitude, longitude);

            if (!device.isNearLastValidLocation(geoPoint,10)) {     //public static double MINIMUM_MOVED_METERS = 0.0;

                device.insertEventData(evdb);

            }

    Regards,
    Madhu

     
  • Gabriel
    Gabriel
    2013-08-31

    @Madhu

    I'm facing the same problem.

    Using MINIMUM_MOVED_METERS works ok, but if the vehicle does not move for several days, you will not have any new events reported, so you will not be able to really tell if the car is still there or not (if tracker stops working).

    I think the proper way would be to insert events IF the location is different; if it's EQUAL then check for TIME of the last event, if it's more than "x" hours older, then insert the event anyways.
    So this way if the car does not move, we still will be able to see it every day, reporting every "x" hours, so we will know the car is "alive". Follow me?

    Any Ideas?
    Thanks

     
  • madhusudhana
    madhusudhana
    2013-09-24

    Hi Gabriel,

    I got your point. I am accepting with your words, I will try to do this, mean while if you know how to resolve this please share this.

    Regards,
    Madhu

     
  • Gabriel
    Gabriel
    2013-10-12

    Hi Madhu

    I'm checking timestamp against db device "lastGPSTimestamp" value, and works for me.

    long lastGPSTime = (device.getLastGPSTimestamp() + 3600); // + time in seconds (unix..)

    if (validGPS && !device.isNearLastValidLocation(geoPoint,20.0)) {
    this.insertEventRecord(device, fixtime, statuscode....
    ....);
    } else
    if (validGPS && ( fixtime > lastGPSTime)) {
    this.insertEventRecord(device, fixtime, statuscode,...speed..............

    Regards,
    Gabriel

     
  • anir
    anir
    2013-10-24

    Hi, can any body help me in removing the ignition on/off pushpin from the map in open gts