$LastChangedDate: 27-Juil-2011 $

# CL_gm_locSolTime

Local solar time

## Calling Sequence

       locSolTime = CL_gm_locSolTime(pos,sun_dir)

## Description

- Computes the local solar time (locSolTime) at any location, knowing the position (pos) and the Sun direction (sun_dir), both supposed defined in the same reference frame.

- Notes:

  - A local time equal to 12h means a right ascension equal to the Sun's right ascension.

  - "Local time" here means "true local time".

## Parameters

pos:

  Position vector [m] (3xN)

sun_dir:

  Sun direction vector in the same frame as pos (3xN)

locSolTime:

  Local solar time, angle in ]-pi, pi] (0 rad for 12h(noon)) [rad] (1xN)

## Authors

- CNES - DCT/SB

## Examples

    cjd = CL_dat_cal2cjd(2008,10,25);
    // sat position in G50 :
    pos = [ 7378.e3 ; 0 ; 0];
    // Sun position in G50 :
    [sun_dir,rs] = CL_mod_moonSunG50(cjd,'s');

    // True local solar time (angle)
    locSolTime = CL_gm_locSolTime(pos,sun_dir)

    // True local solar time (hours)
    locSolTime_hours = (locSolTime+%pi)*24/(2*%pi)