On Fri, Oct 23, 2009 at 10:40:29AM +0100, James Turner wrote: > I am not looking to physically model GPS reception, of course: what I > want is a filter I can apply to the raw /position values that gives > plausibly imprecise values. Ideally, the filter would support a > tuneable precision parameter, so I can model selective availability, > WAAS and poor reception (crudely) by adjusting the precision input.
How simple do you want? Didn't bother with SA but easy to add. A = 2.7x10^-5 + (NW * 10^-4) + (BC * 2.7*10^-4) A1 = A A2 = A / (cos(tlat) + .0001) lat = tlat + A1 * sin(min*21) lon = tlon + A2 * sin(min*27) if (lat > 90) lat = 180 - lat; if (lat < -90) lat = -180 + lat; if (lon > 180) lon = -360 + lon; if (lon > -180) lon = 360 - lon; tlat and tlon are true lat and lon angles are in degrees min = time in minutes NW = 0, except 1 when no WAAS BC = 0, except 1 when bad conditions Assumes a pure sinusoid with a frequency of about 15 min. This would nominally be a factor of 24 (for angle in degrees) but 21 and 27 were used so lat and lon changes are out of phase. The amplitude of the noise is based on 3m accuracy at the equator (360 deg / 4x10^7m circumference = 2.7x10^-5). When WAAS is not present, the amplitude is increased to 15m. When bad conditions are present the amplitude goes to 33m at best (number is just a guess). The amplitude for the longitude change is then increased as you get closer to the poles. Safeguard added to prevent things things from blowing up if you are manage to hit a pole. Finally, if the lat, lon are greater than 90, 180 fix them. -- James Treacy tre...@debian.org ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel