Calculates azimuth and elevation of a satellite dish based on its longitude, latitude and selected satellite.

Dependencies:   PinDetect TextLCD mbed MODGPS

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SatGps.h Source File

SatGps.h

00001 /*  Satelitte locator
00002   *  
00003   * Copyright (c) 2012 Bart Janssens
00004   *
00005   * Permission is hereby granted, free of charge, to any person obtaining a copy
00006   * of this software and associated documentation files (the "Software"), to deal
00007   * in the Software without restriction, including without limitation the rights
00008   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00009   * copies of the Software, and to permit persons to whom the Software is
00010   * furnished to do so, subject to the following conditions:
00011   *
00012   * The above copyright notice and this permission notice shall be included in
00013   * all copies or substantial portions of the Software.
00014   *
00015   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00018   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00019   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00020   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00021   * THE SOFTWARE.
00022   */
00023 
00024 typedef struct
00025 {
00026     float lo; // longitude
00027     float la; // latitude
00028     float ht; // height
00029     float ob; // orbit satellite
00030     float az; // azimuth
00031     float el; // elevation
00032     float tm;// temperature
00033 } pos_t;
00034 
00035 typedef enum
00036 {
00037     buttonNone,
00038     buttonMode,
00039     buttonPlus,
00040     buttonMin
00041     
00042 } buttons; 
00043 
00044 typedef enum
00045 {
00046     modeAzimuth,
00047     modePosition,
00048     modeTime,
00049     modeTemperature,
00050     modeNone
00051 } modes;
00052 
00053 
00054