Welcome, Guest. Please Login or Register

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

0 Members and 1 Guest are viewing this topic.

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #60 on: February 01, 2015, 05:28:45 pm »
@Darth
I'm a bit DOF today, Talking to me and answer about?  I still look for a LCD screen   :sip: Other immidiate issues all sorted for both the CAP/Trip and the Roadbook.

Adie
Laat ons Stof maak.
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #61 on: February 01, 2015, 06:22:04 pm »
** Just for the fun **

just had a look again at PIC vs ATMEL

Flash a LED code for the two products below.

*** PIC ***
#include <p18cxxx.h>//definitions of input/output pins
#include <portb.h>//functions to control pull-up resistors and interrupts
#pragma config WDT = OFF, OSC = INTIO2, FSCM = OFF, IESO = OFF, LVP = OFF, MCLRE = OFF, STVR = OFF, DEBUG = OFF, WRT0 = OFF, WRT1 = OFF, CP0 = OFF, CP1 = OFF, CPD = OFF, BOR = OFF

#include <delays.h>  //This loads the delay functions. (See the library document.)

void main (void)
{
   //*****begin standard config*****
   OSCCON = 0x70;   //set it to use the 8MHz internal clock.
   EnablePullups(); //PORTB pullup resistors enabled. Doesn't really matter for this tutorial.
   //*****end standard config*****

   //****begin project specific config
   ADCON1 = 0b01111111;   //set all ADC-capable pins to NOT be analog inputs, just digital IO (the leftmost bit is meaningless)
   DDRB=0b11111111;  //all inputs.
   DDRA=0b11111110; //all inputs except RA0. "1" is input, "0" is output.
               //the order is RA7 - RA0.
     //pin direction can also be set individually with commands like: DDRAbits.RA0=0;

   //****end project-specific config***   


     LATAbits.LATA0 = 1;//set pin RA0 high
     while(1)
     {
        Delay10KTCYx(100); //Library function which delays 10,000 * 100 instruction cycles.
               //1 instruction cycle takes 4 clock pulses,
               //so with an 8MHz clock, it's 0.5 microseconds.
               //so 1 million instruction cycles is 1/2 second.
      LATAbits.LATA0 = !LATAbits.LATA0; //Set the output to the opposite of what it was.
                              //The "!" is a logical NOT.
   }
   
}
** END PIC ***

** ATMEL **
// the setup function runs once when you press reset or power the board
void setup()
{
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop()
{
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}
** End ATMEL **

The two samples do the same Blink a LED. Thats it!!
I did leave the comments in the PIc code as it will be 'impossible' to understand the code without whereas the ATMEL is much more descriptive.


that is why the ATMEL/Arduino is there for us dummies.

OK, Back to development.

A
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 #62 on: February 02, 2015, 06:17:12 am »
Old school LCD is the right move for readability, I think. Used an ICO and iPhone on the last Amageza. ICO was a mile ahead in readability in bright overhead sunshine. And that's despite a prototype HDB case, which doesn't use a screen protector. With anything over that screen - forget it! Outside of 10am-3pm the iPhone is fantastic - and the latest version of Rally Blitz has even more functionality.


Sent from my iPhone using Tapatalk

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq. UPDATE
« Reply #63 on: February 13, 2015, 09:41:29 pm »
Ok, we had a crap two weeks working for money.  I did get some time to complete the prototype CAP-Trip unit.

All planned functions looks OK.  We did not encounter any issues other then plain stupid mistakes during programming. I wanted to test the unit on the GS this weekend but the LED screen is CRAP in sunlight.  It is not worth wasting any time to assemble it in the housing.

BUT WE COULD APPROVE ALL (allmost) FUNCTIONALITY  :biggrin:

Functions.
1. Time  From GPS or Normal battery backup.  100% functional.
2. Speed from GPS. User setting for km or Miles. 100% functional.
3. Distance from GPS.  I only walked with the unit on a tray around the plot so did get the normal 3m GPS drift interference due to slow speed.  Will improve the code to filter out 'stationary drift'.
4. True compass heading from GPS.  Indicated with normal 'degree' symbol at top. 100%
5. 'Smoothed' magnetic compass heading.  Indicated with 'degree' symbol at bottom.  100%  this heading will automatically 'kick in' if the vehicle is stationary.  So you will ALWAYS have the compass heading - even when stationary.  As soon as the GPS 'kick in' again the 'true' heading will be active. 100%
6.  Hall sensor for wheel speed and distance.  To be tested for accuracy. 20%

NOTE:  The GPS will be an 'add on' unit.  We will evaluate the reduced signal with the GPS 'sandwiched 'underneath the main unit.  At this stage we do not expect issues as the satellites are fixed within 25 seconds from cold boot and 15 seconds warm boot - ALL INSIDE THE OFFICE!! 

The BASE unit will be sold without GPS and Hall sensor to act as a MAGNETIC CAP only.  Either or both the Hall and GPS could be added to form a complete CAP-Trip unit.  The speed menu option will allow the rider to do full navigation with one unit only.

We will source the LCD screen this week to do complete costing but we estimate the price to be 30% to 40% less than the prices on the net for compatible systems.

Added a few pics of the unit in action in the office.

Adie
Laat ons Stof maak.
 

Offline Gee S

Re: Locally developed Rally Navigation Eq.
« Reply #64 on: March 01, 2015, 10:32:57 pm »
Any new developments here? Do you have any Idea about when this unit will be ready for production?
All that wander are not lost
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #65 on: March 02, 2015, 09:51:12 am »
Hi

Update, I just received the confirmation that the LCD displays (20 off) left China.  Should hopefully have them by Friday. 

Once the screens arrive we will update the housing and pc board.  The first unit would be ready for testing 2nd weekend in March.    I will fit the complete system on the 1200GS (including front wheel pickup) for testing and comparison against the Garmin and the
bike speedo. 

We estimate first production (test) units to be available from March 23rd.  We are looking at a Guinea pig test price structure for the first 5 units.  We still need to clarify the criteria of a 'guinea pig'  >:D

Will keep you posted.

Adie
Laat ons Stof maak.
 

Offline Morph

  • Pack Dog
  • **
  • Bike: Honda TransAlp XL700V
    Location: Gauteng
  • Posts: 135
  • Die 'n lekker poespas!!
Re: Locally developed Rally Navigation Eq.
« Reply #66 on: March 03, 2015, 08:31:07 am »
Hi

We still need to clarify the criteria of a 'guinea pig'  >:D


Maybe a pickled pig flambéed in Guiness and Brandy?

 :biggrin:
"I've got my own theme song....Da darada!!!
 

Offline XTFREAK

  • Race Dog
  • ***
  • Bike: BMW F800GS
    Location: Gauteng
  • Posts: 744
  • B+
Re: Locally developed Rally Navigation Eq.
« Reply #67 on: March 03, 2015, 10:53:09 am »
Off Topic, but why are you called Weedkiller? Cause I've got serious weed issues. Just checking.
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #68 on: March 03, 2015, 12:01:10 pm »
Ha ha, Weedkiller?

I take no shit from anything that bugs me. REAL ARSEHOLE ME!!  :pot:

Noo joking, the kids pested me to get MIXIT many years ago so they can communicate 'cheaper' with me. Weedkiller was the first name in my head to be used as a 'handle'.

Adie

Laat ons Stof maak.
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #69 on: March 19, 2015, 12:03:10 pm »
Hi, a short update.

I gave up searching for the LCD display in South Africa (OR it was way to expensive for the same China type)  We than imported 20 units.  The next item on the import list will be the GPS.  Again either not available or expensive. (The unit we use do a cold indoor satellite fix in 40 seconds and 10 second on warm start. hot start almost instantaneous.)  Here We need to search a bit more as there are lots of the older model available but the new one seems to be a bit scarce.  :-[

System features
We opted for one complete unit with all features.

Dual system for redundancy.  All data available from GPS or Wheel and compass.

1.  Magnetic Compass  - Option to enter Magnetic declination to get (average) TRUE north for that area.
2.  Magnetic wheel sensor for Speed and Distance
3.  GPS True north, Speed and distance.
4.  2 x 3V backup battery with auto shutdown.
5.  Darkness sensing LCD backlight.
6.  Bright white LEDs to indicate selected function.
7.  Powerful menu to configure button actions etc.
8.  Shortcut Button button functions.
9.  Distance. Total, Trip 1 and Trip 2 for both GPS and wheel.
10.Speed. Current, Max and Trip
11.Quick distance/trip adjust if detour.
12.Flat top surface to wipe dust off screen.
13.Internal GPS on removable back if not allowed during racing. (White base in pictures.)

And then we realized that we can also save the 'breadcrumbs' of a trip at one reading per second and download it later as a GPX file.  (future option. >:D )

Note:  the LED's POSITIONSon the pictures are just for evaluation.  They will show the selected display source (gps/wheel) at the right and (D)istance (S)peed and (T)otal/(T)op, Trip (1) or Trip (2)

We will do trails this weekend to compare results against the Garmin and bike instruments.


Enjoy

Adie
« Last Edit: March 19, 2015, 12:07:20 pm by Weedkiller - Adie »
Laat ons Stof maak.
 

Offline darthvader

Re: Locally developed Rally Navigation Eq.
« Reply #70 on: March 19, 2015, 12:04:36 pm »
Sunman LCD?

20 Demo/Test/Sample units? :)
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #71 on: March 19, 2015, 12:13:46 pm »
Yup, Sunman to the rescue. Real ones. Think it is the same as what you used.  :biggrin:

This will be a commercial venture.

The housing is a 3D printed prototype.  Final will be full waterproof molded units.

Adie

Laat ons Stof maak.
 

Offline bud500

  • RIP dear friend
  • Global Moderator
  • Grey hound
  • ***
  • Bike: KTM 990 Adventure
    Location: Gauteng
  • Posts: 5,545
  • Thanked: 168 times
Re: Locally developed Rally Navigation Eq.
« Reply #72 on: March 19, 2015, 01:39:24 pm »
Interesting and impressive stuff.  :thumleft:
Live like someone left the gate open.
 

Offline Kamanya

  • Global Moderator
  • Grey hound
  • ***
  • Bike: KTM 950 Adventure S
    Location: Western Cape
  • Posts: 5,717
  • Thanked: 782 times
  • Andrew to everyone
Re: Locally developed Rally Navigation Eq.
« Reply #73 on: March 19, 2015, 01:56:30 pm »
Impressive!

I really like GPS driven trip meters.
Somedays, life's like a middlemannetjie.
 

Offline Black_Hawk

  • BackroadRiderZA
  • Race Dog
  • ***
  • Bike: BMW F800GS
    Location: Western Cape
  • Posts: 4,795
  • Thanked: 574 times
  • Follow our blog: https://mytownsatoz.wordpress.com
    • My Towns A to Z
Re: Locally developed Rally Navigation Eq.
« Reply #74 on: March 19, 2015, 02:30:50 pm »
Baie interesante projek :happy1:
Follow our blog: https://mytownsatoz.wordpress.com

2010 F650GS (Sold), 2009 BMW F800GS, 2002 BMW F650GS (Sold), 1982 Honda XR200R, 1984 Honda XL600R, 2017 BMW F800GSA
 

Offline darthvader

Re: Locally developed Rally Navigation Eq.
« Reply #75 on: March 19, 2015, 03:05:29 pm »
Yup, Sunman to the rescue. Real ones. Think it is the same as what you used.  :biggrin:

This will be a commercial venture.

The housing is a 3D printed prototype.  Final will be full waterproof molded units.

Adie



Adie, wat prys hy? Ek soek dalk 3.
 

Offline Wookie

Re: Locally developed Rally Navigation Eq.
« Reply #76 on: March 19, 2015, 03:17:14 pm »
Maybe not quite the right place to ask this...

A question (and posible caution) about GPS trip meters.

Are they calculating actual "slope" distance or only a horizontal distance?
If they only work out the distance moved by X and Y co-ordinate changes (horizontal distance) then cumulative distance errors could result over terrain with steep elevation changes. In flat terrain they will be pretty damn close

Also are the Road books made using wheel driven trip meters or GPS?
Freedom is not a place..... It's merely a state of mind
 

Offline Weedkiller - Adie

Re: Locally developed Rally Navigation Eq.
« Reply #77 on: March 19, 2015, 03:54:31 pm »
Hi

** Snip **
A question (and posible caution) about GPS trip meters.

Are they calculating actual "slope" distance or only a horizontal distance?
If they only work out the distance moved by X and Y co-ordinate changes (horizontal distance) then cumulative distance errors could result over terrain with steep elevation changes. In flat terrain they will be pretty damn close
** snap **

In my research I also checked the 'creep' error during ascent/descent.  
The GPS DOES NOT give the distance as it does not know 'where to start'.  Basically the GPS receive some basic info from the satellites, do some maths and send that the to application (Garmin/Tomtom etc) to do the rest of the calcs.  We use the $GPRMC segment of the NMEA data from the GPS.  See attached snippet.

Now, we need to calculate the distance.  It is actually the difference between two co-oordinate sets.  The GPS will send the string every second. so the distance is calculated every second.  This become a real problem if you move slow (less than 3 meters per second) as the 'wobble' in the satellites make the average accuracy of a GPS about 3 meters.  If you leave the GPS stationary and calculate the distance every second it will slowly increment.  This must be filtered out by the software.  If you walk with a Garmin will wait quite a few meters before it will start updating the distance.

Now, your question and the calculation.  The simplest (and accurate enough) formula is the Haversine one.  Some other formulae actually take the 'out of roundness' of the earth into consideration.  Scary maths.!!!

In Excell it looks like this.

Enter the following formula in cell C4:
=ACOS(COS(RADIANS(90-Latitude_1)) COS(RADIANS(90-Latitude_2)) +SIN(RADIANS(90-Latitude_1)) SIN(RADIANS(90-Latitude_2)) COS(RADIANS(Longitude_1-Longitude2)) IF(C3="Miles",RadMiles,RadKilom)

Now you are actually correct the 'Altitude' is not used in the formulae.  Me thinks that over an average distance the incline in the road is so small it will have no effect.  

The wheel based distance meter could be a bigger issue with 'slip' tyre pressure etc.   ;)

** Snip **
Also are the Road books made using wheel driven trip meters or GPS?
** Snap **

On cars (mostly used for trip planning ??) the distance is picked up from the rear wheels and could give a much longer distance if wheels was spin during travelling.  Bikes use the front wheel which should be more accurate??.  It think GPS tracking is used as it can be analised on the PC.

Adie


« Last Edit: March 19, 2015, 04:20:36 pm by Weedkiller - Adie »
Laat ons Stof maak.
 

Offline Kamanya

  • Global Moderator
  • Grey hound
  • ***
  • Bike: KTM 950 Adventure S
    Location: Western Cape
  • Posts: 5,717
  • Thanked: 782 times
  • Andrew to everyone
Re: Locally developed Rally Navigation Eq.
« Reply #78 on: March 19, 2015, 03:57:44 pm »
Maybe not quite the right place to ask this...

A question (and posible caution) about GPS trip meters.

Are they calculating actual "slope" distance or only a horizontal distance?
If they only work out the distance moved by X and Y co-ordinate changes (horizontal distance) then cumulative distance errors could result over terrain with steep elevation changes. In flat terrain they will be pretty damn close

Also are the Road books made using wheel driven trip meters or GPS?

I am not certain but my opinion...

Both.

The route is plotted on Google earth and then a software program specifically for rally roadbook creation called Rally Navigator is used. The route is then ridden and checked with both GPS and wheel trips.

I used both last year and the GPS one was consistently more accurate than the wheel one. This doesn't mean that the physical one is less accurate, it's just because the creator of the roadbook had more GPS use in the creation of the roadbook.
Somedays, life's like a middlemannetjie.
 

Offline Wookie

Re: Locally developed Rally Navigation Eq.
« Reply #79 on: March 19, 2015, 04:13:07 pm »
Ok... cool,
It could quite well be that the GPS trip meters calculate the slope distance as the math is not all that difficult.

Have not checked but Google Earth has a digital terrain model built into the back end of the image data base so could also be that any measurements made in GE could also be measured slope distances.

Could well be splitting hairs but just something that occured to me a while back
Freedom is not a place..... It's merely a state of mind