Hanskans1
Posts: 1
Joined: Tue Apr 09, 2019 6:16 am

Defining Gps Area

Tue Apr 09, 2019 6:47 am

Dear reader,

I was wondering if there is any software to define a certain area with Gps coordinates.
I would like to make some progress with my rc car project which should drive around in our backyard but should not exit this certain area. If it does it should turn and drive back. I already finished the program to make the car drive so the only thing left is to tell it if it is allowed to go forward without leaving my defined area. The rc car includes a raspberry pi3 and an attached arduino with a gps module.

Thanks in advance

Hans

User avatar
B.Goode
Posts: 7868
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Defining Gps Area

Tue Apr 09, 2019 10:52 am

Welcome to the Raspberry Pi forums.


Have you researched the accuracy/resolution/repeatability of the location data available from common affordable GPS receivers?

I think it unlikely that you will be able to constrain your RC car based on this data alone: it will probably not be sufficiently precise or reliable. A shortcoming of GPS technology, unrelated to its use with an RPi.

But if you want to try: isn't this just an exercise in simple coordinate geometry?

You define a boundary (rectangular would be simplest in the first instance) in terms of 'GPS' (WGS84) coordinates. You find where you are currently located from the live GPS feed. If a planned move would result in your new location being outside the boundary you take appropriate action like backing off or refusing to move, along with a report to the user.

mattmiller
Posts: 2063
Joined: Thu Feb 05, 2015 11:25 pm

Re: Defining Gps Area

Tue Apr 09, 2019 12:52 pm

If you can afford to use another Pi with a camera and you can mount it to look across the area, you can get it to decide whether your car is exceeding its area bounds and send it a signal (i recommend MQTT for this).

The hard part is getting the car to be uniquely recognised - you can use colour for that if car can be coloured sufficiently different to the background

User avatar
omegaman477
Posts: 147
Joined: Tue Feb 28, 2017 1:13 pm
Location: Sydney, Australia

Re: Defining Gps Area

Tue Apr 09, 2019 2:25 pm

Hanskans1 wrote:
Tue Apr 09, 2019 6:47 am
Dear reader,

I was wondering if there is any software to define a certain area with Gps coordinates.
I would like to make some progress with my rc car project which should drive around in our backyard but should not exit this certain area. If it does it should turn and drive back. I already finished the program to make the car drive so the only thing left is to tell it if it is allowed to go forward without leaving my defined area. The rc car includes a raspberry pi3 and an attached arduino with a gps module.

Thanks in advance

Hans
This Python Library will handle the bulk of the cartesian and Sexagesimal mathematics required. There are similiar libraries for most languages and O/s
..the only thing worse than a stupid question is a question not asked.

gordon77
Posts: 4003
Joined: Sun Aug 05, 2012 3:12 pm

Re: Defining Gps Area

Tue Apr 09, 2019 3:39 pm

Here's an example that will drive a relay if you are in range of a fixed point, l am sure it will give you some ideas...

viewtopic.php?t=107607

blimpyway
Posts: 78
Joined: Mon Mar 19, 2018 1:18 pm

Re: Defining Gps Area

Wed Apr 10, 2019 11:59 am

omegaman477 wrote:
Tue Apr 09, 2019 2:25 pm
...

This Python Library will handle the bulk of the cartesian and Sexagesimal mathematics required. There are similiar libraries for most languages and O/s
...and the library is.. which one?

Return to “Automation, sensing and robotics”