ArduSat API
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
SAT_Mag Class Reference

Library for Arduino returns x,y,z data on current magnetic field. More...

#include <SAT_Mag.h>

Public Member Functions

 SAT_Mag ()
 
void init (uint8_t node_id)
 
void configMag ()
 
int readx ()
 
int ready ()
 
int readz ()
 
float x_value ()
 
float y_value ()
 
float z_value ()
 
int getHeading (float x, float y, float z)
 

Detailed Description

Library for Arduino returns x,y,z data on current magnetic field.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Designed for use with Freescale (C) MAG3110 Magnetometer

Tested with MAG3110 Breakout from Sparkfun and Arduino Uno

Based on Sparkfun's example for the MAG3110 breakout board: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/BreakoutBoards/Mag3110_v10.pde

Author
Jeroen Cappaert & Lara Booth for NanoSatisfi
Jorge Ortiz
Date
May 2013

Constructor & Destructor Documentation

SAT_Mag::SAT_Mag ( )

Constructor that has a single ID parameter.

Member Function Documentation

void SAT_Mag::configMag ( )

Initializes the magnetometer.

int SAT_Mag::getHeading ( float  x,
float  y,
float  z 
)

Returns the heading.

Parameters
xthe x vector. Typically, you would pass the value you recieved from readx();
ythe y vector. Typically, you would pass the value you recieved from ready();
zthe z vector. Typically, you would pass the value you recieved from readz();
void SAT_Mag::init ( uint8_t  node_id)

Constructor that has a single ID parameter.

Parameters
node_id- The id of the user's arduino on the ArduSat. This allows the supervisor to know which arduino node to send the data back to. The id is assigned by NanoSatisfi.
int SAT_Mag::readx ( )

Reads the x vector.

int SAT_Mag::ready ( )

Reads the y vector.

int SAT_Mag::readz ( )

Reads the z vector.

float SAT_Mag::x_value ( )

Reads the x offset value.

float SAT_Mag::y_value ( )

Reads the y offset value.

float SAT_Mag::z_value ( )

Reads the z offset value.


The documentation for this class was generated from the following file: