Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: Potentiometer with Continuous Rotation on: February 10, 2011, 06:16:04 am
Quote
$40! Hardly seems 'cheap'!

Notice "cheap" with quotation's either side!!! It was supposed to imply that it is relatively cheap!! Not cheap full stop.......
2  Using Arduino / Sensors / Re: How does Ardupilot do it?? GPS accuracy issues !!! Distance Calculations on: February 09, 2011, 02:13:25 pm
@BenF

Many thanks, for your comment, i did have a good think about the previous statement before instigating it and never actually started writing the code, so all good there.

I'll set about converting the NMEA string to radians tomorrow. Thanks for the detail about how a float is made up, things making more sense now.
3  Using Arduino / Sensors / Re: How does Ardupilot do it?? GPS accuracy issues !!! Distance Calculations on: February 09, 2011, 04:11:53 am
@DCContrarian   Many thanks i'll have a see if i can do as you suggested, seems like a good plan. I'm not sure my coding is up to making a class library, but i'll give it a go and see what happens.
4  Using Arduino / Sensors / Re: Potentiometer with Continuous Rotation on: February 09, 2011, 04:09:05 am
If you are looking for a "cheap" small shaft encoder have a look at http://www.usdigital.com/products/ma3/ if you're in europe and your german is passable (or use chrome and translate feature) you can order online from the german site, or just give them a call in the USA or send a fax ( i know, who thought people still use fax'es).

Hope this helps
5  Using Arduino / Programming Questions / How does Ardupilot do it?? GPS accuracy issues !!! Distance Calculations on: February 05, 2011, 06:22:06 am
Ok, this is a kinda double post. Yes i know i shouldn't but just bare with me, i put it in the sensors subject as it is a gps issue, but i believe it may also be a programming issue and think it would be relevant here, i'm sorry if i shouldn't be doing this, but i'm not sure how to link a topic to 2 discussion groups.

Anyway here's the link.....

http://arduino.cc/forum/index.php/topic,50623.0.html

If anyone here has any ideas it would be really appreciated.
6  Using Arduino / Sensors / Re: How does Ardupilot do it?? GPS accuracy issues !!! Distance Calculations on: February 05, 2011, 06:11:27 am
year, i guess i could put 2 longs together and deal with it that way, but i would still really like to figure out how ardupilot does it?
7  Using Arduino / Installation & Troubleshooting / Re: I2C Issues on: February 05, 2011, 06:07:22 am
the only other thing i have is a gps, servo, led's all stuff that doesn't use i2c, don't have access to an oscilloscope either. Any other ideas really appreciated.
8  Using Arduino / Installation & Troubleshooting / I2C Issues on: February 04, 2011, 09:28:08 am
Hi there, not sure if anyone can help?

I have 2 compass modules, one is the HMC6352 (http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=192) the other one is the CMPS09 (http://proto-pic.co.uk/products/Tilt-Compensated-Magnetic-Compass.html) i've used commonly used code for both compasses and just get a heading of 0 degrees from both.

I did have one of the compass modules (HMC6352) working fine for some time, then suddenly it stopped working, so i bought the second one thinking i had fried the first one somehow, but the CMPS03 compas module doesn't want to work.

Is there a good way to test the I2C interface and prove its working?

Many thanks to everyone/anyone who can help

 
9  Using Arduino / Sensors / Re: How does Ardupilot do it?? GPS accuracy issues !!! Distance Calculations on: February 01, 2011, 03:52:13 am
@wkuace

I think you (or i) my have misunderstood floats, i maybe did not explain fully in my post i should have quoted the entire paragraph, so here it is.

"Floats have only 6-7 decimal digits of precision. That means the total number of digits, not the number to the right of the decimal point. Unlike other platforms, where you can get more precision by using a double (e.g. up to 15 digits), on the Arduino, double is the same size as float."

the 6-7 bit i believe is to take into account the "." in the statement, ie one of the "digits or precision" is the "." so you can further reduce your accuracy if you have a decimal point.

So as i understand it this means that if i have an NMEA statement that says my position is 121°35'.87663 my float will only record 121°35'.8 and who knows whether it will round up or down the following figures to make it .8 or .9.

So now we are up to a 0.099minute out with both the position and the destination waypoint, which then will increase after its put into the haversign formula due to rounding errors.

There is already a thread in the old "read only" http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1294325235 so for more stuff in gps's and floats have a look there.

It's all very frustrating.
10  Using Arduino / Sensors / How does Ardupilot do it?? GPS accuracy issues !!! Distance Calculations on: January 31, 2011, 05:25:51 pm
OK, firstly i'm sorry if this question has been posted elsewhere, i've had a good look in the forum and i haven't really found an answer.

I've read a whole load about calculating gps positions using arduino and the problems relating to accuracy, i know there's a couple of posts relating to accuracy issues and i thought about adding to them, but they're in the old "read only" forum and this is only kinda related.

I know that "Floats have only 6-7 decimal digits of precision" and that doubles are essentialy the same, so my question is.........

How does the Ardupilot module calculate gps distances so accurately? How have those cleaver people worked around the float/double issue?

I'm working with some pretty large distances (up to 1000's of kilometers), so the initial accuracy of the fix during the calculations is really important as is rounding errors!!

Any other work around's would great.
11  Using Arduino / Programming Questions / Re: Calling void's every period of time on: January 30, 2011, 10:02:51 am
Silly me!!! I should have thought of that, did that example not so long ago as well!!!

Thanks very much for the help
12  Using Arduino / Programming Questions / Calling void's every period of time on: January 30, 2011, 09:32:32 am
Hi there everyone,

Before i explain what i am trying to achieve let me first please say i am new to arduino (and programming), so please be kind.

I am starting to write code for a autonomous boat. I have gotten each component working individually and am now working on the code and calculations to get them to work together.

I have a gps, compass, servo for rudder, servo for sail (sail servo not implimented yet, going to start with a electric boat rather than sail boat) and a motor.

What i would like to do is to ask the coding to call the gps say every 5mins then steer the boat via the compass for the remaining time, so my question is what's the best way of doing this?

Do i simply write a "void GPS_course" script, then calculate the number of loop's it takes for 5 mins then say
Code:

if (number_of_loops=5mins)
 {void GPS_course;
i=0;
};


 obviously having replaced "5mins" for a predetermined number of loops, which would be counted by
Code:
i = ++i

and the value of "i" reset inside the if statement.

I'me sure there is a more elegant solution, i just don't know what it is.
13  Using Arduino / Sensors / Re: Measuring point to point distances with accelerometer on: January 29, 2011, 07:00:54 am
I think i may have misunderstood your post slightly, i didn't appreciate that the device would be carried (ie. no wheels etc), in this case, may i suggest the possibility of using say 3 laser range finders, you should be able to hack them to get a serial signal to feed into your arduino, then simply measure the distances and time between measurements and you should be able to get a direction of travel and speed. The more range finders the better, the more readings per second the better. You could alternatively have a sweeping rangefinder (like a radar) and obtain not just movement, but the shape of the area around the device (like a radar), but the time gap between your distance readings may be too grate to get accurate readings.

Taken from wikipedia

"Precision
The precision of the instrument is determined by the rise or fall time of the laser pulse and the speed of the receiver. One that uses very sharp laser pulses and has a very fast detector can range an object to within a few millimeters."

Link http://en.wikipedia.org/wiki/Laser_rangefinder

If the device is to be used outside over large distances i agree with Korman , but you are never going to get the 100mm accuracy you require with a single gps.

Hows the project going?

Oh yeah, almost forgot, the rangefinders will need to be on a panning and tilting head to keep them level and pointing in the same direction. Then it should just be a maths exercise. (you'll need a compass and gyro)
14  Using Arduino / Sensors / Re: Measuring point to point distances with accelerometer on: January 26, 2011, 12:40:24 pm
OK, i think i get the idea of what you are attempting and is in fact used in the real world for submarines, however they use a whole load of accelerometers, some serious computing power (and a whole bunch of other stuff, which i wont bore you with). What others have said is very true regarding the difficulty of achieving the desired results with just an accelerometer.

My suggestion would be to focus on other methods, there are a number of alternatives, you could pull apart an old mouse take one of the scroll wheels out and attach it to your arduino, work out some distance calculations and hey presto (you could use an optical mouse as well), or you could do something even simpler, measure the time taken for the vehicle to cover a number of distances get an average m/s then just run the motors for a given time for each distance (remember, there will be an error which will be compounded over time), or finally use a stepper motor and drive it via that.

And finaly good luck with the whole project and make sure you keep things updated on your progress.
15  Forum 2005-2010 (read only) / Syntax & Programs / Re: Auto pilot help needed on: January 20, 2011, 04:13:19 am
@AlpinWeiss

I did have a think about adjusting for leeway when starting out and planning the project, but to do it successfully you need to know your speed through the water then you need to resolve the two vectors (desired course and speed with actual course and speed), then you get a error between the two if there is leeway, this will then give you a number of degrees to steer "offcourse" to achieve your desired course. See link below for a picture that probably describes things much better than i can.

http://en.wikipedia.org/wiki/File:Leeway_Components.jpg


But if you simply ignore leeway the gps course will change accordingly as you get closer to the waypoint inevitably getting you where you want to go. Not ideal and not how large ships operate, but on a model scale is probably overkill in my opinion.

As regards a 3-axis gyro, you may be able to get an approximation of leeway as regards to heel, but i wouldn't imagine it to be terribly accurate also it would not be able to compensate for tidal drift which would probably affect the model more than leeway (depending where in the world you are of course).

I am thinking about fitting a gyro to help me manage some movable ballast, so if you do come up with some code you would like to test let me know i'd be more than happy to give it a test run.

Hope some of this helps and do message me if i can help anymore.
Pages: [1] 2