MOOS 0.2375
/home/toby/moos-ivp/MOOS-2375-Oct0611/NavigationAndControl/MOOSNavLib/LBLMaths.h
Go to the documentation of this file.
00001 
00002 //
00003 //   MOOS - Mission Oriented Operating Suite 
00004 //  
00005 //   A suit of Applications and Libraries for Mobile Robotics Research 
00006 //   Copyright (C) 2001-2005 Massachusetts Institute of Technology and 
00007 //   Oxford University. 
00008 //    
00009 //   This software was written by Paul Newman and others
00010 //   at MIT 2001-2002 and Oxford University 2003-2005.
00011 //   email: pnewman@robots.ox.ac.uk. 
00012 //      
00013 //   This file is part of a  MOOS Basic (Common) Application. 
00014 //        
00015 //   This program is free software; you can redistribute it and/or 
00016 //   modify it under the terms of the GNU General Public License as 
00017 //   published by the Free Software Foundation; either version 2 of the 
00018 //   License, or (at your option) any later version. 
00019 //          
00020 //   This program is distributed in the hope that it will be useful, 
00021 //   but WITHOUT ANY WARRANTY; without even the implied warranty of 
00022 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
00023 //   General Public License for more details. 
00024 //            
00025 //   You should have received a copy of the GNU General Public License 
00026 //   along with this program; if not, write to the Free Software 
00027 //   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
00028 //   02111-1307, USA. 
00029 //
00031 #ifndef LBLMathsh
00032 #define LBLMathsh
00033 
00034 class CMOOSNavSensor;
00035 class CLBLMaths
00036 {
00037     
00038 public:
00039     
00040     
00041     double            dTTbydEt( double T);                        
00042     double            dTTbydNt( double T);                                        
00043     double            dTTbydZt( double T);                                        
00044     double            dTTbydHt ( double T, double dT);                                        
00045     double            dTTbydEtvel( double T, double dT);                                        
00046     double            dTTbydNtvel( double T, double dT);                                        
00047     double            dTTbydZtvel( double T, double dT);                                        
00048     double            dTTbydHtvel( double T, double dT);                                        
00049     double            dTTbydEr( double T);                                        
00050     double            dTTbydNr( double T);                                        
00051     double            dTTbydZr( double T);                                        
00052     double            dTTbydHr( double T, double dT);                                        
00053     double            dTTbydErvel( double T, double dT);                                        
00054     double            dTTbydNrvel( double T, double dT);                                        
00055     double            dTTbydZrvel( double T, double dT);                                        
00056     double            dTTbydHrvel(double T, double dT);                                        
00057     double            dTTbydxt( double T, double dT);                                        
00058     double            dTTbydyt( double T, double dT);            
00059     double            dTTbydxr( double T, double dT);
00060     double            dTTbydyr ( double T, double dT);
00061     
00062     bool    SetUpLBLData(   double dfTimeAgo,
00063                             CMOOSNavSensor* pTxSensor,
00064                             CMOOSNavSensor* pRxSensor,
00065                             Matrix * pXEvaluate,
00066                             double dfSV);
00067 
00068     bool    CalculateTwoWayTOF(    CMOOSNavSensor* pInterrogatorSensor,
00069                                 CMOOSNavSensor* pResponderSensor,
00070                                 Matrix * pXEvaluate,
00071                                 double dfSV,
00072                                 double & dfTotalTOF
00073                                 );
00074 
00075 
00076     bool    CalculateLegTravelTime(    double dfTimeAgo,
00077                                 CMOOSNavSensor * pTxSensor,
00078                                 CMOOSNavSensor * pRxSensor,
00079                                 Matrix * pXEvaluate,
00080                                 double dfSV,
00081                                 double & dfTravelTimeResult);
00082 
00083 
00084     bool    CalculateTwoWayTOFJacobians(CMOOSNavSensor *pInterrogatorSensor,
00085                                           CMOOSNavSensor *pResponderSensor,
00086                                           Matrix * pXEvaluate,
00087                                           double dfSV,
00088                                           Matrix & jH
00089                                           );
00090 
00091     bool    AddJacobianLegComponent(Matrix & H,
00092                                         CMOOSNavSensor* pTxSensor,
00093                                         CMOOSNavSensor* pRxSensor,
00094                                          double TTime,
00095                                          double dt);
00096 
00097     
00098     double m_dfSV;
00099     double Rx_Veh_X,Rx_Veh_Y,Rx_Veh_Z,Rx_Veh_H;
00100     double Rx_Veh_Xdot,Rx_Veh_Ydot,Rx_Veh_Zdot,Rx_Veh_Hdot;
00101     double Tx_Veh_X,Tx_Veh_Y,Tx_Veh_Z,Tx_Veh_H;
00102     double Tx_Veh_Xdot,Tx_Veh_Ydot,Tx_Veh_Zdot,Tx_Veh_Hdot;
00103     
00104     double Rx_Sen_X,Rx_Sen_Y,Rx_Sen_Z,Rx_Sen_H;
00105     double Rx_Sen_Xdot,Rx_Sen_Ydot,Rx_Sen_Zdot,Rx_Sen_Hdot;
00106     
00107     double Tx_Sen_X,Tx_Sen_Y,Tx_Sen_Z,Tx_Sen_H;
00108     double Tx_Sen_Xdot,Tx_Sen_Ydot,Tx_Sen_Zdot,Tx_Sen_Hdot;
00109     
00110     double a,b,c;
00111     
00112     double dE,dN,dZ;
00113     
00114     double CosTx,SinTx,CosRx,SinRx;
00115 
00116     
00117         
00118     
00119 protected:
00120     void DoDebug();
00121 };
00122 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines