ION-F Software

Function Interface Definitions


Table of Contents

1      Command & Data Handling. 2

2      Communications. 12

3      Attitude Dynamics & Control 21

4      Thermal 53

5      Structures. 55

6      Formation Flying. 58

7      Propulsion. 62

8      Orbital 65


1        Command & Data Handling


CDH_FlashWrite()

NAME                           STATUS CDH_FlashWrite

                                    (

                                    Unknown

                                    )

DESCRIPTION

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                    CDH_FlashRead


CDH_FlashRead()

NAME                           STATUS CDH_FlashRead

                                    (

                                    Unknown

                                    )

DESCRIPTION

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                    CDH_FlashWrite
CDH_ProcessorPortRead()

NAME                           STATUS CDH_PortRead

                                    (

                                    UINT PortID                   /* PortID                        */

                                    UINT* ReturnValue         /* Value of Port  */

                                    )

DESCRIPTION

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO


CDH_ProcessorPinRead()

NAME                           STATUS CDH_PinRead

                                    (

                                    UINT PortID                   /* Processor Port ID       */

                                    UINT PinID                    /* Processor Pin ID        */

                                    UINT* ReturnValue         /* Value of Pin   */

                                    )

DESCRIPTION

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO


CDH_ProcessorPortSetup()

NAME                           STATUS CDH_PortSetup

                                    (

                                    UINT PortID                   /* Processor Port ID       */

                                    UINT PortSetup  /* Input or Output           */

                                    )

DESCRIPTION             

                                    PortSetup is set by the #define INPUT 1 or #define OUTPUT 0

                                   

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO


CDH_ProcessorPortWrite()

NAME                           STATUS CDH_PortWrite

                                    (

                                    UINT PortID                   /* Processor Port ID                   */

                                    CHAR Byte                   /* Output Byte to Port     */

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO


CDH_ProcessorPinWrite()

NAME                           STATUS CDH_PinWrite

                                    (

                                    UINT PortID                   /* Processor Port ID       */

                                    UINT Pin                       /* Processor Pin            */

                                    UINT Bit                        /* Output Bit to Pin         */

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO


CDH_WatchdogEnable()

NAME                           STATUS CDH_WatchdogEnable

                                    (

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO


CDH_WatchdogReset()

NAME                           STATUS CDH_WatchdogReset

                                    (

                                    )

DESCRIPTION              

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO


2        Communications


COMM_Write ()

NAME                           STATUS COMM_Write

                                    (

                                    UINT Port                      /* RS-232 Ouput Port     */         

                                    CHAR* Buffer     /* Pointer to Buffer Array */

                                    UINT BufferSize /* Size of the Buffer                    */

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise         

SEE ALSO                    COMM_Read


COMM_Read()

NAME                           STATUS COMM_Read

                                    (

                                    UINT Port                                  /* RS-232 Input Port                   */         

                                    CHAR* Buffer                 /* Pointer to Buffer Array */

                                    UINT BufferSize             /* Size of the Buffer                    */

                                    UINT MaxBufferSize       /* Max Size of the Buffer */

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                    COMM_Write


COMM_Read()

NAME                           STATUS COMM_Read

                                    (

                                    UINT Port                                  /* RS-232 Input Port                   */         

                                    CHAR* Buffer                 /* Pointer to Buffer Array */

                                    UINT BufferSize             /* Size of the Buffer                    */

                                    UINT MaxBufferSize       /* Max Size of the Buffer */

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                    COMM_Write


COMM_InitializeISR()

NAME                           STATUS COMM_InitializeISR

                                    (

                                    None?

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                   
COMM_UplinkISR()

NAME                           STATUS COMM_UplinkISR

                                    (

                                    None?

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                    COMM_DownlinkISR


COMM_DownlinkISR()

NAME                           STATUS COMM_DownlinkISR

                                    (

                                    None?

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                    COMM_UplinkISR


COMM_TransmitISR()

NAME                           STATUS COMM_TransmitISR

                                    (

                                    None?

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                    COMM_ReceiveISR


COMM_ReceiveISR()

NAME                           STATUS COMM_ReceiveISR

                                    (

                                    None?

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                    COMM_TransmitISR


3        Attitude Dynamics & Control

ADCS_TorqueCoil_MomentMatrixWrite()

NAME                           STATUS ADCS_TorqueCoil_MomentMatrixWrite

                                    (

                                    float* CurrentQuaternion  /* array of 4 values*/

                                    float* DesiredQuaternion /* array of 4 values*/

                                    float* OrbitalElements                 /* array of 6 values*/

                                    float CurrentTime                        /* 1 value*/

                                    float** MomentOfInertia               /* array of 9 values*/

                                    float TimeSpan               /* 1 value*/

                                    float TimeStep                           /* 1 value*/

                                    float* AngularVelocity                 /* array of 3 values*/

                                    double* MomentMatrix                /* Array of 3 TC Control Moments */

                                    )

DESCRIPTION              Determines the amount of magnetic moment required over a time period

                                    MomentMatrix:

                                                Range: -0.9 to 0.9

                                                Units:  A-m^2

                                                Reference:  0 A-m^2 is no moment

RETURNS                     OK for successful operation

                                    ERROR_NODATA if there is a computation error

                                   

SPACECRAFT              VT

SEE ALSO                   


ADCS_TorqueCoil_ode45()

NAME                           STATUS ADCS_TorqueCoil_ode45

                                    (

                                    float* InitialQuaternion                 /* Array of 4 values  */

                                    float* InitialAngularVelocity          /*Array of 3 values*/

                                    float* Times                                /* Array of length TimeSpan */

                                    )

DESCRIPTION              integrator

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_TIMEOUT if takes too long

                                   

SPACECRAFT              VT

SEE ALSO                   

 


ADCS_BField()

NAME                           STATUS ADCS_BField

                                    (

                                    float* OrbitalElements      /* Array of 6 values  */

                                    float* CurrentTime                       /*1 value*/

                                    double* BFieldVector    

                                    )

DESCRIPTION              Determines the geomagnetic field at a given time

                                    Range: N/A

                                    Units: nT

                                    Reference: 0 nT is no magnetic field

RETURNS                     OK for successful operation

                                    ERROR_NODATA if computation error

                                   

SPACECRAFT              VT, UW, USU

SEE ALSO                   


ADCS_TorqueCoil_CalcGains()

NAME                           STATUS ADCS_TorqueCoil_CalcGains

                                    (

                                    float* BField      /* Array of 3 values  */

                                    float* OrbitalElements /*Array of 6 values*/

                                    float* MomentofInertia   /* Array of 9 values */

                                    )

DESCRIPTION              Determines Gains

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_TIMEOUT if takes too long

SPACECRAFT              VT

SEE ALSO                   


ADCS_TorqueCoil_LQR()

NAME                           STATUS ADCS_TorqueCoil_LQR

                                    (

                                    float* Fmatrix     /* Array of 9 values  */

                                    float* Gmatrix /*Array of 18 values*/

                                    float* Qmatrix /*array of 6 values*/

                                    )

DESCRIPTION              linear quadratic regulator

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_TIMEOUT if takes too long

                                   

SPACECRAFT              VT

SEE ALSO                   


ADCS_TorqueCoil_rhs()

NAME                           STATUS ADCS_TorqueCoil_rhs

                                    (

                                    float*     MomentOfInertia /* array of 9 values */

                                    float*OrbitalElements /*array of 6 values */

                                    float* Quaternion /*array of 4 values */

                                    float* AngularVelocity /*array of 3 values*/

                                    float* Time /* 1 value*/

                                    )

DESCRIPTION              Equations being integrated

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_NODATA if something goes wrong         

SPACECRAFT              VT

SEE ALSO                   


ADCS_Solar_FindSun()

NAME                           STATUS ADCS_Solar_FindSun

                                    (

                                    float*DateTime/* array of 6 values */

                                    )

DESCRIPTION              Determines Inertial sun vector (Si)

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_TIMEOUT if takes too long

                                   

SPACECRAFT              VT, UW, USU

SEE ALSO                    ADCS_Solar_date2jd, ADCS_Solar_angles3d, ADCS_Solar_angles, ADCS_Solar_opt, ADCS_Solar_sunsensor


ADCS_Solar_Date2jd()

NAME                           STATUS ADCS_Solar_Date2jd

                                    (

                                    float*DateTime   /* array of 6 values */

                                    )

DESCRIPTION              changes datetime into julian date

                                    Range: N/A

                                    Units: days

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    Bad Conversion? (out of bounds, etc.)

                                    ERROR_TIMEOUT if takes too long

                                   

SPACECRAFT              VT, UW, USU

SEE ALSO                    ADCS_Solar_FindSun, ADCS_Solar_angles3d, ADCS_Solar_angles, ADCS_Solar_opt, ADCS_Solar_sunsensor


ADCS_Solar_Angles3d()

NAME                           STATUS ADCS_Solar_angles3d

                                    (

                                    float*SidePanelAngles  /* array of 6 values */

                                    float* IntensityValues   /* array of 8 values*/

                                    float* IntensityFactor  /*1 value*/

                                    )

DESCRIPTION              Determines the intersection of three cones??

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_NO_CONVERGE if no intersection is found

                                    ERROR_TIMEOUT if takes too long

                                   

SPACECRAFT              VT, UW, USU

SEE ALSO                    ADCS_Solar_date2jd, ADCS_Solar_FindSun, ADCS_Solar_angles, ADCS_Solar_opt, ADCS_Solar_sunsensor


ADCS_Solar_angles()

NAME                           STATUS ADCS_Solar_angles

                                    (

                                    float* VectorToBeRotated            /* array of 3 values */

                                    float* Normal Vector                   /*array of 3 values*/

                                    float* VectorOfAngles                 /*array of 3 values*/

                                    )

DESCRIPTION              calculates set of unit vectors corresponding to a rotation

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_TIMEOUT if takes too long        

SPACECRAFT              VT, UW, USU

SEE ALSO                    ADCS_Solar_date2jd, ADCS_Solar_angles3d, ADCS_Solar_FindSun, ADCS_Solar_opt, ADCS_Solar_sunsensor


ADCS_Solar_Opt()

NAME                           STATUS ADCS_Solar_Opt

                                    (

                                    float*TGuess/* array of 3 values */

                                    float* VectorToBeRotated/* array of 3 values */

                                    float* Normal Vector /*array of 3 values*/

                                    )

DESCRIPTION              Optimizes cone intersection

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_NO_CONVERGE if no intersection is found

                                    ERROR_TIMEOUT if takes too long

                                   

SPACECRAFT              VT, UW, USU

SEE ALSO                    ADCS_Solar_date2jd, ADCS_Solar_angles3d, ADCS_Solar_angles, ADCS_Solar_FindSun, ADCS_Solar_sunsensor


ADCS_Solar_SunSensor()

NAME                           STATUS ADCS_Solar_sunsensor

                                    (

                                    float*IntensityValues      /* array of 8 values */

                                    float* DateTime                          /* array of 6 values */

                                    )

DESCRIPTION              Driver program for solar cell vector measurements

                                                What is it returning?

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_NO_CONVERGE if no intersection is found

                                    ERROR_TIMEOUT if takes too long

SPACECRAFT              VT, UW, USU

SEE ALSO                    ADCS_Solar_date2jd, ADCS_Solar_angles3d, ADCS_Solar_angles, ADCS_Solar_FindSun, ADCS_Solar_opt


ADCS_Solar_GetSolarCellData()

NAME                           STATUS ADCS_Solar_GetSolarCellData

                                    (

                                    )

DESCRIPTION              Driver program for solar cell vector measurements

                                    Range: N/A

                                    Units: N/A

                                    Reference: N/A

RETURNS                     OK for successful operation

                                    ERROR_MISSING if no data reported

                                    ERROR_TIMEOUT if takes too long

                                   

SPACECRAFT              VT, UW, USU

SEE ALSO                    ADCS_Solar_date2jd, ADCS_Solar_angles3d, ADCS_Solar_angles, ADCS_Solar_FindSun, ADCS_Solar_opt


ADCS_TorqueCoil_DirX()

NAME                           STATUS ADCS_TorqueCoil_DirX

                                    (

                                    float* CurrentArray          /* Array of 3 Current values  */

                                    )

DESCRIPTION              This Function is the driver for the X direction Torque Coil.

                                    It receives the required Current level from the ADCS_TorqueCoil_Current function and determines all the signals that need to be send to the Torque Coil Board.

                                    This Function will also take into account the data provided by the X-Coil Current and Temperature Sensors

                                    D/A Signal

                                    Range: 0 – 4096

                                    Units: none

                                    Reference: 0 is off

                                    Direction Signal

                                    Range: ON- OFF

                                    Units: none

                                    Reference: OFF is off

RETURNS                     OK for successful operation

                                    ERROR_TEMP Coil Temperature out of range

                                    ERROR_OUT_OF_RANGE calculated Binary signal is above 4096

                                    ERROR_NO_CURRENT if the current sensor

SPACECRAFT              VT

SEE ALSO                    ADCS_TorqueCoil_Current, ADCS_TorqueCoil_DirY, ADCS_TorqueCoil_DirZ


ADCS_TorqueCoil_DirY()

NAME                           STATUS ADCS_TorqueCoil_DirY

                                    (

                                    float* CurrentArray          /* Array of 3 Current values  */

                                    )

DESCRIPTION              This Function is the driver for the Y direction Torque Coil.

                                    It receives the required Current level from the ADCS_TorqueCoil_Current function and determines all the signals that need to be send to the Torque Coil Board.

                                    This Function will also take into account the data provided by the Y-Coil Current and Temperature Sensors .

                                    Range: 0 – 4096

                                    Units: none

                                    Reference: 0 is off

                                    Direction Signal

                                    Range: ON- OFF

                                    Units: none

                                    Reference: OFF is off

RETURNS                     OK for successful operation

                                    ERROR_TEMP Coil Temperature out of range

                                    ERROR_OUT_OF_RANGE calculated Binary signal is above 4096

                                    ERROR_NO_CURRENT if the current sensor

SPACECRAFT              VT

SEE ALSO                    ADCS_TorqueCoil_Current,ADCS_TorqueCoil_DirX,ADCS_TorqueCoil_DirZ


ADCS_TorqueCoil_DirZ()

NAME                           STATUS ADCS_TorqueCoil_DirZ

                                    (

                                    float* CurrentArray          /* Array of 3 Current values  */

                                    )

DESCRIPTION              This Function is the driver for the Z direction Torque Coil.

                                    It receives the required Current level from the ADCS_TorqueCoil_Current function and determines all the signals that need to be send to the Torque Coil Board.

                                    This Function will also take into account the data provided by the Z-Coil Current and Temperature Sensors

                                    D/A Signal

                                    Range: 0 – 4096

                                    Units: none

                                    Reference: 0 is off

                                    Direction Signal

                                    Range: ON- OFF

                                    Units: none

                                    Reference: OFF is off

RETURNS                     OK for successful operation

                                    ERROR_TEMP Coil Temperature out of range

                                    ERROR_OUT_OF_RANGE calculated Binary signal is above 4096

                                    ERROR_NO_CURRENT if the current sensor

SPACECRAFT              VT

SEE ALSO                    ADCS_TorqueCoil_Current, ADCS_TorqueCoil_DirY, ADCS_TorqueCoil_DirX

                                     


ADCS_TorqueCoil_DirX_DAC_READ()

NAME                           STATUS ADCS_TorqueCoil_DirX_DAC_READ

                                    (

int Direction_X               /* Integer determining Current direction thru the coil*/

, float DAC_CLK            /* D/A converter clock signal for bit size determination */

, float DAC_DIN             /* Binary Number determining the Voltage level */

,DAC_CS1#                               /* Turns on bit reading in D/A */

                                    )

DESCRIPTION              This function will be called to pass the appropriate signals to the D/A converter.

                                   

RETURNS                     OK for successful operation

                                    ERROR for not

SPACECRAFT              VT

SEE ALSO                    ADCS_TorqueCoil_DirX,

 


ADCS_TorqueCoil_DirY_DAC_READ()

NAME                           STATUS ADCS_TorqueCoil_DirY_DAC_READ

                                    (

int Direction_Y               /* Integer determining Current direction thru the coil*/

, float DAC_CLK            /* D/A converter clock signal for bit size determination */

, float DAC_DIN             /* Binary Number determining the Voltage level */

,DAC_CS1#                               /* Turns on bit reading in D/A */

                                    )

DESCRIPTION              This function will be called to pass the appropriate signals to the D/A converter.

RETURNS                     OK for successful operation

                                    ERROR for not

SPACECRAFT              VT

SEE ALSO                    ADCS_TorqueCoil_DirY,


ADCS_TorqueCoil_DirZ_DAC_READ()

NAME                           STATUS ADCS_TorqueCoil_DirZ_DAC_READ

                                    (

int Direction_Z               /* Integer determining Current direction thru the coil*/

, float DAC_CLK            /* D/A converter clock signal for bit size determination */

, float DAC_DIN             /* Binary Number determining the Voltage level */

,DAC_CS2#                               /* Turns on bit reading in D/A */

                                    )

DESCRIPTION              This function will be called to pass the appropriate signals to the D/A converter.

                                   

RETURNS                     OK for successful operation

                                    ERROR for not

SPACECRAFT              VT

SEE ALSO                    ,ADCS_TorqueCoil_DirX,


ADCS_CurrentSensor_DirX_ READ()

NAME                           STATUS ADCS_CurrentSensor_DirX_ READ

                                    (

                                    Don’t Know yet

                                    )

DESCRIPTION              This functio will call the X-Coil Current Sensor and pass the measured current back to ADCS_TorqueCoil_DirX

                                   

RETURNS                     OK for successful operation

                                    ERROR for not

SPACECRAFT              VT

SEE ALSO                    ADCS_TorqueCoil_DirX, ADCS_CurrentSensor_DirY_ READ, ADCS_CurrentSensor_DirZ_ READ

There will be similar functions for:

ADCS_CurrentSensor_DirY_ READ()

ADCS_CurrentSensor_DirZ_ READ()


ADCS_TempSensor_DirX_ READ()

NAME                           STATUS ADCS_TempSensor_DirX_ READ

                                    ( Don’t Know yet

                                    )

DESCRIPTION              This function will call the X-Coil Temperature Sensor and pass the measured temperature back to ADCS_TorqueCoil_DirX,

RETURNS                     OK for successful operation

                                    ERROR for not

SPACECRAFT              VT

SEE ALSO                    ADCS_TorqueCoil_DirX, ADCS_TempSensor_DirY_ READ, ADCS_TempSensor_DirZ_ READ

There will be similar functions for:

ADCS_TempSensor_DirY_ READ()

ADCS_TempSensor_DirZ_ READ()


ADCS_CameraISR()

NAME                           STATUS ADCS_CameraISR

                                    (

                                    None?

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                   


ADCS_CameraISR()

NAME                           STATUS ADCS_CameraISR

                                    (

                                    None?

                                    )

DESCRIPTION             

                                               

RETURNS                     OK for successful operation

                                    ERROR otherwise

SEE ALSO                   


ADCS_RateGyroRead()

NAME                           STATUS ADCS_RateGyroRead

                                    (

                                    float* AngularVelocity     /* array of 3 angular velocities */

                                    )

DESCRIPTION              Returns the vector of angular velocities about the body axis

                                    Units: degrees/second

                                    Range: -10 deg/s -> +10 deg/s

                                               

RETURNS                     OK for successful operation

                                    ERROR_RGRANGE if rate gyro measurement is out of

                                                range

                                    ERROR_RGTIMEOUT if rate gyro does not respond

SEE ALSO                    ADCS_RateGyroReset, ADCS_RateGyroPower


ADCS_RateGyroReset()

NAME                           STATUS ADCS_RateGyroReset

                                    (

                                   

                                    )

DESCRIPTION              Resets the rate gyro due to bias drift                  

RETURNS                     OK for successful operation

                                    ERROR_RGTIMEOUT if rate gyro does not respond

SEE ALSO                    ADCS_RateGyroRead, ADCS_RateGyroPower


ADCS_RateGyroPower()

NAME                           STATUS ADCS_RateGyroReset

                                    (

                                    int* PowerState  /* vector of 3 On/Off states to set rate

                                                                                    gyros */

                                    )

DESCRIPTION              Powers on, or turns off the rate gyro

                                    PowerState = ON to turn rate gyro on

                                    PowerState = OFF to turn rate gyro off                

RETURNS                     OK for successful operation

                                    ERROR_RGTIMEOUT if rate gyro does not respond

SEE ALSO                    ADCS_RateGyroRead, ADCS_RateGyroReset


ADCS_GetImage()

NAME                           STATUS ADCS_GetImage

                                    (

                                    int** Image                    /* Array of pixel intensities */

                                    )

DESCRIPTION              Reads the pixel intensities off of the CCD board and processes them as values of  0 – 255 in a 512 x 512 array.

                                    Range: 0 – 255

                                    Units: Auto-scaled intensities

                                    Reference: 0 is black, 255 white

RETURNS                     OK for successful operation

                                    ERROR_NOIMG if it cannot get image from camera

                                    ERROR_WRONGIMGSIZE if the image is not 512 x 512

SPACECRAFT              VT, UW?, USU?

SEE ALSO                    ADCS_ReduceImgRes(), ADCS_FindNadir()


ADCS_ReduceImgRes()

NAME                           STATUS ADCS_ReduceImgRes()

                                    {

                                    int** Image        /* 512 x 512 intensity array from ADCS_GetImage() */

                                    int** ImageSmall /* 256 x 256 intensity array */

                                    }

DESCRIPTION              Takes the 512 x 512 image and reduces the resolution to 256 x 256

RETURNS                     OK for successful operation

                                    ERROR if something goes wrong

SPACECRAFT              VT

SEE ALSO                    ADCS_GetImage(), ADCS_FindNadir()


ADCS_FindNadir()

NAME                           STATUS ADCS_FindNadir()

                                    {

                                    double Altitude   /* Altitude of satellite, from GPS? */

                                    int** ImageSmall            /* 256 x 256 intensity array */

                                    double* UnitNadir           /* 1 x 3 array giving unit nadir vector */

                                    }

DESCRIPTION              Using the altitude of the satellite and an image of the earth’s horizon, determines the nadir unit vector with respect to the axis out of the camera lens.

RETURNS                     OK for successful operation

                                    ERROR_NOHORIZON if three points along an edge cannot be found

                                    ERROR_PROCESSION if  a nadir vector cannot be calculated

SPACECRAFT              VT

SEE ALSO                    ADCS_GetImage(),        ADCS_ReduceImgRes()

                                   


ADCS_MagnetometerRead()

NAME                        STATUS ADCS_MagnetometerRead

                                    (

                                    float* MagArray         /* Array of 3 magnetometer values  */

                                    )

DESCRIPTION              Reads the magnetometer and returns the measured voltage from the A/D converter

                                    Range: 0 – 5

                                    Units: Volts

                                    Reference: 0V is ground

RETURNS                     OK for successful operation

                                    ERROR_MAGBROKEN if magnetometer does not respond

                                    ERROR_MAGBOUNDS if magnetometer is out of bounds

SPACECRAFT              VT, UW

SEE ALSO                    ADCS_MagnetometerReset, ADCS_MagnetometerSet
ADCS_MagnetometerReset()

NAME                           STATUS ADCS_MagnetometerReset()

DESCRIPTION              Resets the magnetometer

RETURNS                     OK for successful operation

                                    ERROR_MAGBROKEN if magnetometer does not respond

                                    ERROR_MAGRESETBROKEN if magnetometer reset circuit does not respond

SPACECRAFT              VT, UW

SEE ALSO                    ADCS_MagnetometerRead, ADCS_MagnetometerSet


ADCS_MagnetometerSet()

NAME                           STATUS ADCS_MagnetometerSet()

                                   

DESCRIPTION              Sets the magnetometer

RETURNS                     OK for successful operation

                                    ERROR_MAGBROKEN if magnetometer does not respond

SPACECRAFT              VT, UW

SEE ALSO                    ADCS_MagnetometerReset, ADCS_MagnetometerRead


4        Thermal

General Temp Sensor Interface

THRM_BatteryBoxHeaterPwr()

NAME                           STATUS THRM_BatteryBoxHeaterPwr

                                    (

                                    int*power           /* Heater power on or off */

                                    )

DESCRIPTION              Turn power to battery box heater on or off

                                    Value: 0 for off

                                                1 for on

RETURNS                     OK if succeeds

                                    ERROR_BATBOXTIMEOUT if heater does not respond

SPACECRAFT              USU, VT, UW

SEE ALSO                               
THRM_BatteryBoxTempRead()

NAME                           STATUS SUBSYSTEM_FunctionName

                                    (

                                    float* TempArray            /* Array of temp readings from

                                                                        2 sensors*/

                                    )

                                   

DESCRIPTION              Reads the temperature and returns a voltage

                                    Range:   TBD

                                    Units:  Volts

RETURNS                     OK for successful operation

SPACECRAFT              USU, VT, UW

SEE ALSO                               


5        Structures

Thermal Measurements?

STR_SepDetUWUSU()

NAME                           STATUS STR_SepDetUWUSU

                                    (

                                    int* SEPDETUWUSU     /* Value of zero or 1  */

                                    )

DESCRIPTION              Checks to see if lightband between UW and USU has separated

                                    Range: 0 – 1

                                    Units: None

                                    Reference: 0 is not separated

RETURNS                     OK for successful separation

                                    ERROR_SEPDETUWUSU for no separation

                                   

SPACECRAFT              USU, UW

SEE ALSO                    STR_SepDetVTUW, STR_Sep DetMSDS


STR_SepDetVTUW()

NAME                           STATUS STR_SeptDetVTUW

                                    (

                                    int* SEPDETVTUW                    /* Value of zero or 1  */

                                    )

DESCRIPTION              Checks to see if lightband between UW and VT has separated

                                    Range: 0 – 1

                                    Units: None

                                    Reference: 0 is not separated

RETURNS                     OK for successful separation

                                    ERROR_SEPDETVTUW for no separation

                                   

SPACECRAFT              VT, UW

SEE ALSO                    STR_SEPDETUWUSU, STR_SEPDETMSDS


STR_SepDetMSDS()

NAME                           STATUS STR_SEPDETMSDS

                                    (

                                    int* SEPDETMSDS        /* Value of zero or 1  */

                                    )

DESCRIPTION              Checks to see if lightband between VT and MSDS has separated

                                    Range: 0 – 1

                                    Units: None

                                    Reference: 0 is not separated

RETURNS                     OK for successful separation

                                    ERROR_SEPDETMSDS for no separation

                                   

SPACECRAFT              VT

SEE ALSO                    STR_SEPDETVTUW, STR_SEPDETUWUSU


6        Formation Flying

FF_SetMode()

NAME                        STATUS FF_SetMode

                        (

hs_Spacecraft_mode           /* or whatever the systems people call the thing that tells us what operational mode the spacecraft is in */

hs_state_current       /* a 1x6 vector of HokieSat position and velocity */

                        hs_state_desired      /* a 1x6 array of HokieSat desired "   "   " */

hs_attitude_curent    /* a quaternion, or something that describes HokieSat's current attitude */

                        hs_thrust_vector        /* a unit vector in the thrust direction */

hs_FF_mode             /* an interger, or flag describing what FF mode the s/c is in */

                        )

DESCRIPTION        Sets a flag that tells what formation flying mode the spacecraft is in.  It can be in either a drift mode (meaning either the formation is correct, or external circumstances prohibit formation keeping/maneuvering operations), attitude mode (meaning attitude adjustment is required before formation keeping/maneuvering can occur), or orbit mode (meaning that orbit adjustments are required, and conditions are right to fire the thrusters)

RETURNS                OK for successful operation

                       

SPACECRAFT        UW, VT, USU

SEE ALSO   


XL_UpdateOrbitalStates()

NAME                        XL_UpdateOrbitalStates

                        (

all_orbital_states                   /* a 3x6 array of position/velocity vectors for each s/c */

                        )

DESCRIPTION        Gets orbital information for all of the s/c from the XL/GPS, and stores them in a 3x6 array (1x6 [r;v] vectors for each spacecraft)

RETURNS                OK for successful operation

SPACECRAFT        UW, VT, USU

SEE ALSO                   


FF_CalculateDesiredState()

NAME                        FF_CalculateDesiredState

                        (

ftype                            /* an interger or flag that tells the formation planner what type of formation is desired */

fsize                            /* a variable describing the size of the formation */

fleader                        /* an interger of flag that tells which s/c is the formation leader */

                        hs_state_current       /* a 1x6 array of HokieSat position and velocity */

hs_state_desired      /* a 1x6 array of desired position and velocity for HokieSat */

                        )

DESCRIPTION        Calculates the desired state of the spacecraft based on formation information

RETURNS                OK for successful operation

                       

SPACECRAFT        UW, VT, USU

SEE ALSO    FF_CalculateThrustVector, FF_SetMode, XL_GetStatesFromGPSXL, ADCS_CalculateDesiredAttitude


FF_CalculateThrustVector()

NAME                        FF_CalculateThrustVector

                        (

                        hs_state_current       /* a 1x6 vector of HokieSat position and velocity */

                        hs_state_desired      /* a 1x6 array of HokieSat desired "   "   " */

                        hs_thrust_vector        /* a unit vector in the thrust direction */

                        )

DESCRIPTION        Calculates the thrust vector required to maintain or maneuver the formation

RETURNS                OK for successful operation

                       

SPACECRAFT        UW, VT, USU

SEE ALSO    FF_CalculateDesiredState, XL_GetStatesFromGPSXL


7        Propulsion

PROP_CheckPPT1()

NAME                        PROP_CheckPPT1

                        (

                        hs_PPT1_                  /* Comment    */

                        hs_PPT1_                  /* Comment    */

                        )

DESCRIPTION             

RETURNS    Description of error return codes

SPACECRAFT        List of spacecraft using this function

SEE ALSO    Reference to similar, or corresponding functions

etc for all 4 thrusters, or perhaps it's combined. 


PROP_FireThruster1()

NAME                        PROP_FireThruster1

                        (

                       

                        )

DESCRIPTION        Sends a fire sequence to thruster 1

RETURNS                Description of error return codes

SPACECRAFT        UW, VT

SEE ALSO    Reference to similar, or corresponding functions

etc for PPTs 2-4


PROP_CheckPPU()

NAME                        PROP_CheckPPU

                        (

                        type VarName           /* Comment    */

                        type VarName2         /* Comment    */

                        )

DESCRIPTION        Check PPU

RETURNS                Description of error return codes

SPACECRAFT        List of spacecraft using this function

SEE ALSO    Reference to similar, or corresponding functions


8        Orbital


Andrew Turner
Last modified: Fri Jul 13 12:53:38 EDT 2001
$Id: function_interfaces.htm,v 1.1 2001/07/13 17:27:11 ajturner Exp $