328 reputation
149
bio website tgohome.com
location Basingstoke, United Kingdom
age
visits member for 3 years, 5 months
seen May 12 '11 at 19:28

Ubuntu 10.04 User.

Uses Windows XP sometimes. Hates Vista with a passion. Interested in Windows 7, though haven't tried it much.

Programs PIC microcontrollers in C and assembly. Favours dsPICs at the moment, but hasn't tried any other microcontroller yet.

Prefers Python any day!


Feb
20
awarded  Notable Question
Dec
3
awarded  Good Question
Apr
11
awarded  Famous Question
Oct
3
awarded  Popular Question
Jun
6
awarded  Notable Question
Nov
18
awarded  Popular Question
Oct
26
awarded  Yearling
Oct
3
awarded  Nice Question
Dec
4
comment Lat/Lon/Alt to spherical or cartesian coordinates
@whuber: These errors are tolerable.
Dec
4
awarded  Teacher
Dec
3
answered Find the best path along raster
Dec
3
comment Quick way to determine if facing a given lat/lon pair with a heading
Actually, I created a second question for this, because it sounds like a good optimisation: gis.stackexchange.com/questions/4147/…
Dec
3
asked Lat/Lon/Alt to spherical or cartesian coordinates
Dec
3
comment Quick way to determine if facing a given lat/lon pair with a heading
Do you have any tips on converting the coordinates? The position of the viewer may move so these would have to be updated, but if the cost is only a few sin or cos calculations when the coordinates change it would probably be worth it.
Dec
3
comment Quick way to determine if facing a given lat/lon pair with a heading
@whuber: Yep, it's probably a better idea because the fixed point library also uses the 40-bit accumulators which support add, subtract, multiply, multiply-accumulate, euclidean distance etc. But these are only available on the dsPIC33F processors and I'm hoping to migrate to PIC24 after a while, which doesn't have these accumulators. So I might have to stick with floating point for now. It renders at about 20-30 frames per second, which is fast enough for me.
Dec
3
comment Quick way to determine if facing a given lat/lon pair with a heading
@whuber: My MCU manufacturer (Microchip) have a software fixed point Q16 library. I was considering using it; it might be faster. It has most trig functions.
Dec
3
comment Quick way to determine if facing a given lat/lon pair with a heading
@whuber Don't have Excel, but I think OpenOffice.org Calc has a solver like function. Or I could use Python.
Dec
3
comment Quick way to determine if facing a given lat/lon pair with a heading
@whuber Thanks for the approximation. I could also use this to rotate the viewport. Every cycle counts! Do you know of one from 45..90 degrees?
Dec
3
comment Quick way to determine if facing a given lat/lon pair with a heading
@whuber, Without a hardware FPU, a division is about 300 cycles; atan2 is about 800 cycles. Cosine is about 500 cycles; plus two divides and it might be about as fast. I like this solution though because it works well enough. A future version will have a more powerful (about 8x faster) processor so I might be able to slip some more operations in. Maybe I could even find one with a hardware FPU, or switch to using fixed point math.
Dec
3
awarded  Commentator