Welcome to Cockpitbuilders.com. Please login or sign up.

March 29, 2024, 06:38:51 AM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
132 Guests, 0 Users
Members
Stats
  • Total Posts: 59,639
  • Total Topics: 7,853
  • Online today: 179
  • Online ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 132
Total: 132

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

Compass Code Flowchart...

Started by RayS, May 08, 2015, 07:53:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RayS

Hoping this works for Arduino compass code...

Any flowchart junkies wanna take a swing at it to see if I'm on the right track?

2 assumptions:

        1. The stepper motor will never lag more than 120 degrees behind the real AC heading

        2. Two 'Zones' are tested first. If neither condition is true, then inc/dec normally
Ray Sotkiewicz

quid246

I am in no position to evaluate the compass logic, but I think your flow chart is missing what happens for "NO"on the "Is compass Heading < 0" and "Is compass heading >359".

727737Nut

Hi Ray,
Why not just program to operate like sioc does. My HSI compass card works great with it.  You would need to adjust the numbers to match your steps.

{
  L0 = V0015 + 1460     // Add 146 degree for my gauge center
  IF L0 > 3600     // If is > 360 degree discount a full turn
  {
    L0 = L0 - 3600
  }
  V0000 = L0         // send degrees to steper motor
}


Rob
737 Junkie

727737Nut

Hey Ray,
Any success on your arduino compass code?

Rob
737 Junkie

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate