Welcome, Guest. Please Login or Register

Author Topic: Locally developed Rally Navigation Eq.  (Read 14401 times)

0 Members and 1 Guest are viewing this topic.

Offline Wookie

Re: Locally developed Rally Navigation Eq.
« Reply #80 on: March 19, 2015, 04:52:14 pm »
Adie,

That Haversine formula is interesting but over the short distance from one track point to the next it would make the math overly complicated. It's main purpose is to calculate great circles distances for long distance nav where the straight line from one point to the next is not the actual distance traveled.

In the case of a gps trip meter the track point readings would be ~1sec apart so we are looking at very short distances.
here we could use far simpler 3 vector calculations to resolve the actual slope distance traveled.

Cumulative true distance errors based on  just horizontal distance measurements (against slope distance) could rack up quite quickly. The steeper the terrain the faster the error will acumulate. As an extreme example on a 1 in 1 slope (45 deg) you would be under reading by ~40%.

Not sure how accurate you need to have the trip distances when reading a road book though so maybe this is not really an issue over the typical leg lengths involved, or if the road books are based on GPS horizontal distances then this would be a non issue in the first place.

Appologies if this is a bit of a hijack... been think about this for a while, never had a places to ask.

Freedom is not a place..... It's merely a state of mind
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #81 on: March 19, 2015, 07:21:44 pm »
@Wookie
 No problem with your questions.  This forum gave me a lot of insights/ideas/issues during the design stages.

You are correct with the 'complicated' calc.  We need to do the math at each reading for 'slow' speeds to make sure you follow 'the bend in the road'  :)  If you have a formula that can accept Lat, long to get two points on a FLAT surface it will be great.  Then add elevation in MSL Altitude to get the distance of the 2 points in 3D space and whala you have accurate distance even on an incline/decline.

With respect to the incline.  The MAX road incline should not be more than 26 degrees. this is a 1.2% error on horizontal.  In essence that means the total distance traveled will never be out by more than 1.2%.  On average the incline/decline vs horizontal ratio are minute during travelling (even racing where) a GPS is used.

BUTTTTTTTT...
I did a check on my trip up Sani Pass.  Max incline 26 degrees. Average incline over last 20km about 5 degrees 1200m over 20km. (hope my maths is ok.)

I will do a calc to see what Garmin do with the math on one of the the steepest inclines.

Adie
Laat ons Stof maak.
 

Offline Wookie

Re: Locally developed Rally Navigation Eq.
« Reply #82 on: March 19, 2015, 08:05:50 pm »
Aaah , Ok with you on the Havesine. Never thought of it in the horizontal sense for  road curvature

I will have a look at what we use here at work as far as slope correction calcs go.


Check my maths here for me maybe I am getting this ass about face....
26 degree slope is about 1 in 2 (2m horizontal for 1m vertical). This would give a slope distance of 2.23m for 2 m horizontal (in a 2D plane). Which is 11.5% diff(   (0.23/2)*100)   ).

What worries me more is the fact that the error is always cumulative to the under-read side no matter what the road slope is, up or down.
There are very few sections of road that are perfectly flat so you are always accumulating very small cumulative errors along the way.
Now for most GPS users a error of 10% to 20% is not an issue but for rallye nav this might be a problem (again not being a rallye rider I am talking out of turn here).

Looking forward to what you get on your Sani calculation.

Adie... If you would rather take this to a PM discussion and not clog up your thread just shout.
« Last Edit: March 20, 2015, 06:38:08 am by Wookie »
Freedom is not a place..... It's merely a state of mind
 

Offline Wookie

Re: Locally developed Rally Navigation Eq.
« Reply #83 on: March 20, 2015, 08:34:25 am »
Was playing around with this a bit last night.

Using the Garmin DEM model I drew a test track log down the top end of Sani pass going straight down the hill, not following the road, so as to get a steep elevation change (1 in 3). Road gradients are only about 1 in 6.5 (ave)

When you inspect the track log profile closely (Figure 1) it would seem that Basecamp measures leg length distance in the horizontal only. It does calculate the slope angle and elevation changes but does not look like it uses them at all in distance calculations. I would assume that leg length calcs in the actual handheld unit would work on the same basic calculations.

Figure 2 is the whole track log in elevation profile.

Dumping that into excel and recalculating the corrected slope distance values on a leg by leg basis (table 1) gives a distance descepency of ~22m over a track log length of 378m ( 5.82% under reading).

This would be a maximum case as Adie already stated max road gradients are only 1 in 2.

I have also checked the measured garmin distances in Google earth and it would appear that GE also measures distance on the horizontal and not slope distance.

It might be a plan to check with Alex and see how the road books are measured.
If true slope distance is used it might be a simple case of applying a second calculation, to the Haversine formula you are already using, to adjust the horizontal distance for slope.... maybe a user switchable option.
Freedom is not a place..... It's merely a state of mind
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #84 on: March 20, 2015, 09:21:38 am »
Thanks Wookie

Fascinating stuff

Now that is put to bed and I do not have to make more complex calcs.  I am running a 16MHz chip to do a lot of work.  I also noticed in Garmin that the calc is only done if the direction (or something else ??) change. See picture. It would actually save a lot of calculating if I implement the same method.  Will have to do some research on what 'filter' to use on the direction change as the left right shaking of a bike is much more than a car. It is almost impossible to point a bike on off-road straighter than 0.1 of a degree.

Ok, the unit will be on the 1200 this weekend for first evaluation of the functions.  I will compare with speedo and Garmin.


Adie


Laat ons Stof maak.
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #85 on: March 20, 2015, 09:44:02 am »
Ooooo bliksem.

What if the GPS is mounted on the handlebar and the calc 'filter' is even on 1 degree ?? the unit will STILL calc the distance every second.  :( 

Luckily I will do all performance test on 1 sec intervals in any case. It would be intersting to compare the two trip logs for the same section

Ok, off to work

Adie
Laat ons Stof maak.
 

Offline Wookie

Re: Locally developed Rally Navigation Eq.
« Reply #86 on: March 20, 2015, 09:55:10 am »
The calc is done as per saved track log.
If you have the garmin handheld set to automatic in how it saves a track log then you will get variable track points like you have.
It appears to descriminate on speed and azimuth.

I would leave it set to capture at 1s intervals for now.


Done some further checking for you on algorhythms  for distance calcs from Lat/Lon.
Haversine is by far the easiest way to go. Some of the others involve conversion to UTM first which is not really practical for on the fly calcs.


Fun project you have going....  :thumleft: :thumleft:
Freedom is not a place..... It's merely a state of mind
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #87 on: March 20, 2015, 11:26:13 pm »
My office for the weekend.

First test will just be to test continuously switched on, magnetic heading, true (GPS) heading, speed and distance.

There are still an error on the magnetic heading. some 'temperature correction'. I am currently 20 degrees West out. It is almost True north  >:(

enjoy the weekend.

Adie
Laat ons Stof maak.
 

Offline MaxThePanda

  • Race Dog
  • ***
  • Bike: Vespa (all models)
    Location: Western Cape
  • Posts: 2,166
  • Thanked: 19 times
  • As in 'Even more Panda'. Also likes sharks.
    • Team 525
Re: Locally developed Rally Navigation Eq.
« Reply #88 on: March 22, 2015, 12:13:39 pm »
How does it compare size-wise to the ICO?

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #89 on: March 22, 2015, 04:27:00 pm »
Ok,
I'm back from the weekend camping trip.  We did 520km of which probably about 320 gravel.

IT DID NOT FALL APART!!.

Ok the GPS distance do need some checking.  I had the decimal in the wrong place and anything further than 99m was truncated.  So, I must check that again.  Based on my estimates the distance is WRONG.  will check the code, maybe I went from Knots to Knots instead to km.  :imaposer:

I knew that the GPS (a moerse metal block) was clos (ok, ok, almost on top) of the compass. The result was a very 'skewed' reading. I will put them in opposite corners and also place the compass at a 45 degree (or more) angle so it will be close to horizontal on the bike.  Need to do more testing to 'really' understand the inner workings.


@MaxThePanda.  We tried to make the unit a 'direct replacement' of the ICO products.  I have never seen an ICO switched on in real life and just had a glimps on a bike once.  We based all our calcs on the size we got off the net. (93x47x30)  Also, I ran the system without any heat sinks on the voltage regulators without any problem.  It only got 'slightly' warm.  I wonder what the size (and price) of the Rallye Max will be.  If I look at the screen on their page what we have done with LED's they did (or going to do) on the purpose built LCD panel.

The Rockfox unit will be 95x50x35 WITHOUT the internal GPS and 45 high with internal GPS. the final height might change slightly when we relocate the components.  The unit will be surface mount once all electronics are approved. (Basically the GPS/Compass position.  


Conclusion.
The internal GPS worked flawless and all updates (except distance) was the same as the Garmin.  I really hope we can get the Compass to work without interference.  The Bright white LED's was way to bright in low light conditions but still 100% visible in direct sunlight.  I will probably 'auto dimm' them based on the ambient light with the same unit switching the backlight on and off.

We will do the PC Board re-design this week to get the compass away from the GPS and look at the GPS distance issue.  We will also mould the wheel sensor and design a bracket.  I will test that on the current unit.

Whishlist.
The more I work with the unit the more options and features become possible.  We will have a grommet in the first units and a USB 'dongle' to upload software updates.  It will also be possible to 'correct' the magnetic compass with the declination angle with the press of a button. (Basically point the bike TRUE NORTH and press the button. - Use GPS to get true north or as a buddy.  >:D )  The system will then have full redundancy.  (Ohh - the system flash the GPS LED if not enough satellites.)


Sooooo.
We are looking for early investors (testers) for the unit. (Might put a limit on the number of units so I can buy a bread at the end - or maybe buy a pack of candles as we gonna burn the midnight oil during April.  The Roadbook is also in final prototype/concept stages.  Once I get the motors I am ready to go. These units will be made available at a discount and also include the USB dongle.  I am just waiting for the GPS prices before we make final prices.  Our aim is to be below R 4000.00 for the unit. Also looking at a 'per pair' discount if one REALLY need two or a reduced price if no GPS back is selected and only the magnetic compass and wheel sensor is used.

Werk boetie werk.
Adie




« Last Edit: March 22, 2015, 04:35:34 pm by Weedkiller - Adie »
Laat ons Stof maak.
 

Offline witblitz

Re: Locally developed Rally Navigation Eq.
« Reply #90 on: March 22, 2015, 04:59:36 pm »
I am not sure which compass board you are using, but I have read that nearby ferrous metals can affect the readings. Never looked further into this though. Maybe something you can check out. Wave a piece nearby it and see how it affects the readings.
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #91 on: March 22, 2015, 05:04:26 pm »
@witblitz
that is exactly what happened. I use one from Honeywell. Basically same as in Celphones etc etc.  I just forgot about the position of the GPS when I did the board layout. 

sometimes (most times) I'm a bit DOF and dont think.

A
Laat ons Stof maak.
 

Offline SteveD

Re: Locally developed Rally Navigation Eq.
« Reply #92 on: March 23, 2015, 07:06:02 am »
.....I have never seen an ICO switched on in real life and just had a glimps on a bike once.  We based all our calcs on the size we got off the net. (93x47x30)

Where in the Western Cape are you? I think you and my bike need to meet.....
PM me?
 

Offline Wookie

Re: Locally developed Rally Navigation Eq.
« Reply #93 on: March 23, 2015, 08:26:42 am »
Looking good Adie...

All vehicle (fixed) compasses should be "swung" once installed.
This is done to minimise the effect of any local ferrous metals have on the compass and involves calculating / measuring the Azimuth error and then setting a bias on the compass.

In this case it might not only be the GPS ant. but also the whole bike that could put a bias on the compass heading.
So depending on where you fit the unit the Azimuth error could also change.

We use ultra high accuracy flux-gate nav systems for down borehole imaging and if the flux-gate sub gets within ~1.5 meters of anything ferrous the azimuth goes for a ball of SH..T.   These are ultra sensitive so the radius of effect in your case will be quite a bit smaller, maybe ~0.5m.

Should not be to difficult to measure the Az error and set up a bias in the software but might need to be something the end user will need to set up once they have it installed on the bike.
Freedom is not a place..... It's merely a state of mind
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #94 on: March 23, 2015, 09:09:36 am »
Hi

@SteveD.  We are in Joostenberg on the plotte.  Look for rockfox.co.za for contacts and other info.  My Cell: 079-5243884 contact me any time.

@Wookie.  I realized the 'correction factor' of the GPS is a bit of a dark art as it needs to be applied to the X, Y and Z axis as separate values. 

I use this:
** what I use **
const int x_offset = 30;
const int y_offset = 128;
const int z_offset = 0;
** Calced in here **
  angle= atan2((double)y + y_offset,(double)x + x_offset)* (180 / 3.141592654) + 180;

I could not get any reference to the offset values.

Can also use some complex object with 1.33 as the ONLY correction.  the Honywell data sheet also came up with 1.333 so maybe the programmer just use datasheet values. ??? If it is 'always' 1.33 why not do it inside the chip.

will keep you posted.

Adie



Laat ons Stof maak.
 

Offline Wookie

Re: Locally developed Rally Navigation Eq.
« Reply #95 on: March 23, 2015, 09:28:32 am »
I don't know the honeywell sensors at all...
Is the compass heading a fluxgate sytem built in as part of the GPS sensor / chip /system?

Most of the modern nav chips that I have come across should have some type of set-up procedure to test max - min values in some way. Nothing in the data sheet about how to measure max-min and calc the offsets?

Freedom is not a place..... It's merely a state of mind
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #96 on: April 13, 2015, 11:28:05 pm »
A little update.

We have sorted all of the issues with the unit except the magnetic compass.  We do get more interference than desired from all the metal parts on the bike.  We are also negotiating to bring GPS antennae in at a much reduced price.  This will make the magnetic compass option obsolete as the GPS module already give the speed, time etc without any external cables and magnets.

In the meantime ** This was also posted on the Amageza thread ***

email from Amageza management.

*** snip ***
These electronics are currently allowed on your navigation tower/ instrument setup:

ICO Rallye VR Light
ICO Rallye CAP
RNS Trip-Master XL
RNS Compass-Repeater XL (Also only to be connected to a Garmin eTrex10)
Garmin eTrex 10
No mobile phones, tablets or any computer is allowed. If you are developing something similar to items 1-4, please get a sample to me to review and allow if possible.

*** Snap ***

As the basic design and functionality of the RockFox Trip-Cap unit is the same as the two ICO or the two RNS products rolled into one we contacted Amageza management with respect to evaluating our unit.  We will deliver a complete test unit (Trip and CAP) mid May for evaluation.

Herewith a snip of the document to Alexander

**** Snip ****
Availability warrantee and cost
Final proof of concept and preliminary testing was be completed by 20 February 2015.  The first system(s) must be ready for user evaluation by 30 April 2015.  First production units must be available 5  May 2015.  The first 10 units will carry a full replacement warrantee for one year. Future warrantee will cover factory defects only.  In order to reduce the setup cost for rallying the unit without GPS antenna/features must retail for around R2 500.00 and GPS module about R 1050.00 Vat incl. We aim to market the traditional Trip and CAP (trip with GPS) units as a set at a discounted price of about R 5 500.00 Vat incl.
**** Snap ****

As a further development: We will offer all Amageza riders who purchased a RockFox unit a no questions ask replacement service during the rally. (We will have a service van at the rally)

LASTLY. If we get the GPS units in as another bulk order the price can be slashed to:
Base unit with magnetic pickup for Trip/Speed and 3 button handlebar bracket:   R 1 600.00 incl VAT
Base unit with 48 channel high speed GPS built in base unit. (no external wires) Trip/Speed/Heading:  R 2 400.00 incl VAT
(Remember: both units do have EXACT functionality except the compass heading of the GPS on the Trip/Speed unit)

Please note, these prices are WAY below cost and are funded by the development project as we aim to sell the units in the global market. (Already started overseas negotiations)

So, you have two options, save money to buy an ICO or RNS but put the actual purchase on hold till we get feedback from Amageza management.  If it is a YES you can buy a roadbook etc with the change.  If it is a NO you will at MAX lose on the  exchange rate fluctuation.

We are continuing the development and refining of the units so that they will be available immediately if approved. (hopefully end of May) If we can not get approval for 2015 Amageza we will in any event send a few units out for evaluation overseas.

Let's make rallying more cost effective!!!!

Adie and the rockfox team
079-5243884
Laat ons Stof maak.
 

Offline MaxThePanda

  • Race Dog
  • ***
  • Bike: Vespa (all models)
    Location: Western Cape
  • Posts: 2,166
  • Thanked: 19 times
  • As in 'Even more Panda'. Also likes sharks.
    • Team 525
Re: Locally developed Rally Navigation Eq.
« Reply #97 on: April 14, 2015, 06:45:50 am »
Impressive! What's the red button sticking out the left of the unit? Or am I seeing things? Ideally there should be nothing on the left so you can line up two units next to each other...

Offline pietas

  • Race Dog
  • ***
  • Bike: BMW R80GS
    Location: Western Cape
  • Posts: 1,278
  • Thanked: 34 times
  • Gryskop seuntjie
Re: Locally developed Rally Navigation Eq.
« Reply #98 on: April 14, 2015, 06:53:58 am »
I like this. Nice work, Adie
Groot berge en lang grond paaie
 

Offline darthvader

Re: Locally developed Rally Navigation Eq.
« Reply #99 on: April 14, 2015, 06:55:17 am »
Baie goeie werk!