Commit 81777996 authored by Keith Preston's avatar Keith Preston

Change to the Satellite Data Method, it is now one method for grabbing all the...

Change to the Satellite Data Method, it is now one method for grabbing all the satellite data.   Previously it took 13 round trip calls to generally get satellite information which is just slow.   Changed the backends to have the new proper method.
parent 31e4148a
......@@ -293,25 +293,14 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error)
{
g_set_error (error,
GEOCLUE_POSITION_ERROR,
GEOCLUE_POSITION_ERROR_FAILED,
"Method not implemented yet.");
return FALSE;
}
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
GError **error)
{
g_set_error (error,
......
......@@ -126,18 +126,14 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error);
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
GError **error);
gboolean geoclue_position_civic_location ( GeocluePosition* server,
......
......@@ -675,25 +675,14 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error)
{
g_set_error (error,
GEOCLUE_POSITION_ERROR,
GEOCLUE_POSITION_ERROR_FAILED,
"Method not implemented yet.");
return FALSE;
}
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
GError **error)
{
g_set_error (error,
......
......@@ -154,18 +154,14 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error);
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
GError **error);
gboolean geoclue_position_civic_location ( GeocluePosition* server,
......
......@@ -263,25 +263,14 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error)
{
g_set_error (error,
GEOCLUE_POSITION_ERROR,
GEOCLUE_POSITION_ERROR_FAILED,
"Method not implemented yet.");
return FALSE;
}
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
GError **error)
{
g_set_error (error,
......
......@@ -123,18 +123,14 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error);
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
GError **error);
gboolean geoclue_position_civic_location ( GeocluePosition* server,
......
......@@ -737,25 +737,14 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error)
{
g_set_error (error,
GEOCLUE_POSITION_ERROR,
GEOCLUE_POSITION_ERROR_FAILED,
"Method not implemented yet.");
return FALSE;
}
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
GError **error)
{
g_set_error (error,
......
......@@ -152,19 +152,14 @@ gboolean geoclue_position_current_velocity ( GeocluePosition* server,
GError **error);
gboolean geoclue_position_satellites_in_view ( GeocluePosition* server,
GArray** OUT_prn_numbers,
GError **error);
gboolean geoclue_position_satellites_data ( GeocluePosition* server,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris,
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris,
GError **error);
gboolean geoclue_position_civic_location ( GeocluePosition* server,
......
......@@ -432,38 +432,16 @@ position_returncode geoclue_position_current_velocity ( position_provider* provi
}
position_returncode geoclue_position_satellites_in_view ( position_provider* provider,
GArray** OUT_prn_numbers )
{
if(!provider)
{
if(!default_position_provider)
{
return GEOCLUE_POSITION_NOT_INITIALIZED;
}
else
{
provider = default_position_provider;
}
}
GError* error = NULL;
org_freedesktop_geoclue_position_satellites_in_view ( provider->proxy, OUT_prn_numbers, &error );
if( error != NULL )
{
g_printerr ("Error getting geoclue_position satellites_in_view: %s\n", error->message);
g_error_free (error);
return GEOCLUE_POSITION_DBUS_ERROR;
}
return GEOCLUE_POSITION_SUCCESS;
}
position_returncode geoclue_position_satellites_data ( position_provider* provider,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris )
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris )
{
if(!provider)
{
......@@ -477,7 +455,7 @@ position_returncode geoclue_position_satellites_data ( position_provider* provid
}
}
GError* error = NULL;
org_freedesktop_geoclue_position_satellites_data ( provider->proxy, IN_prn_number , OUT_elevation, OUT_azimuth , OUT_signal_noise_ratio , OUT_differential, OUT_ephemeris, &error );
org_freedesktop_geoclue_position_satellites_data ( provider->proxy, OUT_timestamp, OUT_prn_number , OUT_elevation, OUT_azimuth , OUT_signal_noise_ratio , OUT_differential, OUT_ephemeris, &error );
if( error != NULL )
{
g_printerr ("Error getting geoclue_position satellites_data : %s\n", error->message);
......
......@@ -266,23 +266,24 @@ position_returncode geoclue_position_satellites_in_view ( position_provider* pro
GArray** OUT_prn_numbers );
/*!
* \brief This will return satellite information for the requested PRN number
* \brief This will return satellite information for the requested PRN number. This function return GArrays of it's outputs. Each individual satellites data can be found by indexing through the GArray at the same index. I.E. prn[0] elevation[0] will correspond to one satellite.
* \param provider this will accept NULL and will use the default geoclue master position provider
* \param IN_prn_number PRN number of satellite
* \param OUT_elevation satellite data
* \param OUT_azimuth satellite data
* \param OUT_signal_noise_ratio satellite data
* \param OUT_differential satellite data
* \param OUT_ephemeris satellite data
* \param IN_prn_number PRN number of satellite (int)
* \param OUT_elevation satellite data (double)
* \param OUT_azimuth satellite data (double)
* \param OUT_signal_noise_ratio satellite data (double)
* \param OUT_differential satellite data (boolean)
* \param OUT_ephemeris satellite data (boolean)
* \return see position_returncode
*/
position_returncode geoclue_position_satellites_data ( position_provider* provider,
const gint IN_prn_number,
gdouble* OUT_elevation,
gdouble* OUT_azimuth,
gdouble* OUT_signal_noise_ratio,
gboolean* OUT_differential,
gboolean* OUT_ephemeris );
gint* OUT_timestamp,
GArray** OUT_prn_number,
GArray** OUT_elevation,
GArray** OUT_azimuth,
GArray** OUT_signal_noise_ratio,
GArray** OUT_differential,
GArray** OUT_ephemeris );
/*!
* \brief This will attempt to return string information about the current location. Strings may be NULL!!!
* NOTE: civic location part of the API is not stable !
......
......@@ -79,17 +79,15 @@
<arg type="d" name="altitude_velocity" direction="out" /><!-- Meters per Second (away from the earth is defined as up)-->
</method>
<method name="satellites_in_view">
<arg type="ai" name="prn_numbers" direction="out" />
</method>
<method name="satellites_data">
<arg type="i" name="prn_number" direction="in" />
<arg type="d" name="elevation" direction="out" /><!-- Degrees -->
<arg type="d" name="azimuth" direction="out" /><!-- Degrees -->
<arg type="d" name="signal_noise_ratio" direction="out" />
<arg type="b" name="differential" direction="out" />
<arg type="b" name="ephemeris" direction="out" />
<method name="satellites_data">
<arg type="i" name="timestamp" direction="out" /><!-- This is the NMEA standard UTC time in the format 123456 with represents 12:34:56 hours:minutes:seconds -->
<arg type="ai" name="prn_number" direction="out" />
<arg type="ad" name="elevation" direction="out" /><!-- Degrees -->
<arg type="ad" name="azimuth" direction="out" /><!-- Degrees -->
<arg type="ad" name="signal_noise_ratio" direction="out" />
<arg type="ab" name="differential" direction="out" />
<arg type="ab" name="ephemeris" direction="out" />
</method>
<method name="civic_location">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment