LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get geographical location without GPS sensor??? Using internet ip address approximation??

Solved!
Go to solution
Highlighted

Hi 

I am doing a project with sensor nodes and using the Cloud to help with the node energy management. Basically labview should be connected with the node and from time to time receive data. The data is stored in the cloud. Up to this step, everything is fine.

The cloud should also receive the GPS location, thus if in the cloud there are recent data related to that gps location, labview would check that and would not request data to the sensor node (help saving energy).

My problem is that I do not have a GPS sensor, however I know that in the internet, websites such as google maps, can approximate your location (i believe with a ip triangulation technique). So, the only thing that i wish is to acquire this information in real time with labview. How can I do that?

0 Kudos
Message 1 of 12
(2,066 Views)

You use e.g. https://www.iplocation.net/ (or rather one of the services they list) to check for an address.

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 2 of 12
(2,054 Views)

@Yamaeda wrote:

You use e.g. https://www.iplocation.net/ (or rather one of the services they list) to check for an address.

/Y


You should always double check these services. Often they just do a "Who is" and only report the location of the person or company who registered the domain by reading the registrar address from the who is database. 

 

In the case of a nationwide ISP the registrar address could easily be in another town or state.

 

For instance I have Comcast and iplocation says I am in a town 20 miles away where Comcast's headend is located, but at least it did not say I was in Philadelphia where Comcast headquarters is located.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
Message 3 of 12
(2,019 Views)

There are of course issues with using an IP address to geo location look up.  In practice it probably works fine in most cases.  But then there are the cases where every IP address in an entire country is shared.  Most aren't this extreme but according to Wikipedia the country of Chad has about 4,000 IP addresses but has a population around 10 million.

 

Or there are the cases where an IP address can't be looked up and in those cases some services will just pick this random house in Kansas which has over 600 million IP addresses associated with its geo location.

 

Just keep these things in mind when you get results from these address look up sites.

0 Kudos
Message 4 of 12
(1,999 Views)

@Hooovahh wrote:

There are of course issues with using an IP address to geo location look up.  In practice it probably works fine in most cases.  But then there are the cases where every IP address in an entire country is shared.  Most aren't this extreme but according to Wikipedia the country of Chad has about 4,000 IP addresses but has a population around 10 million.

 

Or there are the cases where an IP address can't be looked up and in those cases some services will just pick this random house in Kansas which has over 600 million IP addresses associated with its geo location.

 

Just keep these things in mind when you get results from these address look up sites.


Actually considering serial breakout GPS modules can be had for an little $20, it seems silly to not just add one if you really need to know your devices location.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 5 of 12
(1,994 Views)

You don't say if the equipment is fixed or mobile. if the equipment is at a fixed location, you can overcome the problems of the unreliabi!ity of ip geolocation and of indoor gps reception by storing the location as part of the configuration details.

 

Ip geolocation can be very inaccurate. I just did a geolocation of my ip address. None of the results was close. I was recently using the guest wifi facility at a UK office of large American company. I had problems using one particular website, as geolocation put me in the USA. I presume that either the IP address was recorded as being at corporate HQ, or that the office was on a VPN to the USA.

 

Rod.

0 Kudos
Message 6 of 12
(1,967 Views)

Hey,

Thanks for the replies

I actually do not have time to order a gps sensor. I do not need a precise location, since it is just for tests. In the future, if the application works fine, i can get a sensor. However, what I really want to know is:

 

-in Labview, how can get the geolocation based on IP triangulation? Like, Do i have to import it from a website? if so, how can I do this?

 

thanks again

0 Kudos
Message 7 of 12
(1,926 Views)

@carnage90 wrote:

Hey,

Thanks for the replies

I actually do not have time to order a gps sensor. I do not need a precise location, since it is just for tests. In the future, if the application works fine, i can get a sensor. However, what I really want to know is:

 

-in Labview, how can get the geolocation based on IP triangulation? Like, Do i have to import it from a website? if so, how can I do this?

 

thanks again


Probably the easiest way would be to install Microsoft's Whois client and have LabVIEW do a Whois https://technet.microsoft.com/en-us/sysinternals/whois.aspx

 

First using the systemexec do an ipconfig and parse your domain out of the responce.

Then again using the systemexec do a whois on the domain and parse the location out. 

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 8 of 12
(1,904 Views)
Solution
Accepted by topic author carnage90
0 Kudos
Message 9 of 12
(1,896 Views)

That seems to be a good idea
Would you have a link that I can use to learn how to use the API in labview?

0 Kudos
Message 10 of 12
(1,878 Views)