Skip to content

Commit

Permalink
Removing view interpolation method in client (only used by the remove…
Browse files Browse the repository at this point in the history
…d movie module)
  • Loading branch information
nils-hamel committed Feb 26, 2018
1 parent 7ac3f20 commit 77e63ab
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 79 deletions.
51 changes: 0 additions & 51 deletions src/eratosthene-client/src/eratosthene-client-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,57 +213,6 @@

}

er_view_t er_view_get_inter( er_view_t const * const er_views, le_size_t const er_size, le_size_t const er_index, le_real_t const er_param ) {

/* returned value variables */
er_view_t er_view = ER_VIEW_C;

/* interpolation variables */
le_real_t er_value = 0.0;

/* accumulation variables */
le_real_t er_accum = 0.0;

/* parsing control points */
for ( le_size_t er_parse = 0; er_parse < er_size; er_parse ++ ) {

/* compute interpolation parameter */
er_value = ( ( le_real_t ) er_index + er_param ) - ( le_real_t ) er_parse;

/* compute interpolation weight - accumulate interpolation weight */
er_accum += ( er_value = exp( - 3.0 * er_value * er_value ) );

/* update interpolated values */
er_view.vw_lon += er_value * ( er_views + er_parse )->vw_lon;
er_view.vw_lat += er_value * ( er_views + er_parse )->vw_lat;
er_view.vw_alt += er_value * ( er_views + er_parse )->vw_alt;
er_view.vw_azm += er_value * ( er_views + er_parse )->vw_azm;
er_view.vw_gam += er_value * ( er_views + er_parse )->vw_gam;

}

/* compute interpolated values - simple smooth interpolation */
er_view.vw_lon /= er_accum;
er_view.vw_lat /= er_accum;
er_view.vw_alt /= er_accum;
er_view.vw_azm /= er_accum;
er_view.vw_gam /= er_accum;

/* compute interpolated values - step interpolation */
er_view.vw_mod = ( er_views + er_index )->vw_mod;
er_view.vw_red = ( er_views + er_index )->vw_red;

/* compute interpolated values - linear interpolation */
er_view.vw_tia = er_param * ( er_views + er_index + 1 )->vw_tia + ( 1.0 - er_param ) * ( er_views + er_index )->vw_tia;
er_view.vw_tib = er_param * ( er_views + er_index + 1 )->vw_tib + ( 1.0 - er_param ) * ( er_views + er_index )->vw_tib;
er_view.vw_zta = er_param * ( er_views + er_index + 1 )->vw_zta + ( 1.0 - er_param ) * ( er_views + er_index )->vw_zta;
er_view.vw_ztb = er_param * ( er_views + er_index + 1 )->vw_ztb + ( 1.0 - er_param ) * ( er_views + er_index )->vw_ztb;

/* return computed view */
return( er_view );

}

/*
source - mutator methods
*/
Expand Down
28 changes: 0 additions & 28 deletions src/eratosthene-client/src/eratosthene-client-view.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,34 +347,6 @@

le_time_t er_view_get_area( er_view_t const * const er_view, le_enum_t const er_time );

/*! \brief accessor methods
*
* This function computes an interpolated view structure using the provided
* views array and the interpolation parameters.
*
* The integer interpolation parameter gives the array index of the view
* that is smaller or equal to the interpolation position. The floating
* point parameter gives the position form the previous view, assuming that
* the addition of the two parameters is always smaller than the index of
* the next array view.
*
* For the positions coordinates and angles of sight of the point of view,
* a non linear interpolation is used. The times comparison mode value and
* the time focus are set using the values of the array view pointed by the
* integer interpolation parameter. The times and time area sizes values
* are set using a simple linear interpolation between the two views
* surrounding the interpolation position.
*
* \param er_views View structures array
* \param er_size View structures array size
* \param er_index Integer interpolation parameter
* \param er_param Floating point interpolation parameter
*
* \return Returns interpolated view
*/

er_view_t er_view_get_inter( er_view_t const * const er_views, le_size_t const er_size, le_size_t const er_index, le_real_t const er_param );

/*! \brief mutator methods
*
* This function updates the position of the point of view provided by the
Expand Down

0 comments on commit 77e63ab

Please sign in to comment.