OT - Adding Roll & pitch to sat dish pointing

Hi all,
I don't know where to look so I am asking for some assistance here.

A friend of mine asked help to develop a automagic satellite dish tracker (stationary).

Basically, we put togheter compass and GPS data to move a dish automatically to receive HotBird.

We have tested the basic formulas and they seems okay against the tables provided for latitude and longitude.

Now I would like to add pitch and roll of the truck in the equations to account for small angles that could lead to errors.

I have roll&pitch from 2 accelerometers in degrees resolution -+1 degrees increment (or I could access raw accelerometer data).

These are the formulas we are using:

PosLat = (2*M_PI*PosLat) / 360.0; // truck latitude to radians
PosLong = (2*M_PI*PosLong) / 360.0; // truck longitude to radians
SatLong = (2*M_PI*SatLong) / 360.0; // sat longitude to radians

v1 = 6.612 * cos(PosLat)*cos(PosLong-SatLong)-1;

v2 = 6.612 * sqrt( 1-(pow(cos(PosLat),2)) * pow((cos(PosLong- SatLong)),2));

SatElevation = atan(v1/v2);
SatAzimuth = M_PI + atan( tan(PosLong-SatLong) / sin(PosLat) );
SatPolarization = -atan( sin(PosLong-SatLong) /tan(PosLat) );


SatElevation = (SatElevation * 360.0) / (2*M_PI); // sat elevation in deg
SatAzimuth = (SatAzimuth * 360.0) / (2*M_PI); // sat azimuth in deg

How could I modify the formulas to account for pitch & roll of the truck?
Could you eventually point me to any site that could explain to me easily how to achieve this?


Giuseppe Marullo

PS: remove nospam to reply

Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: adding an entry to a vector Alberto Candel 12 4,046 12-02-2013, 01:18 PM
Last Post: Alberto Candel
  Roll-down key in HP-15C Steve Ross 6 2,267 10-15-2013, 04:12 AM
Last Post: Nick_S
  (Printer) Roll Call Matt Agajanian 2 1,357 08-26-2013, 09:48 PM
Last Post: Matt Agajanian
  [hypothetical] adding mass storage functions to a 42S Eric Smith 12 3,188 08-26-2012, 02:20 PM
Last Post: Eric Smith
  Old HP Calculators on the SAT Fouad M. Kaadou 13 3,447 08-25-2012, 09:32 AM
Last Post: David Tellet
  WP 34S adding own conversions Lourensk 4 1,546 03-24-2012, 02:45 PM
Last Post: Walter B
  TFF update; Ángel's on a roll Geir Isene 8 2,438 11-02-2011, 02:20 PM
Last Post: Ángel Martin
  Adding a crystal to the wp34s - how? Cristian Arezzini 5 1,843 07-10-2011, 11:07 AM
Last Post: Marcus von Cube, Germany
  Adding a Crystal to a WP34s Gerry Schultz 6 2,027 06-24-2011, 03:38 AM
Last Post: Marcus von Cube, Germany
  Adding a crystal to a 20b or 30b Marcus von Cube, Germany 7 1,980 05-18-2011, 01:51 AM
Last Post: Marcus von Cube, Germany

Forum Jump: