4 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7 * Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
22 #ifndef __LOCATION_SATELLITE_H_
23 #define __LOCATION_SATELLITE_H_
25 #include <location/location-types.h>
28 * @file location-satellite.h
29 * @brief This file contains the internal definitions and structures related to satellite information.
30 * @addtogroup LocationTypes
37 * @brief This represents one satellite information in view.
40 guint prn; ///< The PRNs(Pseudo-Random Noise code) of a satellite.
41 gboolean used; ///< TRUE if currently used satellite.
42 guint elevation; ///< The elevation of a satellite.
43 guint azimuth; ///< The degree from true north 000 to 359 of a satellite.
44 gint snr; ///< The signal-to-noise ratio, dB of a satellite.
45 } LocationSatelliteDetail;
48 * @brief This represents position information such as number of satellites in used or in view.
50 struct _LocationSatellite
52 guint timestamp; ///< Time stamp.
53 guint num_of_sat_inview; ///< The number of satellites in view.
54 guint num_of_sat_used; ///< The number of satellites in used.
55 LocationSatelliteDetail* sat_inview; ///< The information of satellites in view .
58 GType location_satellite_get_type (void);
59 #define LOCATION_TYPE_SATELLITE (location_satellite_get_type ())
62 * @brief Create a new #LocationSatellite with given number of #LocationSatelliteDetail.
64 * @pre #location_init should be called before.\n
66 * @param [in] num_of_sat_inview - number of #LocationSatelliteDetail.
67 * @return a new #LocationSatellite
68 * @retval NULL if error occured
70 LocationSatellite *location_satellite_new (int num_of_sat_inview);
73 * @brief Free a #LocationSatellite.
75 * @pre #location_init should be called before.\n
77 * @param [in] satellite - a #LocationSatellite.
80 void location_satellite_free (LocationSatellite *satellite);
83 * @brief Makes a copy of #LocationSatellite
85 * @pre #location_init should be called before.\n
87 * @param [in] satellite - a #LocationSatellite
88 * @return a new #LocationSatellite
89 * @retval NULL if error occured
91 LocationSatellite *location_satellite_copy (const LocationSatellite *satellite);
94 * @brief Get elements of #LocationSatelliteDetail with given index in #LocationSatellite.
96 * @pre #location_init should be called before.\n
98 * @param [in] satellite - a #LocationSatellite
99 * @param [in] index - index of #LocationSatelliteDetail in #LocationSatellite
100 * @param [out] prn - The PRNs(Pseudo-Random Noise code) of a #LocationSatellite
101 * @param [out] used - TRUE if a #LocationSatellite in used.
102 * @param [out] elevation - The elevation of a #LocationSatellite
103 * @param [out] azimuth - The degree from true north 000 to 359 of a#LocationSatellite
104 * @param [out] snr - The signal-to-noise ratio, dB of #LocationSatellite
107 * TRUE - if success\n
108 * FALSE - if error occured\n
110 gboolean location_satellite_get_satellite_details (const LocationSatellite *satellite, guint index, guint *prn, gboolean *used, guint *elevation, guint *azimuth, gint *snr);
113 * @brief Set elements of #LocationSatelliteDetail with given index in #LocationSatellite.
115 * @pre #location_init should be called before.\n
117 * @param [in] satellite - a #LocationSatellite
118 * @param [in] index - index of #LocationSatelliteDetail in #LocationSatellite
119 * @param [in] prn - The PRNs(Pseudo-Random Noise code) of a #LocationSatellite
120 * @param [in] used - TRUE if a #LocationSatellite in used.
121 * @param [in] elevation - The elevation of a #LocationSatellite
122 * @param [in] azimuth - The degree from true north 000 to 359 of a#LocationSatellite
123 * @param [in] snr - The signal-to-noise ratio, dB of #LocationSatellite
126 * TRUE - if success\n
127 * FALSE - if error occured\n
129 gboolean location_satellite_set_satellite_details( LocationSatellite *satellite, guint index, guint prn, gboolean used, guint elevation, guint azimuth, gint snr);