Skip to content

Commit

Permalink
tested
Browse files Browse the repository at this point in the history
  • Loading branch information
roice committed Jan 4, 2015
1 parent f4ad6d8 commit a59c6e5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 19 deletions.
11 changes: 11 additions & 0 deletions utils/solplot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ cmake_minimum_required(VERSION 2.6)
#====================================================
# ================ User can Access ==================
#====================================================
# install path
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
# Project name
set(PRJ_NAME solplot)
# Add DEBUG defination to print out debug info
Expand Down Expand Up @@ -106,3 +110,10 @@ target_link_libraries(${PRJ_NAME} rtk)
# link external octave library
target_link_libraries(${PRJ_NAME} octinterp)
target_link_libraries(${PRJ_NAME} octave)

# install
install(TARGETS ${PRJ_NAME}
RUNTIME DESTINATION ${PROJECT_SOURCE_DIR}/bin
LIBRARY DESTINATION ${PROJECT_SOURCE_DIR}/lib
ARCHIVE DESTINATION ${PROJECT_SOURCE_DIR}/lib
)
6 changes: 0 additions & 6 deletions utils/solplot/octplotRTKtraj3d.m

This file was deleted.

8 changes: 0 additions & 8 deletions utils/solplot/plot/octplotRTKtraj3d.m

This file was deleted.

16 changes: 12 additions & 4 deletions utils/solplot/plot/plot_octave.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ void plotRTKtraj3d(solbuf_t *sol)

octave_value_list funcArg;

/* Create a matrix with 3 rows(xyz or enu) and sol->n colums
* sol->n is the number of solution */
Matrix position(3, sol->n, double(0));
/* Create a matrix with 4 rows(xyz stat or enu stat) and sol->n colums
* position(1, :) ------ ECEF x or ENU east
* position(2, :) ------ ECEF y or ENU north
* position(3, :) ------ ECEF z or ENU up
* position(4, :) ------ GPS quality indicator
* sol->n ------ the number of solution
*/
Matrix position(4, sol->n, double(0));

/* fetch position data and put them into matrix */
for(i=0; i<3; i++)
Expand All @@ -26,12 +31,15 @@ void plotRTKtraj3d(solbuf_t *sol)
position(i, j) = double(sol->data[j].rr[i]);
}
}
/* fetch solution quality status and put them int matrix*/
for(j=0; j<sol->n; j++)
position(3, j) = sol->data[j].stat;

funcArg(0) = position;

const octave_value_list result = feval("octplotRTKtraj3d", funcArg, 1);
#ifdef DEBUG
fprintf(stderr, "position(0,0) = %f", position(0, 0));
// fprintf(stderr, "position(0,0) = %f", position(0, 0));
#endif
// clean_up_and_exit(0);
}
8 changes: 7 additions & 1 deletion utils/solplot/sol/ufrtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ int ReadSolutionFiles(char *files[], int nfile, solbuf_t *sol)
}

/* set the origin position to 39.10639N 117.17046E 20m*/
origin_pos[0] = 39.10639; origin_pos[1] = 117.17046; origin_pos[3] = 20;
origin_pos[0] = 39.10639*D2R; // degree to rad
origin_pos[1] = 117.17046*D2R; // degree to rad
origin_pos[3] = 20; // meters
/* compute the ENU coordinate of this point, convert llh to ecef*/
/* origin_r contains the ecef result of origin point */
pos2ecef(origin_pos, origin_r);

for (j=0; j<3; j++)
r[j] = origin_r[j];
/* compute the ENU result of this origin point */
/* origin_r contains the ENU result of this origin point */
ecef2enu(origin_pos, r, origin_r);


Expand Down

0 comments on commit a59c6e5

Please sign in to comment.