v2.3.4
Changes from v2.3.3 to v2.3.4
=============================

SPEEDBOX:

* Added the integrated distance RT message (message 78).

* Updated the RT RTK yaw message to the current spec (added the accuracy byte).  Note that this requires an up-to-date version of the RT software to decode it properly.

* Implemented the accuracy byte in the RT RTK pitch message (previously this was left at zero).

v2.3.3
Changes from v2.3.2 to v2.3.3
=============================

Core GPS Code:

* Several bug fixes and tidy-ups have been done to the core code during mk2 development - these are now in the mk1 firmware from this version onwards.  The user visible bug fixes are:

* (v3.1.0) * Fixed a bug (found by Andy) whereby the heading during a doppler lock was being averaged over 2 epochs, and hence intermittently giving incorrect headings close to zero when near the -180/180 boundary.  This bug seems to have survived undetected for a long time, presumably because it is only tickled when driving almost due South with doppler lock but no carrier!  The heading is now calculated from the average N and E velocity vectors over the 2 epochs.

* (v3.1.3) * Fixed a bug (found by Crazy) that resulted in longitude being output incorrectly West of -90, and possibly East of 90 as well.  This bug must have been present since the very first Speedbox was shipped in 2006, but no-one has ever reported it!

BRAKEBOX:

* Fixed a bug whereby new config could not be written and the unit would lock up if no config was present.

ALL:

* Updated gps.c to match non-user-visible changes in the core GPS code (see notes in the mk2 branch change log for details of the changes to the core code).

* Updated the leapseconds value from 14 to 15 due to the leap second inserted on Dec 31 2008.  I don't think this matters for the mk1 units, since they don't output NMEA messages that use the UTC time, but it might as well be correct!

v2.3.2
Changes from v2.3.1 to v2.3.2
=============================

When the low-speed clamp is configured to a non-zero value, heading and gradient will now be held at their last known good values when the speed goes below the low speed clamp value.  This was at the request of Bosch/Axilane.

v2.3.1
Changes from v2.3.0 to v2.3.1
=============================

*** NOTE ***

I discoved whilst building this version that the new TI c6000 build tools, v6.1.3, break the code - the divergance detection of combined and GPS speed doesn't seem to work.  I reverted to 6.0.19 - test VERY thoroughly if moving to 6.1.x again.

************

Added a cumulative distance output to CAN, requested by Bosch/Axilane.  This starts integrating the combined speed 1s after the first GPS velocity lock is obtained, and continues integrating henceforth regardless of GPS lock status.  Made this message 0x50A, and shifted the RTK messages to 0x50B - 0x50D.

v2.3.0
Changes from v2.2.4 to v2.3.0
=============================

SPEEDBOX:

Analogue output is now fully configurable.  The latest version of the configuration utility is required to support this.

RT message output has been overhauled to use a circular buffer like the new code, and the RT messages output are now configurable using the latest configuration utility.

The configuration stuff has been overhauled.  It is now no longer necessary, nor possible, to add the default config to the hex file for flashing.  The unit contains the default config in code, and when the interactive configuration utility is run with send config for the first time, the configuration gets written to flash.  This prevents overwriting of calibration constants when the unit is reflashed.  To make this possible under all circumstances, the config size may now safely increase from version to version, and the firmware version is now embedded in the config, so the unit now knows if it is reading config written by an earlier firmware version, so that any given message may have it's meaning safely changed between versions.

A factory calibration mode has been added.  This is activated using the configuration tool in factory mode, and sets the unit to output a constant 100m/s until it is power-cycled.

Fixed a bug in the interactive configuration code, whereby the response to the configuration handshaking was selected based on the value of an uninitialised variable, potentially resulting in the config utility being randomly unable to connect.

GPS gradient is now output over CAN, message 0x509.  The RTK messages 0x509, 0x50A and 0x50B have now become 0x50A, 0x50B and 0x50C respectively.

Gradient and VELNED messages have been added to the available RT messages.

Core GPS code:

Renamed GpsNavigationData members "Pitch" and "PitchAccuracy" to "Gradient" and "AccuracyGradient".  Reversed the sign of the gradient calculation in order to give +ve gradient uphill and -ve gradient downhill.

Added a GPS output data structure to support the configurable analogue stuff in the Speedbox.

v2.2.4 (Brakebox only)
Changes from v2.2.3 to v2.2.4
=============================

BRAKEBOX:

Fixed a critical bug in the MFDD calculation, reported by Axilane.  Insufficient precision was used when differencing 2 GPS time of weeks, which are potentially large floating point numbers with small differences, and hence required double instead of float precision.

v2.2.3
Changes from v2.2.2 to v2.2.3
=============================

ALL:

Invalidated GPS solution at speeds in excess of 1000knots (~514m/s) and altitudes above 18000m, in order to avoid being classed as weaponary by the US government, at the request of Al.  Also clamped combined speed to 514m/s for the same reason.

SPEEDBOX:

All of the GPS CAN messages are now output at 1Hz together with the status message until a GPS lock is obtained, to help customers with Kvaser CAN loggers who had reported that the Kvaser logger determines the available messages from the first minute of data, which meant that a long GPS lock-on time could result in no apparent GPS CAN data, only acceleration, combined speed and status messages!  Before a GPS lock is obtained, the data is simply zeroed out.

Added a configuration option for the CAN heading range, to avoid having to do special versions for Bosch each time, who wanted the CAN heading output between 0 and 360 degrees instead of the default -180 to 180 degrees.  This is now configurable using the configuration program.

v2.2.2
Changes from v2.2.1 to v2.2.2
=============================

SPEEDBOX:

Added the ability to turn off the 200Hz combined speed and acceleration RS232 output, for GPS only applications, such as skiing. (Switched by defining "MATTHIAS_SKI_SPECIAL" in gps20_setup.h).

Tidied up the accelerometer reading and DAC writing code a lot whilst tracking down the accel dropout bug (which turned out to be a hardware issue).  The new code is much neater, saves 0.8K in debug mode, and doesn't violate the 2 bit clock delay between SRGR start and XMT/RCV start for the MCBSP after mode change as the old code did.

BRAKEBOX:

Fixed an uninitialised variable bug, that could occasionally wreak havoc (hMcbspPic).

Increased the KNL stack size from 0x3000 to 0x4000, since 0x3000 was overrunning in the debug build.  Decreased the menu task stack to 0x1000, from 0x1930.  

Working stack sizes for debug and release were:     KNL:    0x3000 (release), 0x4000 (debug).
                                                    Menu:   0x800  (release), 0xC00  (debug).
                                                    
Added a check for run times more than 1024 times the time table resolution when generating tables, to stop the time table generating more than 1024 lines and wrapping.  The path distance table still has the potential to do this, but is harder to guard against.

Added an error message when attempting to load a corrupt run from memory.  Probably found because of the uninitialised variable problem above!!!!!

v2.2.1
Changes from v2.2.0 to v2.2.1
=============================

ALL: 

Fixed a bug in the GPS1 uart resetting code, which where a typo meant that a couple of operations were done on XMIT uart instead.  Yikes! - could certainly have potentially affected the Brakebox, which uses the XMIT uart.

SPEEDBOX:

Changed the CAN output accel units and scaling - is now g * 1000, was previously m/s^2 * 256.

BRAKEBOX:

Added display of current speed whilst armed in pulse-trigger mode (already displayed in speed-triggered mode).

Fixed a bug whereby trying to display the results of a test with no data points locked the program.  Tests with less than 2 data points are now simply displayed with zeroed out and clearly invalid data.  Although I discovered the lock-up condition when a bug during development wrote zero-length tests, it might have been thoretically possible that a user might have been able to write a 1 sample test and break it.  Anyway, it's more robust now!

Added an auto-arm facility (mode serial) as requested by Axilane/Bosch.

Changed a couple of translations, supplied by Stphane at Axilane.

Changed the release compiler optimisation settings to be less aggressive - o0 I think.  I am happy with the stability of the release build now.


v2.2.0
Changes from v2.1.4 to v2.2.0
=============================

SPEEDBOX:

Fixed a bug reported by Bosch to Axilane, whereby the CAN output could not be switched from 29 to 11 bit addressing.  Also required a new version of the PC config software.

BRAKEBOX:

First multi-lingual implementation - added French and German translations by Stephane at Axilane.

Added configurable MFDD thresholds.

Added configurable start exceed speed threshold for the speed-triggered case.

Added display of time and speed for pulse triggered tests during tests (done before actually, not sure when!).

Changed target speed displayed in the "accelerate to" menu during arming for speed-triggered test to the test start value PLUS the exceed threshold, to make it more clear what speed has to be reached.

Generally cleaned the menu display code up a lot, largely prompted by the extra languages, which meant a lot of hardwired cruft had to be done properly!

Improved the consistency of the return to an upper menu level using the MENU key, since it would jump up 2 or even 3 levels from some locations.  It now returns to 1 level above from all locations.

v2.1.4
Changes from v2.1.3 to v2.1.4
=============================

All:

Passed the NAV message instead of the NAV2 message to the uBlox module at startup for loggers >= serial number 60, since we're flashing with TIM-LF v3.01 now, instead of TIM-LL 3.04 as before. 

v2.1.3
Changes from v2.1.2 to v2.1.3
=============================

BRAKEBOX:

Added configurable LED brightness.

Added underscore and numerical digits to allowed characters in saved file names.

Reversed the key direction for setting the file names (the 'UP' key now increases the letter alphabetically instead of decreasing it).

v2.1.2
Changes from v2.1.1 to v2.1.2
=============================

SPEEDBOX:

Improved the accel/gps combining filter for high dynamics.  The speed accuracy is improved at high rates of acceleration, with only an insignificant increase in noise at steady state.

v2.1.1
Changes from v2.1.0 to v2.1.1
=============================

ALL:

Output an RT format timestamp message so that the monitor software can graph the results.

SPEEDBOX-RTK:

Fixed an uninitialised variable that could cause the "88.88m/s" failed security indicator to be output.  Removed some of the security code that wasn't used in the RTK version to save memory.

Fixed a bug whereby incoming serial chars from the PC could break the uBlox2 communication since the PC and uB2 UARTs shared the same DSP interrupt.  The logic to detect another pending interrupt at the end of the ISR didn't always handle pathological timing between the 2 incoming interrupts.  Now the interactive config software works perfectly with the RTK box.

(The 2 bug fixes below might have been applied to the previous version, or even the subsequent version, can't remember exactly when they were fixed.)

Fixed a bug where 16 satellites could break the solution.

Fixed a bug where single differencing was always on, regardless of the configuration value.

v2.1.0
Changes from v2.0.0 to v2.1.0
=============================

ALL:

The various version defines (SPEEDBOX, GPS20_RTK and BRAKEBOX) are now defined in the project files, and so don't have to be changed in gps20_setup.h each time.

Changed the status indicator for all units.  It is now:
Short flash at 1Hz - position only or doppler speed (ie. lock, but no carrier).
50% duty cycle flash at 1 Hz - carrier lock.
Continuously on - RTK lock.

The gpshexconvert program now no longer adds the default config by default, since in general the customer should reflash with a hex file containing no config to avoid overwriting the calibration.  The hex file containing the default config for first flash is clearly labelled "-default_config."

SPEEDBOX:

Changed the CAN message channels.  This is IMPORTANT since matching changes in the config software were required, so the new v7 config is required to correctly configure v2.1.0 firmware onwards.  Very few v2.0.0 boxes escaped into the wild, so for all intents and purposes this is the v2 onwards CAN configuration.

Added a user-configurable low-speed zero clamp.  Setting the clamp value to zero (default) turns it off.

Removed some Brakebox code from the Speedbox project that was inadvertantly getting compiled in - saves 3K.

GPS20-RTK:

Got it working again!

Added an extra elevation mask for the RTK solution, which kicks in IF there are enough svs at that elevation mask setting (20deg), if not we revert to a lower one (15deg), and finally the old one (10deg).

Loosened the lock thresholds slightly (factor of 1.5 I think) once a lock has been obtained for a short while, made shorter when the vehicle is moving (since it is then harder to get a persistent false lock).  This means that the lock thresholds are still tight for initial lock, to reduce the chance of false lock, but loosen once we are sure we have a correct lock (moving and lock maintained) to reduce the chance of dropping out for a epoch of slightly less good data.

The combined effect of the two changes above was to make the output from the sample moving data significantly cleaner, with several single epoch dropouts cleaned up.

Removed the security check from the RTK code - it's got enough to do as it is!

BRAKEBOX:

Updated the Brakebox code to compile again with all the recent changes.  First working Brakebox code since v1.2.0.

Removed the security check from the Brakebox code - the Brakebox code now doesn't care about the PIC.

Added output of the firmware version no. on the Brakebox GUI (under Configuration->Version).

v2.0.0 (SPEEDBOX only)
Changes from v1.3.3 to v2.0.0
=============================

Changed the pulse output to run off the DSP instead of the PIC.  Requires hardware changes to top and bottom boards.  This pulse is *MUCH* better!  Implemented configurable pulse high time and 50% duty-cycle.

Added 200Hz CAN output of combined speed and acceleration, cleaned up the CAN code greatly.

Improved the trimming algorithm, based on Andy's work using the analysis software.  Now has a 'mid' term, in additional to proportional and integral terms, and improved divergence logic.

Added a non-customer option within the code to put out a 128g accel spike every second aligned with the PPS boundary, to aid Andy in doing the accel/gps combining within the analysis software.

Added an option to output only GPS speed (not combined) over pulse and analogue at 0.1s latency for boats and other applications where accelerometers are not reliable.

Added calibratable offset and gain to the accelerometer readings and the DAC output and config messages for them.  Cleaned up the config code greatly.

Fixed several bugs in the accelerometer and DAC SPI code for the new interface board.  Data was not getting clocked on the correct clock edge or not correctly aligned with the clock.

Fixed a bug reading the accelerometers - MSB must be read before LSB to avoid register update on the accelerometer during reading of a value.  This bug showed up as occasional spikes when crossing the zero point, where low and high bytes from +ve and -ve (or vica-versa) numbers were getting mixed.

Fixed an obscure accelerometer bug - some topboards would get a 0.5g offset on the longitudinal accel after a short while.  Added an extra dummy hMcbspAccel write of zero and read after setting the mode back from the DAC mode - this seems to have fixed it on all affected boards, although I don't really know why.

Added a scheduler to run the periodic functions, since we now use the second timer for the DSP pulse, and hence can't use the DSP/BIOS scheduler.  Essentially, we run our own equivalent of the DSP/BIOS clk, but with the ability to phase-lock our scheduler to the GPS pps signal, which of course the DSP/BIOS can't do!  As part of this, improved the phase locking of the accel timer (now used for the scheduler as well) by using the timer properly - we no longer need to trim it since we don't stop it when it interrupts.  Also switched the counting of the accel reads so that the first read 5ms after the PPS is now counted as read 1 instead of read 0, hence the mid value for the trimming routine is now read 5, 15, 25 etc, instead of 4, 14, 24 etc as before.

v1.3.3
Changes from v1.3.2 to v1.3.3
=============================

SPEEDBOX:

Added config options for pulse high time and 50% duty-cycle pulse.

Core GPS code:

Tidied up the extract subframe functions, due to selling this bit of code to OTS.  In particular, the requirement for an extra padding byte to be present in the data for ExtractOrbitData() and ExtractIonosphereData() has been removed, and the start position of the array passed in changed in gps.c to reflect this.  HENCE THE CURRENT CORE CODE AND THE CURRENT SPEEDBOX etc CODE HAVE MATCHING CHANGES AND BOTH ARE INCOMPATIBLE WITH EARLIER VERSIONS.

v1.3.2
Changes from v1.3.1 to v1.3.2
=============================

GPS20-RTK:

A serious regression in RTK solution stability reported by Denso between v1.1.1 and v1.3.0 onwards of the software was finally traced to the switch from debug to release compiler settings in order to fit the compiled code into the internal memory of the DSP.  A set of compiler flags that works to reduce the code size without introducing the solution regression has been found - these are:

No -ms (ie. speed most critical, no optimising for size)
No -pm (ie. no program mode optimisation)
-o1 (ie. local optimisation only).

ALL:

Added support for the new version 1.3 interface board, which has new accelerometers and DAC.  The reflasher code sets hardware version & 0x04 to indicate the new interface board.

BRAKEBOX:

Still not tested, still need to use v1.2.0.

v1.3.1
Changes from v1.3.0 to v1.3.1
=============================

ALL:

The accuracy estimate overhaul turned out to have a few problems.  In particular, valid accuracies were being reported for 4 Sv, which can by definition have no residuals.  There were other probs as well - such as the error weighting being set to allow up to 16 Sv, which meant that at normal numbers of svs the accuracy was still biased more towards the observable noise and less towards the residuals.  We are still using the standard deviation of the residuals and the PDOP, instead of just the mean as in v1.2.0 and earlier, but the numbers are smaller than in 1.3.0 again.

In the speed calculation code, there is a trap for rediculosly large velocity values, eg > 1000m/s.

SPEEDBOX

Accuracy estimation thresholds have been tweaked to improve the combined speed performance back to what it was in v.1.2.0 (it was seriously broken in v.1.3.0!).

BRAKEBOX

Not tested in this version - will need accuracy estimates tweaked - use v.1.2.0 for BRAKEBOX!!!!!

v1.3.0
Changes from v1.2.0 to v1.3.0
=============================

ALL:

The position and velocity accuracy estimates have been overhauled, using PDOP, TDOP and GDOP.  They are now significantly larger numbers, which look a lot more realistic.

SPEEDBOX and GPS20-RTK:

Interactive configuration has been added.  Versions older than v1.3.0 can no longer be configured with the new configuration tool.  However, the old configuration tool can still configure the newer versions.

GPS20-RTK:

Lots...

v1.2.0
Changes from v1.1.3 to v1.2.0
=============================

SPEEDBOX:

The pulse output is now a frequency proportional to speed, and no longer tracks integrated distance exactly.  New PIC firmware is also required, and hence this version of the code requires a reflashable PIC to be installed on.

GPS20-RTK:

Analogue A and B now output yaw and pitch instead of long and lat accel respectively.

BRAKEBOX:

The BRAKEBOX will now automatically abort a brake test if the GPS reception is not adequate (based on the speed accuracy value).  This will be notified to the user via. a message on the display.

The MENU button can now abort the setting of speed trigger mode from the speed value set field (and ditto for end trigger mode).

v1.1.3 - 14/11/06
Changes from v1.1.2 to v1.1.3 (SPEEDBOX only)
=============================

SPEEDBOX:

Corrected a bug whereby the iterator returned from TopLevel indicating the GPS status could show failure when only the carrier had failed, but doppler and position were OK.  Hence the combined speed would often drop out when it shouldn't.

Increased the allowable integral correction maximum and minimum values for the combined speed to cope with a wider range of gradient and mounting angle.

Put in a 5 epoch reasonable data average requirement for combined speed in addition to the 1 epoch good data requirement, to catch the observed case where 1 or 2 epochs of bad data during a dropout are occasionally flagged OK by the speed acc.  This is a tradeoff though, in that now occasional epochs of genuinely good data within noisy data may be passed over :-(

At this point the SPEEDBOX is regarded as production-ready, the only remaining issue being possible issues with the frequency pulse that might be fixed at the PIC end.

Changes from v1.1.1 to v1.1.2 (BRAKEBOX only)
=============================

BRAKEBOX:

Fixed a bug introduced during the 16bit flash storage conversions whereby runs longer than half of remaining capacity were informed that memory was full even when sufficient capacity was available.

Fixed another 16bit related bug whereby the erase memory dialog wasn't progressing across all the dots (cosmetic).

Removed the defined support for the old byte-style flash access and the old double-style raw data storage, cleaning up the code significantly.

Fixed speed and speed acc. display to show only 1 decimal place instead of 4.

Allowed in-progress brake tests to be aborted by a long press of the MENU button.

Shows elapsed time during a test.  (label was already there, but the value was not populated).

Fixed a critical bug whereby saving a run longer than the entire flash length wrapped round and corrupted the boot loader rendering the unit useless!

Fixed a serious bug whereby table values were incorrect when the independent variable was distance in feet.

Changes from v1.1.0 to v1.1.1 (all branches)
=============================

NOTE:

SPEEBOX now builds in release configuration.  GPS20-RTK will compile in release, but gives checksum errors on GPS2, so is build in debug mode.

SPEEDBOX:

Up to 400 pulses per meter are now allowed.

BRAKEBOX:

BRAKEBOX flash run storage now starts at 0x50000, and v1.1.1 is NOT backwards compatible with previous versions.

GPS20-RTK:

Yaw and Pitch serial messages in RT format added.

ALL BRANCHES:

All branches now have a "GPS status" LED.  This is linked to the status of GPS1, and is permamently on for carrier speed lock, flashing with 50% duty cycle at 1Hz for doppler speed, and flashing at approx 5% duty cycle at 1Hz for position only.

All branches are now capable of reflashing the PIC.  PIC code is stored at flash offset 0x48000.  Hence the BRAKEBOX flash changes above!  Note that the PIC code is also updated at the same time.

The delay routine was changes slightly to make the delays roughly the same length in both debug and release mode.  Some delays in the Antaris code then had to be lengthened to make the code work again (configuring the uBlox).

v1.1.1 is the first genuinely production-ready build!

Changes from v1.0.6 to v1.1.0 (BRAKEBOX release)
=============================

BRAKEBOX:

Changed raw data storage format from double to int.  Added storage of velocity accuracy.  Byte size per sample is now 20 (5x4) instead of the previous 32 (4x8).

Changed flash memory addressing to use the whole 16 bit word.

The combined effect of the above 2 changes is to increase the storage capacity from about 20min to about 1hour, but the changes ARE NOT BACKWARD COMPATIBLE - the new code cannot read runs saved into flash by the old code.

Added the run file output to RT analysis software.

Changed the order of storing and printing data so that data is stored before printing.  Then the stored data name can be output at the top of the printout as for recalled data.

Sorted out compiling in release configuration.  This was necessary as the debug build no longer fits into the 256K of IRAM.

Changes from v1.0.5 to v1.0.6 (v1.0.6 is a release of the RTK branch only)
=============================

Core GPS Code:

Added check for SBAS satellites in DecodeAntarisModule and reject them to avoid possible out of bounds array indexing in rest of code.

Have separate smoothed and non-smoothed Xr positions in nav structure (added in v1.0.5 but some issues fixed in v1.0.6).

Only return one value from Standalone etc since shifting negative values breaks things!

Initialise accuracy estimates to 1000 instead of zero so the (accuracy < x) checks work properly.

In CalcAzEl, avoid taking srqt of negative number.

In CalcSpeedsHeadings, use fabs when setting accuracy estimate in order to avoid possible negative accuracy, which once again breaks (accuracy < x) type checks.

Add accuracy checks on the doppler velocity (already done wrt the carrier velocity) before using in critical parts of the code, such as the initial position estimate.

After the bug fixes above, the core solution code appears to work much more robustly on mobile data.

Changes from v1.0.4 to v1.0.5 (v1.0.5 was a release of the RTK branch only).
=============================

First working RTK code added.

----------------------------------------------------------------------

Changes from v1.0.3 to v1.0.4
=============================

Core GPS Code:

Fixed an indexing bug in the carrier speed code where the satellites from the current and previous epochs are matched.  This could break the carrier speed code with a -2 return.

Allowed the desired and minimum iteration tolerance to be passed to Standalone.  Hence a lower minimum tolerance can be used for the position and doppler calc than the carrier calc.  This allowed doppler speed measurement to come on line when conditions were not ideal and iteration to the previous very tight value was not possible.

BRAKEBOX:

Merged Brakebox code with Gps20 code.

Added 0.5, 0.1 and 0.05s time resolutions to table.  Added end trigger code.