Close

IBM BlueMix Node Red went down

A project log for Urban Red Fox Tracking Project

To build a low cost tracking system without GPS for Animals and Human Animals.

Brenda ArmourBrenda Armour 10/03/2016 at 11:370 Comments

So IBM Blue Mix had issues with Red Node all weekend and my app would not connect. I spent Sunday building one from scratch and that would not connect. So time is up. I will continue with this. Guess the apps still are not running this morning:

The project will still continue. One of the challenges will be to test the code which I could not do this weekend. My backup nodes were on the Node Red page. Which I cannot reach. If I click on a route , I receive a message Page Cannot Be Displayed :C

But here is my initial calculations:

R = 6378.1 #Radius of the Earth

brng = 1.57 Math.ATAN(accelY/accelY)

d = Stepper Function

lat1 = math.radians(40.0132482)

log1 = math.radians(-63.772673)

lat2 = math.asin( math.sin(lat1)*math.cos(d/R) + math.cos(lat1)*math.sin(d/R)*math.cos(brng))

lon2 = lon1 + math.atan2(math.sin(brng)*math.sin(d/R)*math.cos(lat1), math.cos(d/R)-math.sin(lat1)*math.sin(lat2))

Convert back to degrees:

lat2 = math.degrees(lat2)

lon2 = math.degrees(lon2)


Stepper Function - Raw Data. I will be using Moving Average for the Threshhold.

(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {const float violence = 1.2;

static BOOL beenhere; BOOL shake = FALSE

if (beenhere) return;

beenhere = TRUE

if (acceleration.x > violence || acceleration.x < (-1* violence)) shake = TRUE;

if (acceleration.y > violence || acceleration.y < (-1* violence)) shake = TRUE;

if (acceleration.z > violence || acceleration.z < (-1* violence)) shake = TRUE;

if (shake) { steps=steps+1;} beenhere = false; }

step = step + 1


So distance would be steps * stride


Discussions