{"id":8552,"date":"2026-09-09T23:07:19","date_gmt":"2026-09-10T02:07:19","guid":{"rendered":"https:\/\/www.elfirmamento.com.ar\/?post_type=ect-service&#038;p=8552"},"modified":"2026-09-09T23:15:19","modified_gmt":"2026-09-10T02:15:19","slug":"lanzamientos-misiones","status":"publish","type":"ect-service","link":"https:\/\/www.elfirmamento.com.ar\/?service=lanzamientos-misiones","title":{"rendered":"Lanzamientos Misiones"},"content":{"rendered":"\n<p>En esta secci\u00f3n podr\u00e1s consultar los pr\u00f3ximos lanzamientos de cohetes de las principales compa\u00f1\u00edas y agencias espaciales del mundo. Encontrar\u00e1s informaci\u00f3n actualizada sobre cada misi\u00f3n, incluyendo el cohete utilizado, la agencia responsable, la fecha y hora de lanzamiento, el lugar desde donde se realizar\u00e1 y una breve descripci\u00f3n de su objetivo. Toda la informaci\u00f3n se presenta de forma clara y en castellano.<\/p>\n\n\n\n<style>\n  \/* Estilos para la grilla y las tarjetas - MODO OSCURO *\/\n  .launches-grid {\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n    gap: 20px;\n    font-family: Arial, sans-serif;\n  }\n\n  .launch-card {\n    border: 1px solid #333;\n    border-radius: 10px;\n    overflow: hidden;\n    box-shadow: 0 6px 12px rgba(0,0,0,0.5);\n    display: flex;\n    flex-direction: column;\n    background: #1e1e1e;\n    color: #e0e0e0;\n    transition: transform 0.2s ease;\n  }\n\n  .launch-card:hover {\n    transform: translateY(-5px);\n  }\n\n  .launch-image {\n    width: 100%;\n    height: 200px;\n    object-fit: cover;\n    background-color: #2a2a2a;\n    display: block;\n  }\n\n  .launch-content {\n    padding: 15px;\n    flex-grow: 1;\n  }\n\n  .launch-title {\n    font-size: 1.2em;\n    margin: 0 0 10px 0;\n    color: #ffffff;\n  }\n\n  .launch-agency {\n    font-size: 0.9em;\n    color: #bbbbbb;\n    margin-bottom: 10px;\n    font-weight: bold;\n  }\n\n  .launch-details {\n    font-size: 0.9em;\n    margin-bottom: 5px;\n    color: #cccccc;\n  }\n\n  .mission-desc {\n    font-size: 0.85em;\n    color: #aaaaaa;\n    margin-top: 10px;\n    border-top: 1px solid #444;\n    padding-top: 10px;\n    line-height: 1.4;\n  }\n\n  \/* Banderas de Estado (Badges) *\/\n  .status-badge {\n    display: inline-block;\n    padding: 5px 10px;\n    border-radius: 5px;\n    color: white;\n    font-weight: bold;\n    font-size: 0.85em;\n    margin-bottom: 15px;\n    text-transform: uppercase;\n    box-shadow: 0 2px 4px rgba(0,0,0,0.3);\n  }\n\n  .badge-verde {\n    background-color: #28a745;\n  }\n\n  .badge-amarillo {\n    background-color: #ffc107;\n    color: #000;\n  }\n\n  .badge-naranja {\n    background-color: #fd7e14;\n  }\n\n  .badge-rojo {\n    background-color: #dc3545;\n  }\n<\/style>\n\n<div id=\"space-launches-container\" class=\"launches-grid\">\n  <p style=\"color: #fff; text-align: center; width: 100%;\">\n    Cargando y traduciendo misiones espaciales&#8230;\n  <\/p>\n<\/div>\n\n<script>\n  \/\/ ============================================================\n  \/\/ CONFIGURACI\u00d3N\n  \/\/ ============================================================\n\n  \/\/ Imagen gen\u00e9rica utilizada solamente cuando no existe\n  \/\/ ninguna imagen v\u00e1lida del lanzamiento o del cohete.\n  const imagenPorDefecto =\n    'https:\/\/images.unsplash.com\/photo-1517976487492-5750f3195933?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80';\n\n\n  \/\/ ============================================================\n  \/\/ TRADUCCI\u00d3N\n  \/\/ ============================================================\n\n  async function traducirTexto(textoEnIngles) {\n\n    if (!textoEnIngles) {\n      return 'Misi\u00f3n: Desconocida. A\u00fan no se han revelado los detalles oficiales.';\n    }\n\n    try {\n\n      const url =\n        `https:\/\/translate.googleapis.com\/translate_a\/single?client=gtx&sl=en&tl=es&dt=t&q=${encodeURIComponent(textoEnIngles)}`;\n\n      const respuesta = await fetch(url);\n\n      if (!respuesta.ok) {\n        throw new Error('Error HTTP en Google Translate');\n      }\n\n      const datos = await respuesta.json();\n\n      let textoTraducido = '';\n\n      if (datos && datos[0]) {\n\n        datos[0].forEach(oracion => {\n\n          if (oracion[0]) {\n            textoTraducido += oracion[0] + ' ';\n          }\n\n        });\n\n      }\n\n      return textoTraducido.trim() || textoEnIngles;\n\n    } catch (error) {\n\n      console.error('Error al traducir:', error);\n\n      \/\/ Si falla la traducci\u00f3n, mostramos el texto original.\n      return textoEnIngles;\n    }\n  }\n\n\n  \/\/ ============================================================\n  \/\/ OBTENER IM\u00c1GENES DEL LANZAMIENTO\n  \/\/ ============================================================\n\n  function obtenerImagenes(launch) {\n\n    const imagenes = [];\n\n    \/*\n      Primera opci\u00f3n:\n      imagen espec\u00edfica del lanzamiento.\n    *\/\n    if (launch.image) {\n      imagenes.push(launch.image);\n    }\n\n    \/*\n      Segunda opci\u00f3n:\n      imagen asociada a la configuraci\u00f3n del cohete.\n\n      En algunas misiones Launch Library 2 proporciona\n      la imagen dentro de rocket.configuration.image_url.\n    *\/\n    if (\n      launch.rocket &&\n      launch.rocket.configuration &&\n      launch.rocket.configuration.image_url\n    ) {\n      imagenes.push(launch.rocket.configuration.image_url);\n    }\n\n    \/*\n      Tercera opci\u00f3n:\n      algunos registros pueden utilizar image_url\n      en lugar de image.\n    *\/\n    if (\n      launch.rocket &&\n      launch.rocket.configuration &&\n      launch.rocket.configuration.image\n    ) {\n      imagenes.push(launch.rocket.configuration.image);\n    }\n\n    \/*\n      Eliminamos im\u00e1genes duplicadas.\n    *\/\n    return [...new Set(imagenes)];\n  }\n\n\n  \/\/ ============================================================\n  \/\/ CARGA SEGURA DE IM\u00c1GENES\n  \/\/ ============================================================\n\n  function configurarImagen(img, imagenesDisponibles) {\n\n    let indice = 0;\n\n    function cargarSiguienteImagen() {\n\n      if (indice < imagenesDisponibles.length) {\n\n        const siguiente = imagenesDisponibles[indice];\n        indice++;\n\n        img.src = siguiente;\n\n      } else {\n\n        \/*\n          Si ninguna imagen proporcionada por la API funciona,\n          utilizamos la imagen gen\u00e9rica.\n        *\/\n        img.src = imagenPorDefecto;\n\n      }\n    }\n\n    \/*\n      Si una imagen devuelve error, autom\u00e1ticamente\n      intentamos con la siguiente.\n    *\/\n    img.onerror = function () {\n\n      console.warn(\n        'No se pudo cargar la imagen. Intentando otra alternativa.'\n      );\n\n      cargarSiguienteImagen();\n    };\n\n    cargarSiguienteImagen();\n  }\n\n\n  \/\/ ============================================================\n  \/\/ CARGAR LANZAMIENTOS\n  \/\/ ============================================================\n\n  async function fetchLaunches() {\n\n    const container =\n      document.getElementById('space-launches-container');\n\n    try {\n\n      \/*\n        Se mantiene la API utilizada actualmente.\n      *\/\n      const response = await fetch(\n        'https:\/\/lldev.thespacedevs.com\/2.2.0\/launch\/upcoming\/?limit=12'\n      );\n\n      if (!response.ok) {\n        throw new Error(\n          'La API respondi\u00f3 con el c\u00f3digo HTTP ' + response.status\n        );\n      }\n\n      const data = await response.json();\n\n      if (!data.results || !data.results.length) {\n\n        container.innerHTML =\n          '<p style=\"color: #fff; text-align: center; width: 100%;\">' +\n          'No se encontraron pr\u00f3ximos lanzamientos.' +\n          '<\/p>';\n\n        return;\n      }\n\n      container.innerHTML = '';\n\n\n      \/\/ ========================================================\n      \/\/ PROCESAR CADA LANZAMIENTO\n      \/\/ ========================================================\n\n      for (const launch of data.results) {\n\n        \/\/ ------------------------------------------------------\n        \/\/ 1. ESTADOS\n        \/\/ ------------------------------------------------------\n\n        let statusText = 'Desconocido';\n        let badgeClass = 'badge-amarillo';\n\n        const statusId =\n          launch.status?.id;\n\n        switch (statusId) {\n\n          case 1:\n          case 8:\n            statusText = 'Pr\u00f3ximo a lanzar';\n            badgeClass = 'badge-amarillo';\n            break;\n\n          case 2:\n            statusText = 'Reprogramado \/ TBD';\n            badgeClass = 'badge-naranja';\n            break;\n\n          case 3:\n            statusText = 'Lanzado Exitosamente';\n            badgeClass = 'badge-verde';\n            break;\n\n          case 4:\n          case 7:\n            statusText = 'Misi\u00f3n Perdida \/ Explosi\u00f3n';\n            badgeClass = 'badge-rojo';\n            break;\n        }\n\n\n        \/\/ ------------------------------------------------------\n        \/\/ 2. FECHAS\n        \/\/ ------------------------------------------------------\n\n        let artDate = 'Fecha desconocida';\n        let artTime = 'Hora desconocida';\n\n        if (launch.net) {\n\n          const dateObj =\n            new Date(launch.net);\n\n          const optionsDate = {\n            year: 'numeric',\n            month: 'long',\n            day: 'numeric',\n            timeZone: 'America\/Argentina\/Buenos_Aires'\n          };\n\n          const optionsTime = {\n            hour: '2-digit',\n            minute: '2-digit',\n            timeZone: 'America\/Argentina\/Buenos_Aires'\n          };\n\n          artDate =\n            dateObj.toLocaleDateString(\n              'es-AR',\n              optionsDate\n            );\n\n          artTime =\n            dateObj.toLocaleTimeString(\n              'es-AR',\n              optionsTime\n            );\n        }\n\n\n        \/\/ ------------------------------------------------------\n        \/\/ 3. DATOS DEL LANZAMIENTO\n        \/\/ ------------------------------------------------------\n\n        const rocketName =\n          launch.rocket?.configuration?.name ||\n          'Cohete desconocido';\n\n        const locationName =\n          launch.pad?.location?.name ||\n          'Ubicaci\u00f3n desconocida';\n\n        const agencyName =\n          launch.launch_service_provider?.name ||\n          'Agencia desconocida';\n\n\n        \/\/ ------------------------------------------------------\n        \/\/ 4. IM\u00c1GENES\n        \/\/ ------------------------------------------------------\n\n        const imagenesDisponibles =\n          obtenerImagenes(launch);\n\n\n        \/\/ ------------------------------------------------------\n        \/\/ 5. DESCRIPCI\u00d3N DE LA MISI\u00d3N\n        \/\/ ------------------------------------------------------\n\n        const missionDescEn =\n          launch.mission?.description;\n\n        const missionDescEs =\n          await traducirTexto(missionDescEn);\n\n\n        \/\/ ------------------------------------------------------\n        \/\/ 6. CREACI\u00d3N DE LA TARJETA\n        \/\/ ------------------------------------------------------\n\n        const card =\n          document.createElement('div');\n\n        card.className =\n          'launch-card';\n\n\n        card.innerHTML = `\n          <img\n            alt=\"${rocketName}\"\n            class=\"launch-image\"\n            loading=\"lazy\"\n          >\n\n          <div class=\"launch-content\">\n\n            <span class=\"status-badge ${badgeClass}\">\n              ${statusText}\n            <\/span>\n\n            <h3 class=\"launch-title\">\n              ${rocketName}\n            <\/h3>\n\n            <div class=\"launch-agency\">\n              \ud83d\ude80 ${agencyName}\n            <\/div>\n\n            <div class=\"launch-details\">\n              <strong>\ud83d\udcc5 Fecha:<\/strong>\n              ${artDate}\n            <\/div>\n\n            <div class=\"launch-details\">\n              <strong>\u23f0 Hora (Arg):<\/strong>\n              ${artTime} hs\n            <\/div>\n\n            <div class=\"launch-details\">\n              <strong>\ud83d\udccd Lugar:<\/strong>\n              ${locationName}\n            <\/div>\n\n            <div class=\"mission-desc\">\n              ${missionDescEs}\n            <\/div>\n\n          <\/div>\n        `;\n\n\n        \/\/ ------------------------------------------------------\n        \/\/ 7. CONFIGURAR LA IMAGEN\n        \/\/ ------------------------------------------------------\n\n        const img =\n          card.querySelector('.launch-image');\n\n        configurarImagen(\n          img,\n          imagenesDisponibles\n        );\n\n\n        \/\/ ------------------------------------------------------\n        \/\/ 8. AGREGAR TARJETA A LA GRILLA\n        \/\/ ------------------------------------------------------\n\n        container.appendChild(card);\n      }\n\n    } catch (error) {\n\n      console.error(\n        'Error fetching launches:',\n        error\n      );\n\n      container.innerHTML =\n        '<p style=\"color: #ff6b6b; text-align: center; width: 100%;\">' +\n        'Error al cargar los lanzamientos. Por favor, intent\u00e1 de nuevo m\u00e1s tarde.' +\n        '<\/p>';\n    }\n  }\n\n\n  \/\/ ============================================================\n  \/\/ INICIAR\n  \/\/ ============================================================\n\n  fetchLaunches();\n\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>En esta secci\u00f3n podr\u00e1s consultar los pr\u00f3ximos lanzamientos de cohetes de las principales compa\u00f1\u00edas y agencias espaciales del mundo. Encontrar\u00e1s informaci\u00f3n actualizada sobre cada misi\u00f3n, incluyendo el cohete utilizado, la agencia responsable, la fecha y hora de lanzamiento, el lugar desde donde se realizar\u00e1 y &hellip; <a href=\"https:\/\/www.elfirmamento.com.ar\/?service=lanzamientos-misiones\" class=\"more-link\"><span>Seguir leyendo<span class=\"screen-reader-text\">Lanzamientos Misiones<\/span><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":8554,"comment_status":"closed","ping_status":"closed","template":"","ect-service-type":[],"ect-service-tag":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=\/wp\/v2\/ect-service\/8552"}],"collection":[{"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=\/wp\/v2\/ect-service"}],"about":[{"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=\/wp\/v2\/types\/ect-service"}],"author":[{"embeddable":true,"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8552"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=\/wp\/v2\/media\/8554"}],"wp:attachment":[{"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8552"}],"wp:term":[{"taxonomy":"ect-service-type","embeddable":true,"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fect-service-type&post=8552"},{"taxonomy":"ect-service-tag","embeddable":true,"href":"https:\/\/www.elfirmamento.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fect-service-tag&post=8552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}