View unanswered posts | View active topics It is currently Tue Oct 21, 2014 8:29 pm






Reply to topic  [ 6 posts ] 
Dexter Industries GPS Sensor 
Author Message
Rookie

Joined: Thu May 17, 2012 3:35 pm
Posts: 35
Post Dexter Industries GPS Sensor
Hello

I tested the standard Programm from Xander

It works.

How can I move from 1 point to another?

Code:
    float Lat = (float)DGPSreadLatitude(S1)/1000000;     // Lat will be in decimal degrees ?????
    float Lon = (float)DGPSreadLongitude(S1)/1000000;      // Lon will be in decimal degrees   ?????


Like : goTo .....

I need help, working with Tetrix. There is no script that I can use.

Thanks a lot


Wed Aug 01, 2012 1:51 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 592
Post Re: Dexter Industries GPS Sensor
My final project in college was actually something similar to this, moving a scaled RC tank (which we gutted and rebuilt with sensors and microprocessors) from point A to point B without running into any objects, falling off a curb, or otherwise hampering or damaging the robot (with point A being dynamic).

The way I accomplished this was by using a compass module to set the tank facing due north, tracking where it was starting at gps-wise, and compare it to the 'wanted' value. For simplicity and time's sake (I was trying to cram a semester's worth of work into 2 weeks) I did a simple comparison of latitude vs. latitude and longitude vs. longitude (meaning, how far North/South I was and how East/West I was from the target), then moved in one cardinal direction until I was within range of the desired longitude/latitude. Then, I turned 90 degrees and moved the required direction until the unused parameter (latitude or longitude) met the required distance.

For example; let's say the robot started south-west of the target. I would spin it so it was facing north, then have it move north until the latitude of the robot was near to the latitude of the target (within a few feet). Then, I would spin it 90 degrees to the right so that it was facing due east, and repeat the process until the longitude of the robot was near to the longitude of the target. I would check both latitude and longitude values one more time to ensure that obstacle avoidance hadn't thrown me north or south of my goal too much, then do a victory dance near the target.

Another, more advanced option is to use the GPS values to calculate the angle needed from the start to head towards the target in a straight shot. You would have to convert the differences in latitude and longitude into a base value, find the tangent of said values, and then determine which direction (northeast, southeast, southwest, northwest) you needed to be traveling. Then, you'd need to keep checking to make sure your robot is both on target and hasn't reached the target yet.

Good luck, and let me know if you have any questions!

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Wed Aug 01, 2012 4:34 pm
Profile
Rookie

Joined: Thu May 17, 2012 3:35 pm
Posts: 35
Post Re: Dexter Industries GPS Sensor
Hi

Thanks

Have you got an example program for me?

Greetings

Frank


Wed Aug 01, 2012 5:10 pm
Profile
Rookie

Joined: Wed Dec 01, 2010 7:33 pm
Posts: 10
Post Re: Dexter Industries GPS Sensor
Frank,

We don't have any examples in RobotC right now. However a few years ago, we worked up this example:

http://dexterindustries.com/blog/2010/11/22/dexter-industries-simple-autonomous-robot-gps-sarg/

The programming is in NXT-G however, but it can be used as a template for RobotC.

John

_________________
John Cole
Dexter Industries
http://www.dexterindustries.com
http://www.dexterindustries.com/blog
Image


Thu Aug 02, 2012 8:20 am
Profile WWW
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 592
Post Re: Dexter Industries GPS Sensor
I have a sample program, but it's in BASIC (for Parallax' STAMP microprocessor). If you're interested, I can try to (roughly) convert it to ROBOTC to give you an idea, but it probably won't be drag-and-drop material.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Thu Aug 02, 2012 10:27 am
Profile
Rookie

Joined: Thu May 17, 2012 3:35 pm
Posts: 35
Post Re: Dexter Industries GPS Sensor
Hello John

Can yuo do this for me? Convert it and I will try. Thanks a lot

Greetings Frank


Thu Aug 02, 2012 12:14 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.