diff options
author | cnlohr <lohr85@gmail.com> | 2017-02-16 15:47:46 -0500 |
---|---|---|
committer | cnlohr <lohr85@gmail.com> | 2017-02-16 15:47:46 -0500 |
commit | 2e5d0355da2376f27dcbe0cc6d04b737145ac853 (patch) | |
tree | 1beb6bd36c9ff98998aed0980f42b96ede650b45 /src/survive_process.c | |
parent | f2d014016d73f067c224ee222bc3eab910848914 (diff) | |
download | libsurvive-2e5d0355da2376f27dcbe0cc6d04b737145ac853.tar.gz libsurvive-2e5d0355da2376f27dcbe0cc6d04b737145ac853.tar.bz2 |
update with more integration stuff.
Diffstat (limited to 'src/survive_process.c')
-rw-r--r-- | src/survive_process.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/survive_process.c b/src/survive_process.c index 184532b..cb53588 100644 --- a/src/survive_process.c +++ b/src/survive_process.c @@ -8,13 +8,29 @@ void survive_default_light_process( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length ) { + struct SurviveContext * ctx = so->ctx; + int base_station = acode >> 2; + int axis = acode & 1; - if( so->ctx->calptr ) + if( ctx->calptr ) { survive_cal_light( so, sensor_id, acode, timeinsweep, timecode, length ); } - //TODO: Writeme! + if( base_station > NUM_LIGHTHOUSES ) return; + + //No loner need sync information past this point. + if( sensor_id < 0 ) return; + + float angle = (timeinsweep - 200000) * (1./200000. * 3.14159265359/2.0); + + //Need to now do angle correction. +#if 1 + struct BaseStationData * bsd = &ctx->bsd[base_station]; + + //TODO!!! +#endif + } void survive_default_imu_process( struct SurviveObject * so, int16_t * accelgyro, uint32_t timecode, int id ) |