This page was created by the IDL library routine mk_html_help2.

Last modified: Thu Aug 6 12:53:14 2020.


Directory Listing of Routines


Routine Descriptions

HYBRID_ORBIT

[Next Routine] [List of Routines]
PROCEDURE:   hybrid_orbit
PURPOSE:
  Plots 

USAGE:
  hybrid_orbit, lon, lat

INPUTS:
       lon:       East longitude (0 to 360 degrees).

       lat:       Latitude (-90 to 90 degrees).

                  Note: lon and lat must have the same number
                        of elements.

KEYWORDS:
       PSYM:      Symbol type (same as for plot).

       LSTYLE:    Line style (same as for plot).

       COLOR:     Line/symbol color (same as for plot).

       RESET:     Read in the MAG-MOLA image and calculate the
                  plot size and position.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2020-07-01 12:20:16 -0700 (Wed, 01 Jul 2020) $
 $LastChangedRevision: 28841 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/hybrid_orbit.pro $

CREATED BY:	David L. Mitchell  04-02-03

(See projects/maven/maven_orbit_tplot/hybrid_orbit.pro)


MAG_MOLA_ORBIT

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   mag_mola_orbit
PURPOSE:
  Plots a set of [longitude,latitude] positions over a MAG-MOLA
  map.

USAGE:
  mag_mola_orbit, lon, lat

INPUTS:
       lon:       East longitude (0 to 360 degrees).

       lat:       Latitude (-90 to 90 degrees).

                  Note: lon and lat must have the same number
                        of elements.

KEYWORDS:
       PSYM:       Symbol type (same as for plot).

       LSTYLE:     Line style (same as for plot).

       COLOR:      Line/symbol color (same as for plot).

       RESET:      Read in the MAG-MOLA image and calculate the
                   plot size and position.

       NOERASE:    Do not refresh the plot for each [lon, lat] point.

       BIG:        Use a 1000x500 MAG-MOLA image.

       TERMINATOR: Overlay the terminator at the time specified by this
                   keyword.

       SHADOW:     If TERMINATOR is set, specifies which "terminator" to
                   plot.
                      0 : Optical shadow boundary at surface.
                      1 : Optical shadow boundary at s/c altitude.
                      2 : EUV shadow boundary at s/c altitude.
                      3 : EUV shadow at electron absorption altitude.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2020-07-01 12:20:16 -0700 (Wed, 01 Jul 2020) $
 $LastChangedRevision: 28841 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/mag_mola_orbit.pro $

CREATED BY:	David L. Mitchell  04-02-03

(See projects/maven/maven_orbit_tplot/mag_mola_orbit.pro)


MAG_NPOLE_ORBIT

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   mag_npole_orbit
PURPOSE:
  Plots a set of [longitude,latitude] positions over a polar MAG map.

USAGE:
  mag_Npole_orbit, lon, lat

INPUTS:
       lon:       East longitude (0 to 360 degrees).

       lat:       Latitude (-90 to 90 degrees).

                  Note: lon and lat must have the same number
                        of elements.

KEYWORDS:
       PSYM:      Symbol type (same as for plot).

       LSTYLE:    Line style (same as for plot).

       COLOR:     Line/symbol color (same as for plot).

       RESET:     Read in the MAG-MOLA image and calculate the
                  plot size and position.

       NOERASE:   Do not refresh the plot for each [lon, lat] point.

       TERMINATOR: Overlay the terminator.

       SHADOW:     If TERMINATOR is set, specifies which "terminator" to
                   plot.
                      0 : Optical shadow boundary at surface.
                      1 : Optical shadow boundary at s/c altitude.
                      2 : EUV shadow boundary at s/c altitude.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2020-07-01 11:18:35 -0700 (Wed, 01 Jul 2020) $
 $LastChangedRevision: 28832 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/mag_npole_orbit.pro $

CREATED BY:	David L. Mitchell  04-02-03

(See projects/maven/maven_orbit_tplot/mag_npole_orbit.pro)


MAVEN_ORBIT_COMMON

[Previous Routine] [Next Routine] [List of Routines]
COMMON BLOCK:   maven_orbit_common
PURPOSE:
  Common block definition for maven_orbit_tplot and associated routines.

USAGE:
  To be used inside routines that want access to the common block.  Put this
  line near the top:

    @maven_orbit_common

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2019-02-22 08:33:51 -0800 (Fri, 22 Feb 2019) $
 $LastChangedRevision: 26669 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/maven_orbit_common.pro $

CREATED BY:	David L. Mitchell

(See projects/maven/maven_orbit_tplot/maven_orbit_common.pro)


MAVEN_ORBIT_EPH

[Previous Routine] [Next Routine] [List of Routines]
FUNCTION:   maven_orbit_eph
PURPOSE:
  Returns the MAVEN spacecraft ephemeris, consisting of the MSO and GEO state
  vectors along with some derived quantities: altitude, GEO longitude, GEO
  latitude, and solar zenith angle.  The reference surface for calculating
  altitude ("datum") is specified.

  The coordinate frames are:

   GEO = body-fixed Mars geographic coordinates (non-inertial) = IAU_MARS

              X ->  0 deg E longitude, 0 deg latitude
              Y -> 90 deg E longitude, 0 deg latitude
              Z -> 90 deg N latitude (= X x Y)
              origin = center of Mars
              units = kilometers

   MSO = Mars-Sun-Orbit coordinates (approx. inertial)

              X -> from center of Mars to center of Sun
              Y -> opposite to Mars' orbital angular velocity vector
              Z = X x Y
              origin = center of Mars
              units = kilometers

USAGE:
  eph = maven_orbit_eph()
INPUTS:
       none

KEYWORDS:
       none

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2019-03-15 12:33:21 -0700 (Fri, 15 Mar 2019) $
 $LastChangedRevision: 26801 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/maven_orbit_eph.pro $

(See projects/maven/maven_orbit_tplot/maven_orbit_eph.pro)


MAVEN_ORBIT_MAKEEPH

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   maven_orbit_makeeph
PURPOSE:
  Generates MAVEN spacecraft state vectors using the SPICE Icy toolkit.
  The result is returned in a structure with the following tags:

    T              Time (UTC): number of seconds since 1970-01-01
    X              X position coordinate (km)
    Y              Y position coordinate (km)
    Z              Z position coordinate (km)
    VX             X velocity component (km/s)
    VY             Y velocity component (km/s)
    VZ             Z velocity component (km/s)

USAGE:
  maven_orbit_makeeph, frame=frame, origin=origin, eph=eph
INPUTS:

KEYWORDS:
       TSTEP:     Time step (seconds).  Default = 60.

       EPH:       Named variable to hold the ephemeris structure.

       FRAME:     Coordinate frame.  Type mvn_frame_name(/list) for a full list.

       ORIGIN:    Origin of coordinate frame.  Can be "Mars", "Phobos", or
                  "Deimos".  Default = "Mars".

       TSTART:    Start time for output save file ephemeris.

       TSTOP:     Stop time for output save file ephemeris.

       MVN_SPK:   Include the specified spacecraft kernel(s) in the loadlist.  
                  Full path and filename is required.  Used for the long-range 
                  predict kernels, such as the design reference mission (DRM).

       UNLOAD:    Unload all kernels (cspice_kclear) after completion.

       RESET:     Unload all kernels (cspice_kclear) and start fresh.

       STAT:      Return statistics of ephemeris coverage.  (Useful to determine
                  the boundary between reconstructions and predictions.)

       OBJECT:    By default, this routine uses the name 'MAVEN' (id = -202) for
                  the spacecraft, which is the definition used by NAIF.  It is 
                  possible for an ephemeris to use a non-standard object name/id.
                  Use this keyword to override the default and specify the non-
                  standard name or id.  Example: OBJECT='-200000'.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2018-07-05 13:14:34 -0700 (Thu, 05 Jul 2018) $
 $LastChangedRevision: 25439 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/maven_orbit_makeeph.pro $

CREATED BY:	David L. Mitchell  2014-10-13

(See projects/maven/maven_orbit_tplot/maven_orbit_makeeph.pro)


MAVEN_ORBIT_MOVIE

[Previous Routine] [Next Routine] [List of Routines]
 PROCEDURE:
       maven_orbit_movie
 PURPOSE:
       3D visualization of MAVEN orbit using IDL 8 new graphics
 CALLING SEQUENCE:
       timespan,'2015-01-01'
       maven_orbit_movie, dim=[640,480], rate=3600
 OPTIONAL KEYWORDS:
       TRANGE: time range (if not present then timerange() is called)
       DIMENSIONS: [width,height] (Def: half of the screen size)
       MOVIENAME: name of the output movie file (Def: 'maven_orbit.mp4')
       RATE: speed of the movie (Def: 4*3600 = 4 hr/sec)
       FPS: frames per sec of the movie (Def: 20)
       ZOOMSCALE: zoom in/out scale (Def: 1.5)
       FONT_SIZE: font size of the time stamp (Def: 24)
       BOXSIZE: minmax of the 3D box in km (Def: [-3.,3.]*R_M)
       BCMODEL: specifies crustal field model (Def: 'morschhauser')
       SNAP: if set, generate a snapshot instead of a movie
       TSNAP: time of the snapshot (Def: start time of timerange())
       FIGNAME: name of the snapshot file (Def: 'maven_orbit.png')
                most file formats are acceptable
                (http://www.exelisvis.com/docs/save_method.html)
       CLOSEWIN: close the graphic window when finished
 CREATED BY:
       Yuki Harada on 2015-11-04

 $LastChangedBy: haraday $
 $LastChangedDate: 2015-12-08 15:45:18 -0800 (Tue, 08 Dec 2015) $
 $LastChangedRevision: 19545 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/maven_orbit_movie.pro $

(See projects/maven/maven_orbit_tplot/maven_orbit_movie.pro)


MAVEN_ORBIT_SNAP

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   maven_orbit_snap
PURPOSE:
  After running maven_orbit_tplot, this routine plots the orbit as viewed
  along each of the MSO axes.  Optionally, the orbit can be superimposed on
  models of the solar wind interaction with Mars.  Also optionally, the 
  position of the spacecraft can be plotted (in GEO coordinates) on a map
  of Mars' topography and magnetic field based on MGS MOLA and MAG data.

  All plots are generated at times selected with the cursor on the TPLOT
  window.  Hold down the left mouse button and drag for a movie effect.

USAGE:
  maven_orbit_snap
INPUTS:

KEYWORDS:
       PREC:     Plot the position of the spacecraft at the selected time,
                 superimposed on the orbit.  Otherwise, the periapsis 
                 location for each orbit is plotted.  For time ranges less
                 than seven days, the default is PREC = 1.  Otherwise the 
                 default is 0.

       MHD:      Plot the orbit superimposed on an image of an MHD simulation
                 of the solar wind interaction with Mars (from Ma).
                   1 : Plot the XY projection
                   2 : Plot the XZ projection

       HYBRID:   Plot the orbit superimposed on an image of a hybrid simulation
                 of the solar wind interaction with Mars (from Brecht).
                   1 : Plot the XZ projection
                   2 : Invert Z in the model, then plot the XZ projection

       LATLON:   Plot MSO longitudes and latitudes of periapsis (PREC=0) or 
                 the spacecraft (PREC=1) in a separate window.

       CYL:      Plot MSO cylindrical projection (x vs. sqrt(y^2 + z^2)).

       XZ:       Plot only the XZ projection (view from side).

       XY:       Plot only the XY projection (view from ecliptic north).

       YZ:       Plot only the YZ projection (view from Sun)

       MARS:     Plot the position of the spacecraft (PREC=1) or periapsis 
                 (PREC=0) on an image of Mars topography and magnetic field
                 based on MGS data (from Connerney).
                   1 : Use a small image
                   2 : Use a large image

       NPOLE:    Plot the position of the spacecraft (PREC=1) or periapsis
                 (PREC=0) on a north polar projection (lat > 55 deg).  The
                 background image is the north polar magnetic anomalies observed
                 at 180-km altitude by MGS (from Acuna).

       ALT:      If set and keywords MARS and/or NPOLE are set, then indicate the
                 spacecraft altitude next its symbol.

       TERMINATOR: Overplot the terminator and sub-solar point onto the Mars
                   topography plots (see MARS and NPOLE above).  SPICE must be 
                   installed and initialized (e.g., mvn_swe_spice_init) before 
                   using this keyword.  The following values are recognized:
                      0 : Do not plot any shadow boundary.  (default)
                      1 : Plot optical shadow boundary at surface.
                      2 : Plot optical shadow boundary at s/c altitude.
                      3 : Plot EUV shadow boundary at s/c altitude.
                      4 : Plot EUV shadow at electron absorption altitude.

       NOERASE:  Don't erase previously plotted positions.  Can be used to build
                 up a visual representation of sampling.

       NODOT:    Do not plot a filled circle at periapsis or spacecraft location.

       RESET:    Initialize all plots.

       COLOR:    Symbol color index.

       KEEP:     Do not kill the plot windows on exit.

       TIMES:    An array of times for snapshots.  Snapshots are overlain onto
                 a single version of the plot.  For evenly spaced times, this
                 produces a "spirograph" effect.  This overrides the interactive
                 entry of times with the cursor.  Sets KEEP, NOERASE, and RESET.

       BDIR:     Set keyword to show magnetic field direction in three planes,
                 In each plane, the same two components of B in MSO coordinates 
                 are shown, i.e. in XY plane, plotting Bx-By. The color shows 
                 if the third component (would be Bz in XY plane) is positive 
                 (red) or negative (blue).

       BCLIP:    Maximum amplitude for plotting B whisker.

       SCALE:    To change the scale/length of field lines, the default value is
                 set to 0.05

       VDIR:     Set keyword to a tplot variable containing MSO vectors for a whisker
                 plot (like BDIR).

       VCLIP:    Maximum amplitude for plotting V whisker.

       VRANGE:   Time range for plotting vectors.

       VSCALE:   To change the scale/length of vector lines, the default value is
                 set to 0.05.

       THICK:    Line thickness.

       MAGNIFY:  Change size of plot windows.

       NOLABEL:  Omit text labels showing altitude and solar zenith angle.

       PSNAME:   Name of a postscript plot.  Works only for orbit plots.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2020-08-03 16:48:55 -0700 (Mon, 03 Aug 2020) $
 $LastChangedRevision: 28978 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/maven_orbit_snap.pro $

CREATED BY:	David L. Mitchell  10-28-11

(See projects/maven/maven_orbit_tplot/maven_orbit_snap.pro)


MAVEN_ORBIT_TPLOT

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   maven_orbit_tplot
PURPOSE:
  Loads MAVEN ephemeris information, currently in the form of IDL save files produced
  with maven_spice_eph.pro, and plots the spacecraft trajectory as a function of time
  (using tplot).  The plots are color-coded according to the nominal plasma regime, 
  based on conic fits to the bow shock and MPB from Trotignon et al. (PSS 54, 357-369, 
  2006).  The wake region is either the EUV or optical shadow in MSO coordinates:
  (sqrt(y*y + z*z) < Rm ; x < 0), where Rm is the Mars radius appropriate for optical
  or EUV wavelengths.

  The available coordinate frames are:

   GEO = body-fixed Mars geographic coordinates (non-inertial) = IAU_MARS

              X ->  0 deg E longitude, 0 deg latitude
              Y -> 90 deg E longitude, 0 deg latitude
              Z -> 90 deg N latitude (= X x Y)
              origin = center of Mars
              units = kilometers

   MSO = Mars-Sun-Orbit coordinates (approx. inertial)

              X -> from center of Mars to center of Sun
              Y -> opposite to Mars' orbital angular velocity vector
              Z = X x Y
              origin = center of Mars
              units = kilometers

USAGE:
  maven_orbit_tplot
INPUTS:

KEYWORDS:
       STAT:     Named variable to hold the plasma regime statistics.

       DOMEX:    Use a MEX ephemeris, instead of one for MAVEN.

       SWIA:     Calculate viewing geometry for SWIA, based on nominal s/c
                 pointing.

       DATUM:    String for specifying the datum, or reference surface, for
                 calculating altitude.  Can be one of "sphere", "ellipsoid",
                 "areoid", or "surface".  Default = 'ellipsoid'.
                 Minimum matching is used for this keyword.
                 See mvn_altitude.pro for more information.

       IALT:     Ionopause altitude.  Highly variable, but nominally ~400 km.
                 For display only - not included in statistics.  Default is NaN.

       SHADOW:   Choose shadow boundary definition:
                    0 : optical shadow at spacecraft altitude
                    1 : EUV shadow at spacecraft altitude (default)

       SEGMENTS: Plot nominal altitudes for orbit segment boundaries as dotted
                 horizontal lines.  Closely spaced lines are transitions, during
                 which time the spacecraft is reorienting.  The actual segment 
                 boundaries vary with orbit period.

       RESULT:   Named variable to hold the MSO ephemeris with some calculated
                 quantities.  OBSOLETE.  Use keyword EPH instead.

       EPH:      Named variable to hold the MSO and GEO state vectors along with 
                 some calculated values.

       CURRENT:  Load the ephemeris from MOI to the current date + 2 weeks.  This
                 uses reconstructed SPK kernels, as available, then predicts.
                 This is the default.  OBSOLETE.

       SPK:      String array with an even number of elements >= 2 containing the 
                 names of the MSO and GEO save/restore ephemerides to use instead 
                 of the standard set.  Multiple MSO and GEO files can be specified,
                 but each MSO file must have a corresponding GEO file.  (These are
                 made in pairs - see maven_orbit_makeeph).

                 Used for long range predict and special events kernels.  Replaces
                 keywords EXTENDED and HIRES.

       EXTENDED: Load one of the long-term predict ephemerides.  The value of this
                 keyword can range from 1 to 4, corresponding to the following spk
                 kernels:

                   1 : trj_orb_191220-201220_targetM2020EDL-xso_191120.bsp
                   2 : trj_orb_200415-210512_targetM2020EDL-sro-ERTF2_191120.bsp
                   3 : trj_orb_210212-260101_dsf4_200429.bsp
                   4 : trj_orb_260101-301230_dsf4_200429.bsp

                 Ephemerides 1 and 2 were created in November 2019.
                 The first is "extended science", with periapsis starting in the
                 nominal science density corridor (~150 km altitude) and then 
                 allowed to drift upward after 2020-04-10.  The second is
                 "science/relay", with perapsis raised to a minimum of ~180 km
                 on 2020-09-16.

                 Ephemerides 3 and 4 were created in April 2020.
                 These extend the science-relay orbit out to the nominal end of
                 mission.  It is assumed that periapsis will continue to vary
                 between 180 and 240 km without corridor control.  Atmospheric
                 drag will gradually reduce apoapsis from 4400 km in early 2021
                 to 3850 km by the end of 2030.  Because of operational
                 constraints, the orbit cannot be allowed to decay this much, so
                 some change in the long-term mission design is required.

       HIRES:    OBSOLETE - this keyword has no effect at all.

       LOADONLY: Create the TPLOT variables, but do not plot.

       NOLOAD:   Don't load or refresh the ephemeris information.  Just fill in any
                 keywords and exit.

       RESET_TRANGE: If set, then reset the time span to cover the entire ephemeris
                     time range, overwriting any existing time range.  This will
                     affect any routines that use timespan for determining what
                     data to process.  Use with caution.

       TIMECROP: An array with at least two elements, in any format accepted by 
                 time_double.  Only ephemeris data between the earliest and
                 latest times in this array are retained.  Default is to crop
                 data to current timespan, if it exists -- otherwise, load and
                 display all available ephemeris data (same as NOCROP).

       NOCROP:   Load and display all available ephemeris data.  Overrides TIMECROP.

       COLORS:   Color indices the nominal plasma regimes: [sheath, pileup, wake].
                 The solar wind is always plotted in the default foreground color,
                 typically white or black.  For other regimes, the defaults are:

                   regime       index       color (table 43)
                   -----------------------------------------
                   sheath         4         green
                   pileup         5         yellow
                   opt wake       2         blue
                   euv wake       1         violet
                   -----------------------------------------

       VARS:     Array of TPLOT variables created.

       NOW:      Plot a vertical dotted line at the current time.

       PDS:      Plot vertical dashed lines separating the PDS release dates.

       VERBOSE:  Verbosity level passed to mvn_pfp_file_retrieve.  Default = 0
                 (suppress most messages).

       CLEAR:    Clear the common block and exit.

       SAVE:     Make a save file for all tplot variables and the common block.

       RESTORE:  Restore tplot variables and the common block from a save file.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2020-08-03 16:47:52 -0700 (Mon, 03 Aug 2020) $
 $LastChangedRevision: 28977 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/maven_orbit_tplot.pro $

CREATED BY:	David L. Mitchell  10-28-11

(See projects/maven/maven_orbit_tplot/maven_orbit_tplot.pro)


MAVEN_ORBIT_UPDATE

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   maven_orbit_update
PURPOSE:
  Updates the "current" spacecraft ephemeris using SPICE. 

USAGE:
  maven_orbit_update

INPUTS:

KEYWORDS:
       TSTEP:    Ephemeris time step (sec).  Default = 60 sec.

       REBUILD:  Normally, months containing only reconstructed kernels are not
                 updated.  Set this keyword to rebuild the entire database.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2018-11-18 15:35:55 -0800 (Sun, 18 Nov 2018) $
 $LastChangedRevision: 26145 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/maven_orbit_update.pro $

CREATED BY:	David L. Mitchell  2014-10-13

(See projects/maven/maven_orbit_tplot/maven_orbit_update.pro)


MHD_ORBIT

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   mhd_orbit
PURPOSE:
  Plots 

USAGE:
  mhd_orbit, lon, lat

INPUTS:
       lon:       East longitude (0 to 360 degrees).

       lat:       Latitude (-90 to 90 degrees).

                  Note: lon and lat must have the same number
                        of elements.

KEYWORDS:
       PSYM:      Symbol type (same as for plot).

       LSTYLE:    Line style (same as for plot).

       COLOR:     Line/symbol color (same as for plot).

       RESET:     Read in the MAG-MOLA image and calculate the
                  plot size and position.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2020-07-01 11:18:35 -0700 (Wed, 01 Jul 2020) $
 $LastChangedRevision: 28832 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/mhd_orbit.pro $

CREATED BY:	David L. Mitchell  04-02-03

(See projects/maven/maven_orbit_tplot/mhd_orbit.pro)


MVN_MARS_LOCALTIME

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   mvn_mars_localtime
PURPOSE:
  Uses SPICE to determine the local solar time over the current tplot
  time range (full).  The result is stored as a tplot variable and 
  optionally returned via keyword.

  It is assumed that you have already initialized SPICE.  (See 
  mvn_swe_spice_init for an example.)

USAGE:
  mvn_mars_localtime, result=dat

INPUTS:
       None:      All necessary data are obtained from the common block.

KEYWORDS:
       RESULT:    Structure containing the result:

                    time  : unix time for used for calculation
                    lst   : local solar time (hrs)
                    slon  : sub-solar point longitude (deg)
                    slat  : sub-solar point latitude (deg)

       TPLOT:     Make tplot variables.

       PANS:      Returns the names of any tplot variables created.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2020-07-01 11:16:48 -0700 (Wed, 01 Jul 2020) $
 $LastChangedRevision: 28830 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/mvn_mars_localtime.pro $

CREATED BY:	David L. Mitchell

(See projects/maven/maven_orbit_tplot/mvn_mars_localtime.pro)


MVN_MARS_TERMINATOR

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   mvn_mars_terminator
PURPOSE:
  Given a time, uses SPICE to determine the location of the 
  terminator and the subsolar point in IAU_MARS coordinates.
  The terminator is calculated with 1-deg resolution (360 points).
  The result is returned via keyword.

  It is assumed that you have already initialized SPICE.  (See 
  mvn_swe_spice_init for an example.)

USAGE:
  mvn_mars_terminator, time, result=dat

INPUTS:
       time:      Time for calculating the terminator

KEYWORDS:
       RESULT:    Structure containing the result:

                    time  : unix time for used for calculation
                    t_lon : terminator longitude (deg)
                    t_lat : terminator latitude (deg)
                    s_lon : sub-solar point longitude (deg)
                    s_lat : sub-solar point latitude (deg)
                    frame : coordinate frame ("IAU_MARS")

       SHADOW:    Choose which "shadow" to calculate:
                     0 : optical shadow at surface (default)
                     1 : optical shadow at spacecraft altitude
                     2 : EUV shadow at spacecraft altitude

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2017-03-01 14:56:42 -0800 (Wed, 01 Mar 2017) $
 $LastChangedRevision: 22890 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/mvn_mars_terminator.pro $

CREATED BY:	David L. Mitchell

(See projects/maven/maven_orbit_tplot/mvn_mars_terminator.pro)


MVN_SUN_BAR

[Previous Routine] [Next Routine] [List of Routines]
PROCEDURE:   mvn_sun_bar
PURPOSE:
  Creates a colored bar indicating sun/shadow.  Assumes that
  you have run maven_orbit_tplot first.

USAGE:
  mvn_sun_bar

INPUTS:

KEYWORDS:

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2017-09-07 11:20:21 -0700 (Thu, 07 Sep 2017) $
 $LastChangedRevision: 23904 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/mvn_sun_bar.pro $

CREATED BY:    David L. Mitchell

(See projects/maven/maven_orbit_tplot/mvn_sun_bar.pro)


TIME_TO_PERIAPSIS

[Previous Routine] [List of Routines]
PROCEDURE:   time_to_periapsis
PURPOSE:
  Calculates the time needed for the spacecraft to go from periapsis
  to some higher altitude(s).  NAIF conventions are used:

    Periapsis is defined as the minimum distance in the orbit to the 
    center of Mars (a.k.a. "geometric periapsis").

    Altitude is calculated with respect to the IAU 2000 Mars ellipsoid
    (R_equator = 3396.19 km, R_pole = 3376.20 km).  This is known as
    "areodetic altitude".

  The spacecraft ephemeris is calculated using maven_orbit_tplot, which
  in turn uses SPICE.  The ephemeris is refreshed daily at 3:30 am (Pacific)
  using the latest available kernels from NAIF.  The ephemeris coverage
  extends from Mars orbit insertion to about eight weeks into the future.

USAGE:
  time_to_periapsis, h

INPUTS:
       h:             An array of altitudes (units = km).

KEYWORDS:
       TIME:          Reference time for selecting the nearest orbit.
                      Can be in any format accepted by time_double.
                      If you supply an array of times, only the first
                      element is used.  If not specified, the current
                      UTC is used.

       RESULT:        Named variable to hold the result structure.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2019-02-24 11:07:39 -0800 (Sun, 24 Feb 2019) $
 $LastChangedRevision: 26696 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/maven/maven_orbit_tplot/time_to_periapsis.pro $

CREATED BY:    David L. Mitchell

(See projects/maven/maven_orbit_tplot/time_to_periapsis.pro)