+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Advanced Member level 3
    Points: 4,911, Level: 16
    Achievements:
    7 years registered
    PA3040's Avatar
    Join Date
    Aug 2011
    Posts
    865
    Helped
    44 / 44
    Points
    4,911
    Level
    16

    Display current location of the vehical

    Hi All

    I need to display current town name on a LCD near the passenger seat of the bus

    This is the things I supposed to use

    Microcontroller
    LCD
    GPS sensor

    Please advice the procedure and basic concept any other solution other than above parts

    Thanks in advanced

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 79,216, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,976
    Helped
    4332 / 4332
    Points
    79,216
    Level
    68

    Re: Display current location of the vehical

    Assuming you have the software to drive the LCD already:

    1. read the GPS
    2. check which boundary the latitude and longitude fall within
    3. display the name of the bounded area on the LCD.

    You will need some kind of a database, pre-loaded with the boundary information, the GPS signal will not tell you the name of the location, only its coordinates. As the boundary need not be very accurate, you might be able to use simple rectangular regions then a comparison of east/west then north/south (or the other way around) values to generate a look-up value into a table of town names.


    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Advanced Member level 3
    Points: 4,911, Level: 16
    Achievements:
    7 years registered
    PA3040's Avatar
    Join Date
    Aug 2011
    Posts
    865
    Helped
    44 / 44
    Points
    4,911
    Level
    16

    Re: Display current location of the vehical

    Quote Originally Posted by betwixt View Post
    Assuming you have the software to drive the LCD already:


    Brian.
    Thanks for the reply

    Yes...I can find the codes

    Can I able to find coordinates using google without visiting the exact location with GPS sensor?
    Can I use google map to find location very accurately than the GPS?

    I checked with google map but it is wrong what i am reading with GPS sensor

    Thanks in advanced
    Last edited by PA3040; 26th May 2019 at 19:29.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 79,216, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,976
    Helped
    4332 / 4332
    Points
    79,216
    Level
    68

    Re: Display current location of the vehical

    I find Google Earth to be very accurate, moving the cursor displays the coordinates at the bottom of the screen and they match closely with my GPS device. I'm not sure how accurate other Google maps are. For town boundaries you don't need exact coordinates and if you assume rectangle outlines they won't match the town development area accurately anyway.

    I know there is a clever algorithm that reports whether coordinates are inside or outside an irregular shaped boundary, I use a system that tells me which Police station covers different addresses by clicking on a map but I do not have access to the source code. I suspect it is far too complicated to run on a microcontroller.

    The problem is making the application database small enough without losing too much accuracy. You will probably find an array of latitude and longitude values to discover a town code is most efficient. For example 'TownCode = Database[Lat][Long];' then a second table to look up the town name against the TownCode number. If you subtract the latitude and longitude of the lowest numbered corner of your region it will make the table indexes as small as possible.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

  5. #5
    Super Moderator
    Points: 74,672, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,143
    Helped
    3448 / 3448
    Points
    74,672
    Level
    66

    Re: Display current location of the vehical

    Hi,

    You say bus ... does this mean there are predefined routes (in opposite to random driving across the land)?

    If so, it's far more easy.
    Just make a list of the town's names and their coordinates.
    Then compare the actual bus coordinate with the town coordinates and find the nearest town... display it's name.

    If your list of towns is in the correct order of the bus route, then finding the next town is even easier.

    ****
    You may add additional informations to the display, like distance to the next town, expected arrival at the next town, street(location) of bus stop, bus stops automatically or only on request...and so on.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.


    1 members found this post helpful.

  6. #6
    Advanced Member level 5
    Points: 16,333, Level: 30

    Join Date
    Nov 2012
    Posts
    2,991
    Helped
    727 / 727
    Points
    16,333
    Level
    30

    Re: Display current location of the vehical

    I checked with google map but it is wrong what i am reading with GPS sensor ...
    That is very strange; when I put the gps coordinates into the maps.google.com, I get my location accurately (within +/- 5 meters; rough guess).

    Without gps, google can locate you using the towers and the signal strengths (that is not so accurate). Google uses tower location databases which may have some mistakes.


    1 members found this post helpful.

  7. #7
    Advanced Member level 4
    Points: 5,594, Level: 17
    kripacharya's Avatar
    Join Date
    Dec 2012
    Location
    New Delhi
    Posts
    1,012
    Helped
    173 / 173
    Points
    5,594
    Level
    17

    Re: Display current location of the vehical

    Quote Originally Posted by PA3040 View Post
    I checked with google map but it is wrong what i am reading with GPS sensor
    No one has ever found google maps to be wrong. Perhaps if you gave an example of your readings we could point out any mistakes?

    Please note that typically GPS devices show coordinates as xx° yy' zz" while Google shows it as xx. abcdef° . These are not identical and have to be converted to cross-check


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  8. #8
    Advanced Member level 3
    Points: 4,911, Level: 16
    Achievements:
    7 years registered
    PA3040's Avatar
    Join Date
    Aug 2011
    Posts
    865
    Helped
    44 / 44
    Points
    4,911
    Level
    16

    Re: Display current location of the vehical

    Quote Originally Posted by c_mitra View Post
    That is very strange; when I put the gps coordinates into the maps.google.com, I get my location accurately (within +/- 5 meters; rough guess).

    Without gps, google can locate you using the towers and the signal strengths (that is not so accurate). Google uses tower location databases which may have some mistakes.
    How should i get the google map coordinates to micro controller, Without using GPS

    - - - Updated - - -

    Quote Originally Posted by KlausST View Post
    Hi,

    You say bus ... does this mean there are predefined routes (in opposite to random driving across the land)?


    Klaus
    Yes..It is predefined routes

    Still I am not clear how should i read rectangular ordinates to show town because I need to show town name certain distance

    - - - Updated - - -

    Quote Originally Posted by betwixt View Post
    For example 'TownCode = Database[Lat][Long];' then a second table to look up the town name against the TownCode number. If you subtract the latitude and longitude of the lowest numbered corner of your region it will make the table indexes as small as possible.

    Brian.
    Say just pass the town code but still in the town



--[[ ]]--