Thursday, October 08, 2009

Off by a factor of 57.295779513.....

I've been playing with the high accuracy RTK GPS on the helicopter.
The software reports stunningly consistent positions etc....
But visually the helicopter wanders all over the world.

I've jsut solved it.
The Old GPS reports position in degrees, new GPS reports position in Radians!
Arghhhhh! Since I never actually looked at the lat lon positions I just told the vehicle to remember where "here" is and report distances from that reference point I never noticed.

I like using the binary records from the GPS's as parsing NEMA style text is a conversion that is not needed. If the binary record reports IEEE double format just use them. Alas The two GPS have different byte orders as well one is big endian one little endian, one reports velocity as heading and speed, one reports as vnorth and veast. I got all of these conversions working, but missed the radians/degrees difference. I'm tired and in a hurry, not the best situation for quality software. If NASA can make these kind of errors I guess I'm in good company. (Remember Mars Climate Orbiter?)

6 comments:

Anonymous said...

No, but I remember Ariane 5 using software from Ariane 4 that had some assumptions about acceleration rates I think, and it blew up because it experienced numerical overflow.

Ariane 5 Numerical Overflow

David said...

At least you found it before you sent it on its LLC flight. It is also great that your main focus at the moment is the control code rather than building hardware.

Anonymous said...

I love finding root-cause-type bugs.

C. Scott Ananian said...

Rock on! Just recompile and fly, right? ;-)

Ian Kluft said...

Yeah, I remember the Mars Climate Orbiter. The joke since then (which some people still get) is that after any major unit conversion error, "Hey! You could work for Lockheed." :-)

Good luck in the LLC flights. Every success helps NewSpace get ahead.

merlie said...

Really great ideas. I like every example. Just might have to try these... So cute! Thank you!
more templates easy to download