View unanswered posts | View active topics It is currently Fri May 25, 2018 9:07 am

 Page 1 of 1 [ 6 posts ]
 Print view Previous topic | Next topic
Dexter Industries GPS Sensor
Author Message
Rookie

Joined: Thu May 17, 2012 3:35 pm
Posts: 38
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

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
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 updated help documentation and the ROBOTC Forums.

Wed Aug 01, 2012 4:34 pm
Rookie

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

Thanks

Have you got an example program for me?

Greetings

Frank

Wed Aug 01, 2012 5:10 pm
Rookie

Joined: Wed Dec 01, 2010 7:33 pm
Posts: 10
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

Thu Aug 02, 2012 8:20 am

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
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 updated help documentation and the ROBOTC Forums.

Thu Aug 02, 2012 10:27 am
Rookie

Joined: Thu May 17, 2012 3:35 pm
Posts: 38
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
Display posts from previous:  Sort by
 Page 1 of 1 [ 6 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning